Page MenuHomeIn-Portal Phabricator

D381.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 6:29 AM

D381.diff

Index: core/admin_templates/incs/config_blocks.tpl
===================================================================
--- core/admin_templates/incs/config_blocks.tpl
+++ core/admin_templates/incs/config_blocks.tpl
@@ -53,6 +53,17 @@
<inp2:PredefinedOptions field="$field" block="config_radio_item" selected="checked"/>
</inp2:m_DefineElement>
+<inp2:m_DefineElement name="config_checkbox_item">
+ <input type="checkbox" <inp2:m_param name='checked'/> id="<inp2:InputName field='$field'/>_<inp2:m_param name='key'/>" value="<inp2:m_param name='key'/>" onclick="update_checkbox_options(/^<inp2:InputName field='$field' as_preg='1'/>_([0-9A-Za-z-_]+)/, '<inp2:InputName field='$field'/>');"/>
+ <label for="<inp2:InputName field='$field'/>_<inp2:m_param name='key'/>"><inp2:m_param name="option"/></label>&nbsp;
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="config_edit_checkboxes">
+ <inp2:PredefinedOptions field="$field" block="config_checkbox_item" selected="checked"/>
+
+ <inp2:m_RenderElement prefix="$PrefixSpecial" name="inp_edit_hidden" field="$field" db="db"/>
+</inp2:m_DefineElement>
+
<inp2:m_DefineElement name="cf_default_value">
<inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
</inp2:m_DefineElement>
Index: core/kernel/db/db_tag_processor.php
===================================================================
--- core/kernel/db/db_tag_processor.php
+++ core/kernel/db/db_tag_processor.php
@@ -2157,6 +2157,7 @@
case 'select':
case 'multiselect':
case 'radio':
+ case 'checkboxes':
if ($object->GetDBField('DirectOptions')) {
// used for custom fields
$options = $object->GetDBField('DirectOptions');
Index: core/units/configuration/configuration_config.php
===================================================================
--- core/units/configuration/configuration_config.php
+++ core/units/configuration/configuration_config.php
@@ -101,7 +101,7 @@
),
'ElementType' => Array (
'type' => 'string',
- 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1,
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_SingleCheckbox', 'checkboxes' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => ''
),
'Validation' => Array ('type' => 'string', 'default' => NULL),
@@ -123,4 +123,4 @@
'VirtualFields' => Array (
'DirectOptions' => Array ('type' => 'string', 'default' => ''),
),
-);
\ No newline at end of file
+);

Event Timeline