AntonLV 10 years ago
parent
commit
10addf9c10

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

@@ -774,6 +774,7 @@
 	<string name="_adm_form_txt_field_type_hidden"><![CDATA[hidden]]></string>
 	<string name="_adm_form_txt_field_type_image"><![CDATA[image]]></string>
 	<string name="_adm_form_txt_field_type_input_set"><![CDATA[input set]]></string>
+	<string name="_adm_form_txt_field_type_location"><![CDATA[location]]></string>
 	<string name="_adm_form_txt_field_type_number"><![CDATA[number]]></string>
 	<string name="_adm_form_txt_field_type_password"><![CDATA[password]]></string>
 	<string name="_adm_form_txt_field_type_radio_set"><![CDATA[radio set]]></string>

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

@@ -117,4 +117,8 @@ class BxTemplStudioFormsFieldCaptcha extends BxBaseStudioFormsFieldCaptcha
 {
 }
 
+class BxTemplStudioFormsFieldLocation extends BxBaseStudioFormsFieldLocation
+{
+}
+
 /** @} */

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

@@ -117,4 +117,8 @@ class BxTemplStudioFormsFieldCaptcha extends BxBaseStudioFormsFieldCaptcha
 {
 }
 
+class BxTemplStudioFormsFieldLocation extends BxBaseStudioFormsFieldLocation
+{
+}
+
 /** @} */

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

@@ -772,6 +772,7 @@
 	<string name="_adm_form_txt_field_type_hidden"><![CDATA[спрятано]]></string>
 	<string name="_adm_form_txt_field_type_image"><![CDATA[картинка]]></string>
 	<string name="_adm_form_txt_field_type_input_set"><![CDATA[набор полей ввода]]></string>
+	<string name="_adm_form_txt_field_type_location"><![CDATA[местонахождение]]></string>
 	<string name="_adm_form_txt_field_type_number"><![CDATA[число]]></string>
 	<string name="_adm_form_txt_field_type_password"><![CDATA[пароль]]></string>
 	<string name="_adm_form_txt_field_type_radio_set"><![CDATA[набор переключателей]]></string>

+ 1 - 1
studio/classes/BxDolStudioFormsField.php

@@ -27,7 +27,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', 'file', 'files', 'custom');
+        $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', 'location');
         $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-location.png


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

@@ -1465,4 +1465,27 @@ class BxBaseStudioFormsFieldCaptcha extends BxBaseStudioFormsFieldText
     }
 }
 
+class BxBaseStudioFormsFieldLocation extends BxBaseStudioFormsFieldText
+{
+    protected $sType = 'location';
+    protected $aCheckFunctions = array();
+    protected $sDbPass = '';
+
+    function __construct($aParams = array(), $aField = array())
+    {
+        parent::__construct($aParams, $aField);
+
+        $this->aParams['table_alter'] = false;
+
+        unset(
+            $this->aForm['inputs']['required'],
+            $this->aForm['inputs']['checker_func'],
+            $this->aForm['inputs']['checker_params'],
+            $this->aForm['inputs']['checker_params_length_min'],
+            $this->aForm['inputs']['checker_params_length_max'],
+            $this->aForm['inputs']['checker_params_preg'],
+            $this->aForm['inputs']['checker_error']
+        );
+    }
+}
 /** @} */