<div class="no-padding" i18n:domain="ztfy.myams">
	<div tal:replace="structure provider:form_prefix">Form prefix</div>
	<form method="post"
		  data-async
		  tal:attributes="id view/id;
						  name view/name;
						  action view/action;
						  method view/method;
						  enctype view/enctype;
						  acceptCharset view/acceptCharset;
						  accept view/accept;
						  autocomplete view/autocomplete;
						  class view/css_class;
						  data-ams-data view/myams:data;
						  data-ams-form-handler view/handler;
						  data-ams-form-options view/getFormOptions;
						  data-ams-warn-on-change view/warnOnChange;">
		<div class="modal-viewport">
			<fieldset>
				<legend tal:define="legend view/legend"
						tal:condition="legend"
						tal:content="legend">Legend</legend>
				<div class="widgets-prefix"
					 tal:define="prefix provider:widgets_prefix"
					 tal:condition="prefix"
					 tal:content="structure prefix">Widgets prefix</div>
				<tal:loop repeat="group view/groups">
					<fieldset tal:define="legend group/legend"
							  tal:omit-tag="not:legend">
						<tal:if condition="group/checkbox_switch">
							<legend tal:condition="legend"
									tal:content="legend"
									tal:attributes="class group/css_class;
													data-ams-checker-fieldname group/checker_field/getName;
													data-ams-checker-state group/checker_state;">Legend</legend>
						</tal:if>
						<tal:if condition="not:group/checkbox_switch">
							<legend tal:condition="legend"
									tal:content="legend"
									tal:attributes="class group/css_class;
													data-ams-switcher-state group/switcher_state;">Legend</legend>
						</tal:if>
						<tal:var define="help group/help" condition="help">
							<div class=""
								 tal:define="i18n_help help/i18n:translate"
								 tal:content="structure i18n_help/html:text"></div>
						</tal:var>
						<tal:loop repeat="widget group/visible_widgets">
							<input type="hidden"
								   tal:condition="python:widget.mode == 'hidden'"
								   tal:replace="structure widget/render" />
							<tal:if condition="python:widget.mode != 'hidden'">
								<div tal:define="required python:'required-field' if widget.required and (widget.mode != 'display') else ''"
									 tal:attributes="class string:form-group ${required}">
									<label tal:attributes="class view/label_css_class">
										<span>
											<tal:var content="widget/label" />
											<i class="fa fa-question-circle hint" title="Input hint"
											   tal:define="description widget/field/description"
											   tal:condition="description"
											   tal:attributes="title description;
															   data-ams-hint-html python:'<' in description;"></i>
										</span>
									</label>
									<div tal:attributes="class view/input_css_class">
										<label class="input"
											   tal:attributes="data-ams-data widget/myams:data;
															   data-ams-form-validator python:view.getWidgetCallback(widget.field.getName())">
											<input tal:replace="structure widget/render" />
										</label>
									</div>
								</div>
							</tal:if>
						</tal:loop>
					</fieldset>
				</tal:loop>
				<div class="widgets-suffix"
					 tal:define="suffix provider:widgets_suffix"
					 tal:condition="suffix"
					 tal:content="structure suffix">Widgets suffix</div>
				<div class="subforms"
					 tal:condition="view/subforms">
					<fieldset tal:define="title view/subforms_legend"
							  tal:omit-tag="not:title">
						<legend tal:condition="title" tal:content="title" i18n:translate="">legend</legend>
						<tal:loop repeat="subform view/subforms">
							<tal:var replace="structure subform/render" />
						</tal:loop>
					</fieldset>
				</div>
				<div class="tabforms"
					 tal:condition="view/tabforms">
					<ul class="nav nav-tabs">
						<li tal:repeat="tabform view/tabforms"
							tal:attributes="class python:tabform.widgets.errors and 'state-error' or ''">
							<a data-toggle="tab"
							   tal:attributes="href string:#${tabform/id}"
							   tal:content="tabform/tabLabel" i18n:translate="">Tab label</a>
						</li>
					</ul>
					<div class="tab-content">
						<div class="tab-pane fade in"
							 tal:repeat="tabform view/tabforms">
							 tal:attributes="id tabform/id"
							 tal:content="structure tabform/render" />
						</div>
					</div>
				</div>
			</fieldset>
		</div>
		<footer>
			<button tal:repeat="action view/actions/values"
					tal:replace="structure action/render">Action</button>
		</footer>
	</form>
	<div tal:replace="structure provider:form_suffix">Form suffix</div>
</div>
