{{ header }}
{{ column_left }}
<div id="content">
	<div class="page-header">
		<div class="container-fluid">
			<div class="pull-right">
				<button type="submit" form="form-module" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
				<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
			</div>
			<h1>{{ heading_title }}</h1>
			<br />
			<ul class="breadcrumb">
				{% for breadcrumb in breadcrumbs %}
					<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
				{% endfor %}
			</ul>
		</div>
	</div>
	<div class="container-fluid">
		{% if error_warning %}
			<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
				<button type="button" class="close" data-dismiss="alert">&times;</button>
			</div>
		{% endif %}
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
			</div>
			<div class="panel-body">
				<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
						<div class="col-sm-10">
							<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
							{% if error_name %}
								<div class="text-danger">{{ error_name }}</div>
							{% endif %}
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-banner">{{ entry_banner }}</label>
						<div class="col-sm-10">
							<select name="banner_id" id="input-banner" class="form-control">
								{% for banner in banners %}
									{% if banner.banner_id == banner_id %}
									<option value="{{ banner.banner_id }}" selected="selected">{{ banner.name }}</option>
									{% else %}
									<option value="{{ banner.banner_id }}">{{ banner.name }}</option>
									{% endif %}
								{% endfor %}
							</select>
						</div>
					</div>
					{% for i in ['mob', 'desktop'] %}
					<div class="form-group">
						<label class="col-sm-2 control-label">{{ entry_width_height }} - {{ i == 'mob' ? 'Мобильный' : 'Десктоп' }}</label>
						<div class="col-sm-10">
							<input type="text" name="sizes[{{ i }}][width]" value="{{ sizes[i].width ? sizes[i].width : 500 }}" placeholder="" class="form-control" style="float:left;width:80px;text-align:center" />
							<div style="float:left;padding:8px 5px 0">x</div>
							<input type="text" name="sizes[{{ i }}][height]" value="{{ sizes[i].height ? sizes[i].height : 500 }}" placeholder="" class="form-control" style="float:left;width:80px;text-align:center" />
						</div>
					</div>
					{% endfor %}
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-twig"><span data-toggle="tooltip" title="{{ entry_twig_help }}">{{ entry_twig }}</span></label>
						<div class="col-sm-10" >
							<div style="display:flex;align-items: center">store/view/theme/{{ THEME }}/extension/module/<input style="width:300px;margin: 0 4px" type="text" name="twig" value="{{ twig ? twig : 'wd_banners' }}" placeholder="{{ entry_twig }}" id="input-twig" class="form-control" />.twig</div>
							{% if error_twig %}
								<div class="text-danger">{{ error_twig }}</div>
							{% endif %}
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-include"><span data-toggle="tooltip" title="{{ entry_include_help }}">{{ entry_include }}</span></label>
						<div class="col-sm-10">
							<textarea name="include" value="" placeholder="" id="input-include" class="form-control"/>{{ include ? include : '' }}</textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-name">{{ entry_hide }}</label>
						<div class="col-sm-10">
							<input type="checkbox" name="hide" {{ hide ? 'checked="checked"' }} class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
						<div class="col-sm-10">
							<select name="status" id="input-status" class="form-control">
								<option value="1" {{ status ? 'selected="selected"' }}>{{ text_enabled }}</option>
								<option value="0" {{ status == 0 ? 'selected="selected"' }}>{{ text_disabled }}</option>
							</select>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{{ footer }}
