<dtml-var manage_page_header>

<main class="container-fluid">

	<dtml-var "manage_form_title(this(), _, form_title='Add User')">

	<p class="form-help">
		To add a new user, enter the name <dtml-unless remote_user_mode__>
		,password, confirmation</dtml-unless> and roles for the new user and
		click &quot;Add&quot;. <em>Domains</em> is an optional list of domains
		from which the user is allowed to login.
	</p>

	<form action="manage_users" method="post" class="zmi-user">

		<div class="form-group row">
			<label for="name" class="form-label col-sm-3 col-md-2">Name</label>
			<div class="col-sm-9 col-md-10">
				<input id="name" class="form-control " type="text" name="name" />
			</div>
		</div>

		<dtml-if remote_user_mode__>
			<input type="hidden" name="password" value="password" />
			<input type="hidden" name="confirm"  value="password" />

		<dtml-else>
			<div class="form-group row">
				<label for="pw" class="form-label col-sm-3 col-md-2">Password</label>
				<div class="col-sm-9 col-md-10">
					<input id="pw" class="form-control" type="password" name="password" size="30" />
				</div>
			</div>

			<div class="form-group row">
					<label for="confirm" class="form-label col-sm-3 col-md-2">(Confirm)</label>
					<div class="col-sm-9 col-md-10">
						<input id="confirm" class="form-control" type="password" name="confirm" />
					</div>
			</div>
		</dtml-if>

		<div class="form-group row">
			<label for="domains" class="form-label col-sm-3 col-md-2">Domains</label>
			<div class="col-sm-9 col-md-10">
				<input id="domains" class="form-control" type="text" name="domains:tokens" value="" />
			</div>
		</div>

		<div class="form-group row">
			<label for="roles" class="form-label col-sm-3 col-md-2">Roles</label>
			<div class="col-sm-9 col-md-10">
				<select id="roles" class="form-control" name="roles:list" size="5" multiple>
					<dtml-in valid_roles
						><dtml-if expr="_vars['sequence-item'] != 'Authenticated'"
								><dtml-if expr="_vars['sequence-item'] != 'Anonymous'"
									><dtml-if expr="_vars['sequence-item'] != 'Shared'"
										><option value="&dtml-sequence-item;">&dtml-sequence-item;</dtml-if
								></dtml-if
						></dtml-if
					></dtml-in
				></select>
			</div>
		</div>

		<div class="zmi-controls">
			<input class="btn btn-primary" type="submit" name="submit" value="Add" />
		</div>

	</form>

</main>

<dtml-var manage_page_footer>
