{{ header }}{{ column_left }} 
<div id="content">
	<div class="page-header">
		<div class="container-fluid">
			<div class="pull-right">
				<button type="submit" form="form" 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>
			<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 %}
		<script>
			usNotify('warning', '{{ error_warning }}');
		</script>
		{% endif %}
		{% if success %}
	    <script>
			usNotify('success', '{{ success }}');
		</script>
	    {% 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" class="form-horizontal">
					<div class="tab-content">
						<div class="form-group">
							<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
							<div class="col-sm-10">
								<div class="toggle-group">
									<input type="checkbox" name="oct_policy_status" {% if oct_policy_status %}checked="checked"{% endif %} id="oct_policy_status" tabindex="1">
									<label for="oct_policy_status"></label>
									<div class="onoffswitch pull-left" aria-hidden="true">
										<div class="onoffswitch-label">
											<div class="onoffswitch-inner"></div>
											<div class="onoffswitch-switch"></div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div id="all_settings" {% if (oct_policy_status is not defined or (oct_policy_status is defined and not oct_policy_status)) %}style="display:none"{% endif %}>
							<ul class="nav nav-tabs" id="language">
								{% for language in languages %} 
								<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
								{% endfor %} 
							</ul>
							<div class="tab-content">
								{% for language in languages %} 
								<div class="tab-pane" id="language{{ language.language_id }}">
									<div class="form-group">
										<label class="col-sm-2 control-label" for="input-text{{ language.language_id }}">{{ entry_text }}</label>
										<div class="col-sm-10">
											<textarea name="oct_policy_data[module_text][{{ language.language_id }}]" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control" placeholder="{{ entry_text }}" id="input-text{{ language.language_id }}">{{ oct_policy_data.module_text[language.language_id] is defined ? oct_policy_data.module_text[language.language_id] : '' }}</textarea>
										</div>
									</div>
								</div>
								{% endfor %}
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label" for="input-day">{{ entry_value }}</label>
								<div class="col-sm-10">
									<input type="text" name="oct_policy_data[value]" value="{{ (oct_policy_data.value is defined and oct_policy_data.value) ? oct_policy_data.value : 'oct_policy' }}" id="input-day" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label" for="input-day"><span data-toggle="tooltip" title="{{ entry_helper_max_day }}">{{ entry_max_day }}</span></label>
								<div class="col-sm-10">
									<input type="text" name="oct_policy_data[max_day]" value="{{ oct_policy_data.max_day }}" id="input-day" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label" for="select-oct_policy_data_indormation_id">{{ entry_link }}</label>
								<div class="col-sm-10">
									<select id="select-oct_policy_data_indormation_id" name="oct_policy_data[indormation_id]" class="form-control">
										<option value=""> -- </option>
										{% for information in informations %}
										<option value="{{ information.information_id }}" {% if oct_policy_data.indormation_id == information.information_id %}selected="selected"{% endif %}>{{ information.title }}</option>
										{% endfor %}
									</select>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
<script>
$('#oct_policy_status').change(function() {
	var $input = $(this);

	if ($input.is(":checked")) {
		$("#all_settings").slideDown('slow');
	} else {
		$("#all_settings").slideUp('slow');
	}
});

$('#language a:first').tab('show');
</script>
{{ footer }}