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