<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') }}">

<!--BEGIN INPUT TEXT FIELDS-->
<div class="row">
	<div class="col-lg-12">
		<form class="form-horizontal" id="group-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="{{ @res_user->_id==null}}">
							<true>
								{{ @lang_create_a_new_user }}
							</true>
							<false>
								{{ @lang_edit }} - {{ @res_user->username }} <small>| {{ @lang_last_updated }} {{ @time_last_updated }}</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_user }} <small>| {{ @lang_user_settings_and_description }}</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="username" class="tips control-label col-lg-3" title="{{ @lang_enter_in_a_username_or_advertiser_description }}.">* {{ @lang_username }}</label>
									<div class="col-lg-8">
										<input class="form-control" type="text" id="username" name="username" value="{{ @res_user->username }}" maxlength="256" />
									</div>
								</div><!-- /.form-group -->
								<div class="form-group">
									<label for="mail" class="tips control-label col-lg-3" title="{{ @lang_enter_in_an_email_address }}.">{{ @lang_email_address }}</label>
									<div class="col-lg-8">
										<input class="form-control" type="text" id="mail" name="mail" value="{{ @res_user->mail }}" 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_user }}.">{{ @lang_user_notes }}</label>
									<div class="col-lg-8">
										<textarea id="notes" name="notes" class="form-control">{{ @res_user->notes }}</textarea>
									</div>
								</div><!-- /.form-group -->
								<div class="form-group">
									<label for="role" class="tips control-label col-lg-3"
									       title="{{ @lang_select_the_users_role }}.">{{ @lang_role }}</label>
									<div class="col-lg-4">
										<select id="role" name="role" data-placeholder="Select a {{ @lang_role }}" class="form-control chzn-select">
											<repeat group="{{ @roles }}" value="{{ @role }}">
												<option value="{{ @role->id }}" <check if="{{ @role->id == @res_user->role }}">selected</check>>{{ @role->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_optional_user_password }} <small>| {{ @lang_enter_and_confirm_the_password_if_you_want_them_to_login }}</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="allow_login" class="tips control-label col-lg-3"
									       title="{{ @lang_select_yes_to_allow_this_user_to_login__then_set_the_password_ }}">{{ @lang_allow_user_login }}</label>
									<div class="col-lg-5">
										<input type="hidden" name="allow_login" value="0">
										<input id="allow_login" name="allow_login" type="checkbox" value="1" <check if="{{ !empty(@res_user->password) }}">checked</check>
										class="switch-small"
										data-on="success" data-off="danger"
										data-on-label="{{ @lang_yes }}" data-off-label="{{ @lang_no }}">
									</div>
								</div><!-- /.form-group -->
								<div class="form-group">
									<label for="password_one" class="tips control-label col-lg-3" title="{{ @lang_enter_in_a_password }}.">{{ @lang_password }}</label>
									<div class="col-lg-8">
										<input class="form-control" type="password" id="password_one" name="password_one" value="" maxlength="256" />
									</div>
								</div><!-- /.form-group -->
								<div class="form-group">
									<label for="password_confirm" class="tips control-label col-lg-3" title="{{ @lang_confirm_the_password }}.">{{ @lang_confirm_password }}</label>
									<div class="col-lg-8">
										<input class="form-control" type="password" id="password_confirm" name="password_confirm" value="" maxlength="256" />
									</div>
								</div><!-- /.form-group -->
							</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" name="save">{{ @lang_save }}</button>&nbsp;
						<a href="index.php?users&list " class="btn btn-sm btn-metis-5">{{ @lang_cancel }}</a>
						<div><br /></div>
					</div>
				</div>

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