AntonLV 7 лет назад
Родитель
Сommit
c3561bb2a6

+ 4 - 0
modules/boonex/decorous/data/template/studio/scripts/BxTemplStudioFormsField.php

@@ -17,6 +17,10 @@ class BxTemplStudioFormsFieldBlockHeader extends BxBaseStudioFormsFieldBlockHead
 {
 }
 
+class BxTemplStudioFormsFieldBlockEnd extends BxBaseStudioFormsFieldBlockEnd
+{
+}
+
 class BxTemplStudioFormsFieldValue extends BxBaseStudioFormsFieldValue
 {
 }

+ 10 - 0
modules/boonex/developer/classes/BxDevFormsField.php

@@ -35,6 +35,16 @@ class BxDevFormsFieldBlockHeader extends BxTemplStudioFormsFieldBlockHeader
     }
 }
 
+class BxDevFormsFieldBlockEnd extends BxTemplStudioFormsFieldBlockEnd
+{
+    public function init()
+	{
+		parent::init();
+
+        BxDevFunctions::changeFormField($this->aParams, $this->aForm['inputs'], $this->oDb);
+    }
+}
+
 class BxDevFormsFieldValue extends BxTemplStudioFormsFieldValue
 {
     public function init()

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -796,6 +796,7 @@
 	<string name="_adm_form_txt_field_object"><![CDATA[Form]]></string>
 	<string name="_adm_form_txt_field_required"><![CDATA[Mandatory]]></string>
 	<string name="_adm_form_txt_field_show_to_popup"><![CDATA[Show "{0}" form field to: ]]></string>
+        <string name="_adm_form_txt_field_type_block_end"><![CDATA[block end]]></string>
 	<string name="_adm_form_txt_field_type_block_header"><![CDATA[block header]]></string>
 	<string name="_adm_form_txt_field_type_button"><![CDATA[button]]></string>
 	<string name="_adm_form_txt_field_type_captcha"><![CDATA[captcha]]></string>

+ 4 - 0
modules/boonex/lucid/data/template/studio/scripts/BxTemplStudioFormsField.php

@@ -17,6 +17,10 @@ class BxTemplStudioFormsFieldBlockHeader extends BxBaseStudioFormsFieldBlockHead
 {
 }
 
+class BxTemplStudioFormsFieldBlockEnd extends BxBaseStudioFormsFieldBlockEnd
+{
+}
+
 class BxTemplStudioFormsFieldValue extends BxBaseStudioFormsFieldValue
 {
 }

+ 4 - 0
modules/boonex/ocean/data/template/studio/scripts/BxTemplStudioFormsField.php

@@ -17,6 +17,10 @@ class BxTemplStudioFormsFieldBlockHeader extends BxBaseStudioFormsFieldBlockHead
 {
 }
 
+class BxTemplStudioFormsFieldBlockEnd extends BxBaseStudioFormsFieldBlockEnd
+{
+}
+
 class BxTemplStudioFormsFieldValue extends BxBaseStudioFormsFieldValue
 {
 }

+ 4 - 0
modules/boonex/protean/data/template/studio/scripts/BxTemplStudioFormsField.php

@@ -17,6 +17,10 @@ class BxTemplStudioFormsFieldBlockHeader extends BxBaseStudioFormsFieldBlockHead
 {
 }
 
+class BxTemplStudioFormsFieldBlockEnd extends BxBaseStudioFormsFieldBlockEnd
+{
+}
+
 class BxTemplStudioFormsFieldValue extends BxBaseStudioFormsFieldValue
 {
 }

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -794,6 +794,7 @@
 	<string name="_adm_form_txt_field_object"><![CDATA[Форма]]></string>
 	<string name="_adm_form_txt_field_required"><![CDATA[Необходимое]]></string>
 	<string name="_adm_form_txt_field_show_to_popup"><![CDATA[Показывать "{0}" поле формы для: ]]></string>
+        <string name="_adm_form_txt_field_type_block_end"><![CDATA[конец блока]]></string>
 	<string name="_adm_form_txt_field_type_block_header"><![CDATA[заголовок блока]]></string>
 	<string name="_adm_form_txt_field_type_button"><![CDATA[кнопка]]></string>
 	<string name="_adm_form_txt_field_type_captcha"><![CDATA[капча]]></string>

+ 1 - 0
studio/classes/BxDolStudioFormsField.php

@@ -32,6 +32,7 @@ class BxDolStudioFormsField extends BxDol
 
         $this->aTypes = array(
         	'block_header' => array('add' => 1), 
+                'block_end' => array('add' => 1), 
         	'text' => array('add' => 1), 
         	'datepicker' => array('add' => 1), 
         	'datetime' => array('add' => 1), 

BIN
studio/template/images/icons/ui-block_end.png


+ 108 - 1
studio/template/scripts/BxBaseStudioFormsField.php

@@ -921,7 +921,114 @@ class BxBaseStudioFormsFieldBlockHeader extends BxBaseStudioFormsField
                 )
             )
         );
-	}
+    }
+}
+
+class BxBaseStudioFormsFieldBlockEnd extends BxBaseStudioFormsField
+{
+    protected $sType = 'block_end';
+
+    public function init()
+    {
+        parent::init();
+
+        $this->aForm = array(
+            'form_attrs' => array(
+                'id' => '',
+                'action' => '',
+                'method' => 'post'
+            ),
+            'params' => array (
+                'db' => array(
+                    'table' => 'sys_form_inputs',
+                    'key' => 'id',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'do_submit'
+                ),
+            ),
+            'inputs' => array (
+                'module' => array(
+                    'type' => 'hidden',
+                    'name' => 'module',
+                    'caption' => _t('_adm_form_txt_field_module'),
+                    'value' => 'custom',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                ),
+                'object' => array(
+                    'type' => 'hidden',
+                    'name' => 'object',
+                    'caption' => _t('_adm_form_txt_field_object'),
+                    'value' => '',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                ),
+                'name' => array(
+                    'type' => 'hidden',
+                    'name' => 'name',
+                    'caption' => _t('_adm_form_txt_field_name'),
+                    'value' => '',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    )
+                ),
+                'type' => array(
+                    'type' => 'hidden',
+                    'name' => 'type',
+                    'value' => $this->sType,
+                    'db' => array (
+                        'pass' => 'Xss',
+                    )
+                ),
+                'db_pass' => array(
+                    'type' => 'hidden',
+                    'name' => 'db_pass',
+                    'value' => $this->sDbPass,
+                    'db' => array (
+                        'pass' => 'Xss',
+                    )
+                ),
+                'type_display' => $this->getFieldTypesSelector('type_display', $this->sType),
+                'caption_system' => array(
+                    'type' => 'text_translatable',
+                    'name' => 'caption_system',
+                    'caption' => _t('_adm_form_txt_field_caption_system'),
+                    'info' => _t('_adm_form_dsc_field_caption_system'),
+                    'value' => '_sys_form_txt_field',
+                    'required' => '1',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
+                    'checker' => array (
+                        'func' => 'LengthTranslatable',
+                        'params' => array(3,100, 'caption_system'),
+                        'error' => _t('_adm_form_err_field_caption_system'),
+                    ),
+                ),
+                'controls' => array(
+                    'name' => 'controls',
+                    'type' => 'input_set',
+                    array(
+                        'type' => 'submit',
+                        'name' => 'do_submit',
+                        'value' => _t('_adm_form_btn_field_add'),
+                    ),
+                    array (
+                        'type' => 'reset',
+                        'name' => 'close',
+                        'value' => _t('_adm_form_btn_field_cancel'),
+                        'attrs' => array(
+                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
+                            'class' => 'bx-def-margin-sec-left',
+                        ),
+                    )
+                )
+            )
+        );
+    }
 }
 
 class BxBaseStudioFormsFieldValue extends BxBaseStudioFormsFieldBlockHeader