|
1 <div class="modal-content"> |
|
2 <div class="modal-header"> |
|
3 <button type="button" class="close" data-dismiss="modal" aria-hidden="true" |
|
4 tal:condition="view/isDialog"> |
|
5 × |
|
6 </button> |
|
7 <h3 class="modal-title" |
|
8 tal:define="config context/myams:configuration;"> |
|
9 <img tal:condition="config/logo" |
|
10 tal:attributes="src string:${config/logo/@@absolute_url}/++display++w200.png; |
|
11 alt config/logo_title;"> |
|
12 <span class="title" tal:content="config/title" /> |
|
13 </h3> |
|
14 </div> |
|
15 <div class="modal-body no-padding"> |
|
16 <div tal:replace="structure provider:form_prefix" /> |
|
17 <form method="post" |
|
18 data-async |
|
19 tal:attributes="id view/id; |
|
20 name view/name; |
|
21 action view/action; |
|
22 method view/method; |
|
23 enctype view/enctype; |
|
24 acceptCharset view/acceptCharset; |
|
25 accept view/accept; |
|
26 autocomplete view/autocomplete; |
|
27 class view/css_class; |
|
28 data-ams-data view/myams:data; |
|
29 data-ams-form-handler view/handler; |
|
30 data-ams-form-options view/getFormOptions;"> |
|
31 <div class="modal-viewport"> |
|
32 <fieldset> |
|
33 <legend tal:define="legend view/legend" |
|
34 tal:condition="legend" |
|
35 tal:content="legend">Legend</legend> |
|
36 <div class="widgets-prefix" |
|
37 tal:define="prefix provider:widgets_prefix" |
|
38 tal:condition="prefix" |
|
39 tal:content="structure prefix" /> |
|
40 <tal:loop repeat="group view/groups"> |
|
41 <fieldset tal:define="legend group/legend" |
|
42 tal:omit-tag="not:legend"> |
|
43 <tal:if condition="group/checkbox_switch"> |
|
44 <legend tal:condition="legend" |
|
45 tal:content="legend" |
|
46 tal:attributes="class group/css_class; |
|
47 data-ams-checker-fieldname group/checker_field/getName; |
|
48 data-ams-checker-state group/checker_state;">Legend</legend> |
|
49 </tal:if> |
|
50 <tal:if condition="not:group/checkbox_switch"> |
|
51 <legend tal:condition="legend" |
|
52 tal:content="legend" |
|
53 tal:attributes="class group/css_class; |
|
54 data-ams-switcher-state group/switcher_state;">Legend</legend> |
|
55 </tal:if> |
|
56 <tal:var define="help group/help" condition="help"> |
|
57 <div class="" |
|
58 tal:define="i18n_help help/i18n:translate" |
|
59 tal:content="structure i18n_help/html:text"></div> |
|
60 </tal:var> |
|
61 <tal:loop repeat="widget group/visible_widgets"> |
|
62 <input type="hidden" |
|
63 tal:condition="python:widget.mode == 'hidden'" |
|
64 tal:replace="structure widget/render" /> |
|
65 <tal:if condition="python:widget.mode != 'hidden'"> |
|
66 <div tal:define="required python:'required-field' if widget.required and (widget.mode != 'display') else ''" |
|
67 tal:attributes="class string:form-group ${required}"> |
|
68 <label class="control-label col-md-3"> |
|
69 <span> |
|
70 <tal:var content="widget/label" /> |
|
71 <i class="fa fa-question-circle hint" title="Input hint" |
|
72 tal:define="description widget/field/description" |
|
73 tal:condition="description" |
|
74 tal:attributes="title description; |
|
75 data-ams-hint-html python:'<' in description;"></i> |
|
76 </span> |
|
77 </label> |
|
78 <div class="col-md-9"> |
|
79 <label class="input" |
|
80 tal:attributes="data-ams-data widget/myams:data; |
|
81 data-ams-form-validator python:view.getWidgetCallback(widget.field.getName())"> |
|
82 <input tal:replace="structure widget/render" /> |
|
83 </label> |
|
84 </div> |
|
85 </div> |
|
86 </tal:if> |
|
87 </tal:loop> |
|
88 </fieldset> |
|
89 </tal:loop> |
|
90 <div class="widgets-suffix" |
|
91 tal:define="suffix provider:widgets_suffix" |
|
92 tal:condition="suffix" |
|
93 tal:content="structure suffix" /> |
|
94 <div class="subforms" |
|
95 tal:condition="view/subforms"> |
|
96 <fieldset tal:define="title view/subforms_legend" |
|
97 tal:omit-tag="not:title"> |
|
98 <legend tal:condition="title" tal:content="title" i18n:translate="" /> |
|
99 <tal:loop repeat="subform view/subforms"> |
|
100 <tal:var replace="structure subform/render" /> |
|
101 </tal:loop> |
|
102 </fieldset> |
|
103 </div> |
|
104 <div class="tabforms" |
|
105 tal:condition="view/tabforms"> |
|
106 <ul class="nav nav-tabs"> |
|
107 <li tal:repeat="tabform view/tabforms" |
|
108 tal:attributes="class python:tabform.widgets.errors and 'state-error' or ''"> |
|
109 <a data-toggle="tab" |
|
110 tal:attributes="href string:#${tabform/id}" |
|
111 tal:content="tabform/tabLabel" i18n:translate="" /> |
|
112 </li> |
|
113 </ul> |
|
114 <div class="tab-content"> |
|
115 <div class="tab-pane fade in" |
|
116 tal:repeat="tabform view/tabforms"> |
|
117 tal:attributes="id tabform/id" |
|
118 tal:content="structure tabform/render" /> |
|
119 </div> |
|
120 </div> |
|
121 </div> |
|
122 </fieldset> |
|
123 </div> |
|
124 <footer> |
|
125 <button tal:repeat="action view/actions/values" |
|
126 tal:replace="structure action/render" /> |
|
127 </footer> |
|
128 </form> |
|
129 <div tal:replace="structure provider:form_suffix" /> |
|
130 </div> |
|
131 </div> |