<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/bootstrap-switch/css/bootstrap-switch.min.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/validationengine/css/validationEngine.jquery.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/summernote/css/summernote.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/chosen/css/chosen.min.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/tagsinput/css/jquery.tagsinput.css') }}">
<link rel="stylesheet" href="{{ IncludeAsset('assets/lib/jquery-file-upload/css/jquery.fileupload.css') }}">

<!--BEGIN INPUT TEXT FIELDS-->
<div class="row">
<div class="col-lg-12">
<form class="form-horizontal" id="ad-edit" enctype="multipart/form-data" method="post">
<div class="box dark">
	<header>
		<div class="icons">
			<i class="fa fa-edit"></i>
		</div>
		<h5>
			<check if="{{ empty(@res_sale->_id) }}">
				<true>
					{{ @lang_create_a_new_sales_spot }}
				</true>
				<false>
					{{ @lang_edit }} - {{ @res_sale->title }} <small>| {{ @lang_last_updated }} {{ @time_last_updated }} {{ @lang_by }} {{ @res_sale->user_id->username }}</small>
				</false>
			</check>

		</h5>
	</header>

	<!-- form section -->
	<div class="row">
		<div class="col-lg-1">
			&nbsp;
		</div>
		<div class="col-lg-10">

			<div class="box dark">
				<header>
					<h5>
						{{ @lang_about_the_sales_spot }} <small>| {{ @lang_sales_spot_description_and_settings }}</small>
					</h5>
					<!-- .toolbar -->
					<div class="toolbar">
						<ul class="nav">
							<li>
								<a class="minimize-box" data-toggle="collapse" href="#div-1">
									<i class="fa fa-chevron-up"></i>
								</a>
							</li>
						</ul>
					</div><!-- /.toolbar -->
				</header>

				<div id="div-1" class="accordion-body collapse in body">
					<div class="form-group">
						<label for="status" class="tips control-label col-lg-3"
						       title="{{ @lang_select_off_to_disable_the_ad_spot }}.">{{ @lang_status }}</label>
						<div class="col-lg-5">
							<input type="hidden" name="status" value="0">
							<input id="status" name="status" type="checkbox" value="1" <check if="{{ @res_sale->status }}">checked</check>
							class="switch-small"
							data-on="success" data-off="danger"
							data-on-label="{{ @lang_on }}" data-off-label="{{ @lang_off }}">
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="title" class="tips control-label col-lg-3" title="{{ @lang_enter_in_a_title_for_the_sales_spot__this_is_listed_on_the_sales_page }}.">* {{ @lang_sales_spot_title }}</label>
						<div class="col-lg-8">
							<input class="form-control" type="text" id="title" name="title" value="{{ @res_sale->title }}" maxlength="256" />
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="notes" class="tips control-label col-lg-3" title="{{ @lang_enter_in_any_notes_for_the_sales_spot }}."> {{ @lang_notes }}</label>
						<div class="col-lg-8">
							<textarea id="notes" name="notes" class="form-control">{{ @res_sale->notes }}</textarea>
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="fill_group" class="tips control-label col-lg-3"
						       title="{{ @lang_optionally__select_a_fill_group__the_ads_from_this_group_will_display_when_all_spots_are_not_filled }}.">{{ @lang_fill_group }}</label>
						<div class="col-lg-5">
							<select id="fill_group" name="fill_group" data-placeholder="{{ @lang_select_a_fill_group }}" class="form-control chzn-select-deselect">
								<option value = "" <check if="{{ empty(@res_sale->fill_group) }}">selected</check>></option>
								<repeat group="{{ @res_groups }}" value="{{ @res_group }}">
									<option value="{{ @res_group->_id }}" <check if="{{ ((!empty(@res_sale->fill_group)) && (@res_group->_id == @res_sale->fill_group->_id)) }}">selected</check>>{{ @res_group->title }}</option>
								</repeat>
							</select>
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="max_spots" class="tips control-label col-lg-3" title="{{ @lang_maximum_number_of_ads_in_this_spot }}.">* {{ @lang_max_spots }}</label>
						<div class="col-lg-2">
							<input class="form-control" type="text" id="max_spots" name="max_spots" value="{{ @res_sale->max_spots }}" />
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="default_weight" class="tips control-label col-lg-3" title="{{ @lang_if_you_change_the_default_weight_from_10__the_ads_will_be_sorted_with_your_fill_group_ }} {{ @lang_if_left_at_10__they_will_always_be_displayed_before_the_fill_group_ads_ }}"> {{ @lang_default_weight }}</label>
						<div class="col-lg-2">
							<input class="form-control" type="text" id="default_weight" name="default_weight" value="{{ @res_sale->default_weight }}" />
						</div>
					</div><!-- /.form-group -->
				</div>
			</div>
		</div>
	</div>
	<!-- /form section -->

	<!-- form section -->
	<div class="row">
		<div class="col-lg-1">
			&nbsp;
		</div>
		<div class="col-lg-10">
			<div class="box dark">
				<header>
					<h5>
						{{ @lang_sales_spot_type }} <small>| {{ @lang_sales_spot_type }} {{ @lang_settings }}</small>
					</h5>
					<!-- .toolbar -->
					<div class="toolbar">
						<ul class="nav">
							<li>
								<a class="minimize-box" data-toggle="collapse" href="#div-2">
									<i class="fa fa-chevron-up"></i>
								</a>
							</li>
						</ul>
					</div><!-- /.toolbar -->
				</header>

				<div id="div-2" class="accordion-body collapse in body">
					<div class="form-group">
						<label for="type" class="tips control-label col-lg-3"
						       title="{{ @lang_select_the_type_of_ad_for_this_spot }}.">* {{ @lang_ad_type }}</label>
						<div class="col-lg-5">
							<select id="type" name="type" data-placeholder="{{ @lang_select_the_ad_type }}" class="form-control chzn-select">
								<option value = "" <check if="{{ empty(@res_sale->type) }}">selected</check>></option>
								<repeat group="{{ @types }}" value="{{ @type }}">
									<option value="{{ @type.type }}" <check if="{{ @type.type == @res_sale->type }}">selected</check>>{{ @type.name }}</option>
								</repeat>
							</select>
						</div>
					</div><!-- /.form-group -->

					<div id="type_banner" style="<check if="{{ @res_sale->type != 'banner' }}">display: none;</check>">
					<div class="form-group">
						<label for="banners_width" class="tips control-label col-lg-3" title="{{ @lang_width_of_the_banner }}.">{{ @lang_banner_width }}</label>
						<div class="col-lg-2">
							<input class="form-control" type="number" id="banners_width" min="0" name="banners_width" value="{{ @res_sale->banners_width }}" />
						</div>
					</div><!-- /.form-group -->
					<div class="form-group">
						<label for="banners_height" class="tips control-label col-lg-3" title="{{ @lang_height_of_the_banner }}.">{{ @lang_banner_height }}</label>
						<div class="col-lg-2">
							<input class="form-control" type="number" id="banners_height" min="0" name="banners_height" value="{{ @res_sale->banners_height }}" />
						</div>
					</div><!-- /.form-group -->
				</div>



			</div>
		</div>
	</div>
</div>
<!-- /form section -->

<!-- form section -->
<div class="row">
	<div class="col-lg-1">
		&nbsp;
	</div>
	<div class="col-lg-10">

		<div class="box dark">
			<header>
				<h5>
					{{ @lang_pricing }} <small>| {{ @lang_pricing_settings }}</small>
				</h5>
				<!-- .toolbar -->
				<div class="toolbar">
					<ul class="nav">
						<li>
							<a class="minimize-box" data-toggle="collapse" href="#div-3">
								<i class="fa fa-chevron-up"></i>
							</a>
						</li>
					</ul>
				</div><!-- /.toolbar -->
			</header>

			<div id="div-3" class="accordion-body collapse in body">
				<div class="form-group">
					<label for="pricing_cost" class="tips control-label col-lg-3" title="{{ @lang_enter_the_price_for_an_ad_in_the_spot__then_select_the_currency }}.">* {{ @lang_price_for_spot }}</label>
					<div class="col-lg-2">
						<input class="form-control" type="text" placeholder="0.00" id="pricing_cost" name="pricing_cost" value="{{ @res_sale->pricing_cost }}" />
					</div>
					<div class="col-lg-3">
						<select id="pricing_currency" name="pricing_currency" data-placeholder="{{ @lang_select_the_currency }}" class="form-control chzn-select">
							<option value = "" <check if="{{ empty(@res_sale->pricing_currency) }}">selected</check>></option>
							<repeat group="{{ @currencies }}" value="{{ @currency }}">
								<option value="{{ @currency.type }}" <check if="{{ @currency.type == @res_sale->pricing_currency }}">selected</check>>{{ @currency.name }}</option>
							</repeat>
						</select>
					</div>
				</div><!-- /.form-group -->
				<div class="form-group">
					<label for="pricing_type" class="tips control-label col-lg-3"
					       title="{{ @lang_select_the_price_per }} {{ @lang_model }}.">* {{ @lang_per }}</label>
					<div class="col-lg-5">
						<select id="pricing_type" name="pricing_type" data-placeholder="{{ @lang_select_the_price_per }}" class="form-control chzn-select">
							<option value = "" <check if="{{ empty(@res_sale->pricing_type) }}">selected</check>></option>
							<repeat group="{{ @price_types }}" value="{{ @price_type }}">
								<option value="{{ @price_type.type }}" <check if="{{ @price_type.type == @res_sale->pricing_type }}">selected</check>>{{ @price_type.name }}</option>
							</repeat>
						</select>
					</div>
				</div><!-- /.form-group -->

			</div>
		</div>
	</div>
</div>
<!-- /form section -->

<!-- form section -->
<div class="row">
	<div class="col-lg-1">
		&nbsp;
	</div>
	<div class="col-lg-10">

		<div class="box dark">
			<header>
				<h5>
					{{ @lang_site_settings }} <small>| {{ @lang_description_and_settings_of_the_site_for_the_spot }}</small>
				</h5>
				<!-- .toolbar -->
				<div class="toolbar">
					<ul class="nav">
						<li>
							<a class="minimize-box" data-toggle="collapse" href="#div-4">
								<i class="fa fa-chevron-up"></i>
							</a>
						</li>
					</ul>
				</div><!-- /.toolbar -->
			</header>

			<div id="div-4" class="accordion-body collapse in body">
				<div class="form-group">
					<label for="site_name" class="tips control-label col-lg-3" title="{{ @lang_the_name_of_the_site_that_will_be_listed_on_the_advertising_page }}.">* {{ @lang_site_name }}</label>
					<div class="col-lg-8">
						<input class="form-control" type="text" id="site_name" name="site_name" value="{{ @res_sale->site_name }}" maxlength="256" />
					</div>
				</div><!-- /.form-group -->
				<div class="form-group">
					<label for="site_url" class="tips control-label col-lg-3" title="{{ @lang_the_url_of_the_site_that_will_be_listed_on_the_advertising_page__all_spots_with_this_site_url_will_be_listed_on_the_same_sales_page }}.">* {{ @lang_site_url }}</label>
					<div class="col-lg-8">
						<input class="form-control" placeholder="http://" type="url" id="site_url" name="site_url" value="{{ @res_sale->site_url }}" maxlength="256" />
					</div>
				</div><!-- /.form-group -->
				<div class="form-group">
					<label for="site_contact_url" class="tips control-label col-lg-3" title="{{ @lang_optional_url_where_customers_will_be_sent_when_they_have_any_questions }}.">{{ @lang_site_contact_url }}</label>
					<div class="col-lg-8">
						<input class="form-control" placeholder="http://" type="text" id="site_contact_url" name="site_contact_url" value="{{ @res_sale->site_contact_url }}" maxlength="256" />
					</div>
				</div><!-- /.form-group -->
				<div class="form-group">
					<label for="spot_image_url" class="tips control-label col-lg-3"
					       title="{{ @lang_optionally__add_a_screenshot_image_highlighting_the_spot__try_to_make_it_at_least_than }} 200w x 130h.">{{ @lang_spot_image }}</label>
					<div class="col-lg-8">
						<div class="input-group">
							<input class="form-control" type="text" placeholder="http://" id="spot_image_url" name="spot_image_url" value="{{ @res_sale->spot_image_url }}"/>
							<span class="input-group-btn">

						    <span class="btn btn-sm btn-success fileinput-button">
						        <i class="glyphicon glyphicon-plus"></i> {{ @lang_upload }}
						        <!-- The file input field used as target for the file upload widget -->
						        <input id="fileupload_lg" type="file" name="files_lg[]">
						    </span>

							</span>
						</div>
						<div id="progress_lg" class="progress">
							<div class="progress-bar progress-bar-success"></div>
						</div>
						<!-- The container for the uploaded files -->
						<div id="files_lg" class="files"></div>
					</div>
				</div>

			</div>
		</div>
	</div>
</div>
<!-- /form section -->


<div class="row">
	<div class="col-lg-1">
		&nbsp;
	</div>
	<div class="col-lg-10">
		<br />
		<button type="submit" class="btn btn-success" id="save">{{ @lang_save }}</button>&nbsp;
		<a href="index.php?sales&list " class="btn btn-sm btn-metis-5">{{ @lang_cancel }}</a>
		<div><br /></div>
	</div>
</div>

</form>
</div>
</div>