<topnav icon="fa fa-fw fa-user" title="Global Users" subnav="true">
	<ul class="nav">
		<li><a href="admin/users">Users</a></li>
		<li><a href="admin/users/create">Create user</a></li>
		<li class="active"><a href="admin/users/edit/{{user_id}}">Edit user</a></li>
	</ul>
</topnav>

<div class="page-container">
	<div class="page">
		<h2>
			User details
		</h2>

		<form name="userForm">
			<div>
				<div class="tight-form">
					<ul class="tight-form-list">
						<li class="tight-form-item" style="width: 100px">
							<strong>Name</strong>
						</li>
						<li>
							<input type="text" required ng-model="user.name" class="input-xxlarge tight-form-input last" >
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
				<div class="tight-form" style="margin-top: 5px">
					<ul class="tight-form-list">
						<li class="tight-form-item" style="width: 100px">
							<strong>Email</strong>
						</li>
						<li>
							<input type="email" ng-model="user.email" class="input-xxlarge tight-form-input last" >
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
				<div class="tight-form" style="margin-top: 5px">
					<ul class="tight-form-list">
						<li class="tight-form-item" style="width: 100px">
							<strong>Username</strong>
						</li>
						<li>
							<input type="text" ng-model="user.login" class="input-xxlarge tight-form-input last" >
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
			</div>

			<br>
			<button type="submit" class="pull-right btn btn-success" ng-click="update()" ng-show="!createMode">Update</button>
		</form>

		<h2>
			Change password
		</h2>

		<form name="passwordForm">
			<div>
				<div class="tight-form">
					<ul class="tight-form-list">
						<li class="tight-form-item" style="width: 100px">
							<strong>New password</strong>
						</li>
						<li>
							<input type="password" required ng-minlength="4" ng-model="password" class="input-xxlarge tight-form-input last">
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
			</div>

			<br>
			<button type="submit" class="pull-right btn btn-success" ng-click="setPassword()">Update</button>
		</form>

		<h2>
			Permissions
		</h2>

		<div class="tight-form last">
			<ul class="tight-form-list">
				<li class="tight-form-item last">
					Grafana Admin&nbsp;
					<input class="cr1" id="permissions.isGrafanaAdmin" type="checkbox"
					ng-model="permissions.isGrafanaAdmin" ng-checked="permissions.isGrafanaAdmin">
					<label for="permissions.isGrafanaAdmin" class="cr1"></label>
				</li>
			</ul>
			<div class="clearfix"></div>
		</div>
		<br>
		<button type="submit" class="pull-right btn btn-success" ng-click="updatePermissions()">Update</button>

	</div>
</div>
