-
Notifications
You must be signed in to change notification settings - Fork 0
/
engine_location_city_form.xml
105 lines (104 loc) · 4.46 KB
/
engine_location_city_form.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">engine_location_city_form.engine_location_city_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">City Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<dataScope>data</dataScope>
<namespace>engine_location_city_form</namespace>
<deps>
<dep>engine_location_city_form.engine_location_city_form_data_source</dep>
</deps>
<buttons>
<button name="back">
<url path="engine_location/city/index"/>
<class>back</class>
<label translate="true">Back</label>
</button>
<button name="reset">
<class>reset</class>
<label translate="true">Reset</label>
</button>
<button name="delete" class="Engine\Location\Ui\Component\Control\City\DeleteButton"/>
<button name="save" class="Engine\Location\Ui\Component\Control\City\SaveSplitButton"/>
</buttons>
</settings>
<dataSource name="engine_location_city_form_data_source" component="Magento_Ui/js/form/provider">
<settings>
<submitUrl path="engine_location/city/save"/>
<validateUrl path="engine_location/city/validate"/>
</settings>
<dataProvider class="Engine\Location\Ui\DataProvider\CityDataProvider" name="engine_location_city_form_data_source">
<settings>
<requestFieldName>city_id</requestFieldName>
<primaryFieldName>city_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="general" sortOrder="10">
<settings>
<label translate="true">General</label>
<collapsible>true</collapsible>
<opened>true</opened>
<dataScope>general</dataScope>
</settings>
<field name="name" formElement="input" sortOrder="100">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
<rule name="max_text_length" xsi:type="number">255</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Name</label>
<scopeLabel>[GLOBAL]</scopeLabel>
</settings>
</field>
<field name="region_id" formElement="input" sortOrder="200">
<settings>
<validation>
<rule name="validate-integer" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Region</label>
<scopeLabel>[GLOBAL]</scopeLabel>
</settings>
</field>
<field name="enabled" formElement="checkbox" sortOrder="300">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="default" xsi:type="number">1</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<label translate="true">Is Enabled</label>
<scopeLabel>[GLOBAL]</scopeLabel>
</settings>
<formElements>
<checkbox>
<settings>
<valueMap>
<map name="false" xsi:type="number">0</map>
<map name="true" xsi:type="number">1</map>
</valueMap>
<prefer>toggle</prefer>
</settings>
</checkbox>
</formElements>
</field>
<field name="position" formElement="input" sortOrder="400">
<settings>
<validation>
<rule name="validate-integer" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Position</label>
<scopeLabel>[GLOBAL]</scopeLabel>
</settings>
</field>
</fieldset>
</form>