<div>
	<div>
		<div class="whapp-header clearfix">
			{{#if data.id}}
				<h1>{{ i18n.callflows.device.edit_cell_phone }}</h1>
			{{else}}
				<h1>{{ i18n.callflows.device.add_a_cell_phone }}</h1>
			{{/if}}
			<div class="buttons-right pasted view-buttons">
				<button class="btn black basic activate">{{ i18n.callflows.device.basic }}</button>
				<button class="btn black advanced">{{ i18n.callflows.device.advanced }}</button>
			</div>
		</div>
	</div>
	<div>
		<ul class="tabs" data-tabs="tabs">
			<li class="active"><a href="#basic">{{ i18n.callflows.device.basic }}</a></li>
			<li><a href="#options"><i class="fa fa-wrench"></i>{{ i18n.callflows.device.options }}</a></li>
		</ul>
		<form id="device-form" action="" method="post">
			<div class="pill-content">
				<div class="active basic_view" id="basic">
					<div class="clearfix">
						<label for="name">{{ i18n.callflows.device.name }}</label>
						<div class="input">
							<input class="span4" id="name" name="name" type="text" placeholder="{{ i18n.callflows.device.name }}" value="{{ data.name }}" rel="popover" data-content="{{ i18n.callflows.device.name_data_content }}" required/>
						</div>
					</div>

					{{#unless field_data.hide_owner}}
						<div class="clearfix">
							<label for="owner_id">{{ i18n.callflows.device.belongs_to }}</label>
							<div class="input">
								<span rel="popover" data-content="{{ i18n.callflows.device.belongs_to_data_content }}">
									<select name="owner_id" id="owner_id" class="medium">
										{{#select data.owner_id}}
											{{#each field_data.users}}
												<option value="{{ id }}" id="{{ id }}">{{ first_name }} {{ last_name }}</option>
											{{/each}}
										{{/select}}
									</select>
									<div class="edit_create">
										<a id="edit_link" class="inline_action" data-action="edit" href="#">{{ i18n.callflows.device.edit }}</a>
										<a class="inline_action" data-action="create" href="#">{{ i18n.callflows.device.create }}</a>
									</div>
								</span>
							</div>
						</div>
					{{/unless}}

					<div class="clearfix">
						<label for="call_forward_number">{{ i18n.callflows.device.number }}</label>
						<div class="input">
							<input class="span4" id="call_forward_number" name="call_forward.number" type="text" placeholder="{{ i18n.callflows.device.number }}" value="{{ data.call_forward.number }}" rel="popover" data-content="{{ i18n.callflows.device.number_data_content }}"/>
						</div>
					</div>

					<div class="clearfix">
						<div class="input">
							<ul class="inputs-list">
								<li>
									<label>
										<span rel="popover" data-content="{{ i18n.callflows.device.enabled_data_content }}">
											<input type="checkbox" id="call_forward_enabled" name="call_forward.enabled"{{#if data.call_forward.enabled}} checked="checked"{{/if}}/>
											<span>{{ i18n.callflows.device.enabled }}</span>
										</span>
									</label>
								</li>
							</ul>
						</div>
					</div>
					<input type="hidden" value="{{ data.device_type }}" name="device_type"/>
					<input type="hidden" value="false" name="extra.notify_unregister"/>
				</div>

				<div id="options">
					<div class="clearfix">
						<div class="input">
							<ul class="inputs-list">
								<li>
									<label>
										<span rel="popover" data-content="{{ i18n.callflows.device.require_key_press_data_content }}">
											<input type="checkbox" id="call_forward_require_keypress" name="call_forward.require_keypress"{{#if data.call_forward.require_keypress}} checked="checked"{{/if}} />
											<span>{{ i18n.callflows.device.require_key_press }}</span>
										</span>
									</label>
								</li>
							</ul>
						</div>
					</div>

					<div class="clearfix">
						<div class="input">
							<ul class="inputs-list">
								<li>
									<label>
										<span rel="popover" data-content="{{ i18n.callflows.device.keep_caller_id_data_content }}">
											<input type="checkbox" id="call_forward_keep_caller_id" name="call_forward.keep_caller_id"{{#if data.call_forward.keep_caller_id}} checked="checked"{{/if}}/>
											<span>{{ i18n.callflows.device.keep_caller_id }}</span>
										</span>
									</label>
								</li>
							</ul>
						</div>
					</div>

					<div class="clearfix">
						<div class="input">
						   <ul class="inputs-list">
							   <li>
									<label>
										<span rel="popover" data-content="{{ i18n.callflows.device.hide_from_contact_list_data_content }}">
											<input id="contact_list_exclude" type="checkbox" name="contact_list.exclude"{{#if data.contact_list.exclude}} checked="checked"{{/if}} />
											<span>{{ i18n.callflows.device.hide_from_contact_list }}</span>
										</span>
									</label>
								</li>
							</ul>
					   </div>
					</div>
				</div>
			</div>
		</form>
		<div class="buttons-wrapper">
			{{#if data.id}}
				<button class="monster-button monster-button-danger device-delete">{{ i18n.delete }}</button>
			{{/if}}
			<button class="monster-button monster-button-success device-save">{{ i18n.save }}</button>
		</div>
	</div>
</div>
