广州市综治平台后端
xusd
2025-06-07 36306491396230522fa20585c2621a7fc899849a
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div class="modal">
    <div class="modal-dialog modal-wide">
        <div class="modal-content">
            <div class="modal-header">
                <h2 ng-if="formElement.type != 'expression'">{{'FORM-BUILDER.POPUP.EDIT-TITLE' | translate: formElement}}</h2>
                <h2 ng-if="formElement.type == 'expression'">{{'FORM-BUILDER.POPUP.EXPRESSION-TITLE' | translate}}</h2>
            </div>
            <div class="modal-body">
                <div class="center-pane">
                    <div class="content">
                        <div class="clearfix">
                            <ul class="tabs clearfix">
                                <li ng-repeat="tab in formTabs" ng-class="{'active': tab.id == activeTab.id}"
                                    ng-if="!tab.show || tab.show.indexOf(formElement.type) >= 0">
                                    <a ng-click="tabClicked(tab)">{{tab.title && (tab.title | translate) || tab.name}}</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
 
                <div class="form-group" ng-if="activeTab.id == 'general' && formElement.type != 'expression'">
                    <label translate="FORM-BUILDER.COMPONENT.LABEL"></label>
                    <input type="text" class="form-control" ng-model="formElement.name"
                           ng-change="formElementNameChanged(formElement)" auto-focus>
                </div>
 
                <div class="clearfix" ng-if="activeTab.id == 'general' && formElement.type != 'expression'">
                    <div class="form-group">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-model="formElement.overrideId">
                                {{'FORM-BUILDER.COMPONENT.OVERRIDEID' | translate}}
                            </label>
                        </div>
                    </div>
 
                    <div class="form-group">
                        <label translate="FORM-BUILDER.COMPONENT.ID"></label>
                        <input type="text" class="form-control" ng-model="formElement.id" ng-disabled="!formElement.overrideId" editor-input-check>
                    </div>
 
                    <div ng-show="formElement.type !== 'expression' && formElement.type !== 'hyperlink' && formElement.type !== 'spacer' && formElement.type !== 'horizontal-line' && formElement.type !== 'headline' && formElement.type !== 'headline-with-line'">
                        <div class="row">
                           <div class="form-group col-md-2">
                               <div class="checkbox">
                                   <label>
                                       <input type="checkbox" ng-model="formElement.required">
                                       {{'FORM-BUILDER.COMPONENT.REQUIRED' | translate}}
                                   </label>
                               </div>
                            </div>
                            <div class="form-group col-md-10">
                               <div class="checkbox">
                                   <label>
                                       <input type="checkbox" ng-model="formElement.readOnly">
                                       {{'FORM-BUILDER.COMPONENT.READONLY' | translate}}
                                   </label>
                               </div>                               
                           </div>
                        </div>
                    </div>
 
                    <div ng-show="formElement.type === 'functional-group' || formElement.type === 'people' || formElement.type === 'dropdown' || formElement.type === 'date' || formElement.type === 'text' || formElement.type === 'password' || formElement.type === 'multi-line-text' || formElement.type === 'integer' || formElement.type === 'decimal'">
                        <label translate="FORM-BUILDER.COMPONENT.PLACEHOLDER"></label>
                        <input type="text" class="form-control" ng-model="formElement.placeholder">
                    </div>
                </div>
 
                <div ng-if="(activeTab.id == 'options') && (formElement.type === 'radio-buttons' || formElement.type === 'dropdown')">
 
                    <div class="form-group">
                        <label translate="FORM-BUILDER.COMPONENT.OPTIONS"></label>
 
                        <div>
                            <div ng-repeat="option in formElement.options" style="margin-bottom: 5px" class="input-group">
                                <div class="input-group-addon">
                                    <input type="radio" ng-disabled="optionsExpressionEnabled" ng-model="formElement.value" ng-value="option.name">
                                </div>
 
                                <input id="firstDropdownOption" type="text" class="form-control" ng-disabled="optionsExpressionEnabled" ng-if="$index == 0" ng-model="option.name" style="background-color: #E6E6E6;">
                                <input type="text" class="form-control" ng-disabled="optionsExpressionEnabled" ng-if="$index > 0" ng-model="option.name">
 
                                <a class="input-group-addon" ng-if="$index == 0"
                                   data-placement="left" data-type="info" data-animation="am-fade-and-scale" bs-tooltip="'FORM-BUILDER.COMPONENT.DROPDOWN-EMPTY-VALUE-HELP'|translate">
                                    <i class="glyphicon glyphicon-question-sign"></i>
                                </a>
 
                                <a class="input-group-addon" ng-disabled="optionsExpressionEnabled" ng-click="removeOption($index)" ng-if="$index > 1"><i class="icon icon-remove"></i></a>
                            </div>
 
                            <div>
                                <input type="text" class="form-control" placeholder="{{'FORM-BUILDER.COMPONENT.ADD-OPTION' | translate}}" ng-model="newOption.name"
                                       ng-disabled="optionsExpressionEnabled" ng-blur="confirmNewOption($event)" ng-keydown="optionKeyDown($event)">
                            </div>
                        </div>
                    </div>
 
                    <div class="form-group">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-init="optionsExpressionEnabled = formElement.optionsExpression != null && formElement.optionsExpression != ''" ng-model="optionsExpressionEnabled" ng-change="optionsExpressionChanged($event)">
                                {{'FORM-BUILDER.COMPONENT.OPTIONS-EXPRESSION-ENABLED' | translate}}
                            </label>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label translate="FORM-BUILDER.COMPONENT.OPTIONS-EXPRESSION"></label>
                        <textarea rows="3" ng-disabled="!optionsExpressionEnabled" ng-model="formElement.optionsExpression" class="form-control" id="readonly-text-value"></textarea>
                        <div class="subtle" translate="FORM-BUILDER.MESSAGE.OPTIONS-EXPRESSION-HELP" style="padding: 5px 0 5px 1px;"></div>
                    </div>
                    
                </div>
 
                <div ng-if="activeTab.id == 'upload' && formElement.type === 'upload'">
                    <div class="form-group">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-model="formElement.params.multiple">
                                {{'FORM-BUILDER.COMPONENT.UPLOAD-ALLOW-MULTIPLE' | translate}}
                            </label>
                        </div>
                    </div>
                </div>
                <div ng-if="activeTab.id == 'advanced' && (formElement.type === 'password')">
             <div class="form-group">
              <label translate="FORM-BUILDER.COMPONENT.MIN-LENGTH"></label> <input
                 type="text" number-input-check maxlength="5" class="form-control"
                 ng-model="formElement.params.minLength">
             </div>
             <div class="form-group">
              <label translate="FORM-BUILDER.COMPONENT.MAX-LENGTH"></label> <input
                     type="text" number-input-check maxlength="5" class="form-control"
                     ng-model="formElement.params.maxLength">
              </div>
                        <div class="row">
                           <div class="form-group col-md-12">
                               <div class="checkbox">
                                   <label>
                                       <input type="checkbox" ng-model="formElement.params.passwordunmask">
                                       {{'FORM-BUILDER.COMPONENT.PASSWORD-UNMASK-OPTION' | translate}}?
                                   </label>
                               </div>
                            </div>
                        </div>
              </div>
                <div ng-if="activeTab.id == 'advanced' && (formElement.type === 'text' || formElement.type === 'multi-line-text' || formElement.type === 'decimal' || formElement.type === 'integer')">
             <div class="form-group">
              <label translate="FORM-BUILDER.COMPONENT.MIN-LENGTH"></label> <input
                 type="text" number-input-check maxlength="5" class="form-control"
                 ng-model="formElement.params.minLength">
             </div>
             <div class="form-group">
              <label translate="FORM-BUILDER.COMPONENT.MAX-LENGTH"></label> <input
                     type="text" number-input-check maxlength="5" class="form-control"
                     ng-model="formElement.params.maxLength">
                     </div>
             <div class="form-group">
              <label translate="FORM-BUILDER.COMPONENT.REGEX-PATTERN"></label>
                <div class="input-group">
                        <span class="input-group-addon">/^</span> <input type="text" class="form-control" ng-model="formElement.params.regexPattern">
                    <span class="input-group-addon">$/</span>
                </div>
            </div>
                    <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label translate="FORM-BUILDER.COMPONENT.MASK.TITLE"></label>
                    <input type="text" class="form-control" ng-model="formElement.params.mask">
                </div>
            </div>
            <div class="col-md-4">
                <div class="form-group">
                    <label translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.TITLE</label>
                <ul>
                       <li><span translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.NUMBER</span>: <b>9</b></li>
                    <li><span translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.LETTER</span>: <b>A</b></li>
                    <li><span translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.NUMBERORLETTER</span>: <b>*</b></li>
                    <li><span translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.OPTIONAL</span>: <b>?</b></li>
                    <li><span translate>FORM-BUILDER.COMPONENT.MASK.EXAMPLES.PHONE</span>: <b>(99) 9999-9999</b></li>
                </ul>
               </div>
            </div>
            </div>
        </div>
                
        <div ng-if="activeTab.id == 'advanced' && formElement.type === 'hyperlink'">
            <div class="form-group">
            <label translate="FORM-BUILDER.COMPONENT.HYPERLINK-URL"></label> <input
            type="text" class="form-control" ng-model="formElement.params.hyperlinkUrl">
            </div>
        </div>        
            
                <div ng-if="activeTab.id == 'general' && formElement.type === 'expression'">
                    <div class="form-group">
                        <label translate="FORM-BUILDER.COMPONENT.EXPRESSION"></label>
                        <textarea rows="3" ng-model="formElement.expression" class="form-control" id="readonly-text-value"></textarea>
                        <div class="subtle" translate="FORM-BUILDER.MESSAGE.EXPRESSION-HELP" style="padding: 5px 0 5px 1px;"></div>
                    </div>
                    <div class="form-group">
                        <label translate="FORM-BUILDER.COMPONENT.SIZE"></label>
                        <select class="form-control" ng-model="formElement.params.size">
                            <option>1</option>
                            <option>2</option>
                            <option>3</option>
                            <option>4</option>
                            <option>5</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <div class="pull-right">
                    <button type="button" class="btn btn-sm btn-default" ng-click="doneEditing()">
                        {{'GENERAL.ACTION.CLOSE' | translate}}
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>