35 lines
2.3 KiB
HTML
35 lines
2.3 KiB
HTML
|
|
<div class="row">
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6">
|
|
|
|
<h1>Create User</h1>
|
|
<form name="createuser_form" class="form-signin" role="form" novalidate ng-submit="submit()" autocomplete="off">
|
|
<fieldset>
|
|
<div class="form-group" ng-class="{ 'has-error': (createuser_form.username.$dirty && createuser_form.username.$invalid) || alreadyTaken }">
|
|
<label class="control-label" for="inputUsername">Username</label>
|
|
<div class="control-label" ng-show="(createuser_form.username.$dirty && createuser_form.username.$invalid) || alreadyTaken">
|
|
<small ng-show="createuser_form.username.$error.required">A username is required</small>
|
|
<small ng-show="createuser_form.username.$error.minlength">The username is too short</small>
|
|
<small ng-show="createuser_form.username.$error.maxlength">The username is too long</small>
|
|
<small ng-show="alreadyTaken && alreadyTaken === username">The username is already taken</small>
|
|
</div>
|
|
<input type="text" class="form-control" ng-model="username" id="inputUsername" name="username" ng-maxlength="512" ng-minlength="3" required autofocus>
|
|
</div>
|
|
<div class="form-group" ng-class="{ 'has-error': createuser_form.email.$dirty && createuser_form.email.$invalid }">
|
|
<label class="control-label" for="inputEmail">Email</label>
|
|
<div class="control-label" ng-show="createuser_form.email.$dirty && createuser_form.email.$invalid">
|
|
<small ng-show="createuser_form.email.$error.required">An email is required</small>
|
|
<small ng-show="createuser_form.email.$error.email">This is not a valid email</small>
|
|
</div>
|
|
<input type="email" class="form-control" ng-model="email" id="inputEmail" name="email" required>
|
|
</div>
|
|
<input class="btn btn-default btn-outline" ng-click="cancel()" type="button" value="Cancel"/>
|
|
<input class="btn btn-primary btn-outline pull-right" type="submit" ng-disabled="createuser_form.$invalid || alreadyTaken === username" value="Create User"/>
|
|
</fieldset>
|
|
</form>
|
|
|
|
</div>
|
|
<div class="col-md-3"></div>
|
|
</div>
|