Просмотр исходного кода

#31 - Forms builder: File, Files and Custom fields.

AntonLV 13 лет назад
Родитель
Сommit
b5bdfe318e

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

@@ -2205,6 +2205,9 @@ Please click "Continue" below to navigate to the home page of the site.]]></stri
     <string name="_adm_form_txt_field_type_custom"><![CDATA[custom]]></string>
     <string name="_adm_form_txt_field_type_value"><![CDATA[info]]></string>
     <string name="_adm_form_txt_field_type_captcha"><![CDATA[captcha]]></string>
+    <string name="_adm_form_txt_field_type_file"><![CDATA[file]]></string>
+    <string name="_adm_form_txt_field_type_files"><![CDATA[files]]></string>
+    <string name="_adm_form_txt_field_type_custom"><![CDATA[custom]]></string>
     <string name="_adm_form_txt_field_type_display"><![CDATA[Type]]></string>
     <string name="_adm_form_txt_field_caption_system"><![CDATA[System Name]]></string>
     <string name="_adm_form_dsc_field_caption_system"><![CDATA[Field name, displayed in Studio only.]]></string>

+ 6 - 0
modules/boonex/uni/data/template/studio/scripts/BxTemplStudioFormsField.php

@@ -83,6 +83,12 @@ class BxTemplStudioFormsFieldFile extends BxBaseStudioFormsFieldFile {
     }
 }
 
+class BxTemplStudioFormsFieldFiles extends BxBaseStudioFormsFieldFiles { 
+    function __construct($aParams = array(), $aField = array()) {
+        parent::__construct($aParams, $aField);
+    }
+}
+
 class BxTemplStudioFormsFieldSlider extends BxBaseStudioFormsFieldSlider { 
     function __construct($aParams = array(), $aField = array()) {
         parent::__construct($aParams, $aField);

+ 1 - 1
studio/classes/BxDolStudioFormsField.php

@@ -28,7 +28,7 @@ class BxDolStudioFormsField extends BxDol {
         parent::__construct();
 
         $this->oDb = new BxDolStudioFormsQuery(); 
-        $this->aTypes = array('block_header', 'text', 'datepicker', 'datetime', 'number', 'checkbox', 'password', 'slider', 'doublerange', 'hidden', 'switcher', 'reset', 'submit', 'textarea', 'select', 'select_multiple', 'checkbox_set', 'radio_set', 'value', 'captcha');
+        $this->aTypes = array('block_header', 'text', 'datepicker', 'datetime', 'number', 'checkbox', 'password', 'slider', 'doublerange', 'hidden', 'switcher', 'reset', 'submit', 'textarea', 'select', 'select_multiple', 'checkbox_set', 'radio_set', 'value', 'captcha', 'file', 'files', 'custom');
         $this->aTypesRelated = array(
             'select_multiple' => array('types' => array('select_multiple', 'checkbox_set'), 'reload_on_change' => 0),
         	'checkbox_set' => array('types' => array('select_multiple', 'checkbox_set'), 'reload_on_change' => 0),

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


+ 8 - 0
studio/template/scripts/BxBaseStudioFormsField.php

@@ -954,6 +954,14 @@ class BxBaseStudioFormsFieldFile extends BxBaseStudioFormsFieldText {
     }
 }
 
+class BxBaseStudioFormsFieldFiles extends BxBaseStudioFormsFieldFile {
+    protected $sType = 'files';
+
+    function __construct($aParams = array(), $aField = array()) {
+        parent::__construct($aParams, $aField);
+    }
+}
+
 class BxBaseStudioFormsFieldNumber extends BxBaseStudioFormsFieldText {
     protected $sType = 'number';
     protected $aCheckFunctions = array('avail', 'length', 'preg');