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_source($request->get('src_' . $id));
$field->set_multi($request->get('multi_' . $id));
$field->set_business($request->get('business_' . $id));
$field->set_indexable($request->get('indexable_' . $id));
$field->set_required($request->get('required_' . $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
* @return databox_field
* @return \databox_field
*/
public static function get_instance(databox &$databox, $id)
{

View File

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