Add business fields in admin interface

This commit is contained in:
Romain Neutron
2012-03-21 13:18:37 +01:00
parent 2c89c2b45c
commit a9bd1f2d6c
3 changed files with 12 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ class Description implements ControllerProviderInterface
$field->set_thumbtitle($request->get('thumbtitle_' . $id)); $field->set_thumbtitle($request->get('thumbtitle_' . $id));
$field->set_source($request->get('src_' . $id)); $field->set_source($request->get('src_' . $id));
$field->set_multi($request->get('multi_' . $id)); $field->set_multi($request->get('multi_' . $id));
$field->set_business($request->get('business_' . $id));
$field->set_indexable($request->get('indexable_' . $id)); $field->set_indexable($request->get('indexable_' . $id));
$field->set_required($request->get('required_' . $id)); $field->set_required($request->get('required_' . $id));
$field->set_separator($request->get('separator_' . $id)); $field->set_separator($request->get('separator_' . $id));

View File

@@ -247,9 +247,9 @@ class databox_field implements cache_cacheableInterface
/** /**
* *
* @param databox $databox * @param \databox $databox
* @param int $id * @param int $id
* @return databox_field * @return \databox_field
*/ */
public static function get_instance(databox &$databox, $id) public static function get_instance(databox &$databox, $id)
{ {

View File

@@ -284,6 +284,9 @@
<th> <th>
{% trans 'Afficher en titre' %} {% trans 'Afficher en titre' %}
</th> </th>
<th>
{% trans 'Business Field' %}
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -361,6 +364,9 @@
{{_self.thumbtitle_selector(field.get_thumbtitle())}} {{_self.thumbtitle_selector(field.get_thumbtitle())}}
</select> </select>
</td> </td>
<td>
<input class="metafield_{{field.get_id()}}" {{disabled}} name="business_{{field.get_id()}}" type="checkbox" {% if field.isBusiness() %}checked="checked"{% endif %}/>
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>