jhipster-sample-app/src/main/webapp/scripts/app/admin/user-management/user-management-dialog.html

108 lines
4.8 KiB
HTML

<form name="editForm" role="form" novalidate ng-submit="save()" show-validation>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"
ng-click="clear()">&times;</button>
<h4 class="modal-title" id="myUserLabel" translate="user-management.home.createOrEditLabel">
Create or edit a User</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label translate="global.field.id">ID</label>
<input type="text" class="form-control" name="id"
ng-model="user.id" readonly>
</div>
<div class="form-group">
<label translate="user-management.login">Login</label>
<input type="text" class="form-control" name="login"
ng-model="user.login" ng-required="user.id == null" ng-maxlength="50">
<div ng-show="editForm.login.$invalid">
<p class="help-block"
ng-show="editForm.login.$error.required" translate="entity.validation.required">
This field is required.
</p>
<p class="help-block"
ng-show="editForm.login.$error.maxlength" translate="entity.validation.maxlength"
translate-value-max="50">
This field cannot be longer than 50 characters.
</p>
</div>
</div>
<div class="form-group">
<label translate="user-management.firstName">FirstName</label>
<input type="text" class="form-control" name="firstName"
ng-model="user.firstName" ng-maxlength="50">
<div ng-show="editForm.firstName.$invalid">
<p class="help-block"
ng-show="editForm.firstName.$error.maxlength" translate="entity.validation.maxlength"
translate-value-max="50">
This field cannot be longer than 50 characters.
</p>
</div>
</div>
<div class="form-group">
<label translate="user-management.lastName">LastName</label>
<input type="text" class="form-control" name="lastName"
ng-model="user.lastName" ng-maxlength="50">
<div ng-show="editForm.lastName.$invalid">
<p class="help-block"
ng-show="editForm.lastName.$error.maxlength" translate="entity.validation.maxlength"
translate-value-max="50">
This field cannot be longer than 50 characters.
</p>
</div>
</div>
<div class="form-group">
<label translate="user-management.email">Email</label>
<input type="text" class="form-control" name="email"
ng-model="user.email" required ng-maxlength="100">
<div ng-show="editForm.email.$invalid">
<p class="help-block"
ng-show="editForm.email.$error.required" translate="entity.validation.required">
This field is required.
</p>
<p class="help-block"
ng-show="editForm.email.$error.maxlength" translate="entity.validation.maxlength"
translate-value-max="100">
This field cannot be longer than 100 characters.
</p>
</div>
</div>
<div class="form-group">
<label for="activated">
<input type="checkbox" id="activated" ng-model="user.activated">
<span translate="user-management.activated">Activated</span>
</label>
</div>
<div class="form-group">
<label translate="user-management.langKey">LangKey</label>
<select class="form-control" name="langKey" ng-model="user.langKey"
ng-options="language as language for language in languages track by language">
</select>
</div>
<div class="form-group">
<label translate="user-management.profiles">Profiles</label>
<select class="form-control" multiple name="authority" ng-model="user.authorities"
ng-options="authority for authority in authorities">
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="clear()">
<span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span
translate="entity.action.cancel">Cancel</span>
</button>
<button type="submit" ng-disabled="editForm.$invalid || isSaving" class="btn btn-primary">
<span class="glyphicon glyphicon-save"></span>&nbsp;<span translate="entity.action.save">Save</span>
</button>
</div>
</form>