This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit d201394883cc97f8a341518bcdf047507c39296b Author: Léo Kaufmann <kaufmann@codelutin.com> Date: Wed Jan 21 19:18:25 2015 +0100 Refs #6440 : Update display of user edition page --- coselmar-ui/src/main/webapp/css/coselmar.css | 6 +++ .../src/main/webapp/views/users/edituser.html | 46 ++++++++++++---------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/coselmar-ui/src/main/webapp/css/coselmar.css b/coselmar-ui/src/main/webapp/css/coselmar.css index 9eb9569..5e49ddb 100644 --- a/coselmar-ui/src/main/webapp/css/coselmar.css +++ b/coselmar-ui/src/main/webapp/css/coselmar.css @@ -146,6 +146,12 @@ h1, h2 { background-color: #d9534f; } +/* Forms +-------------------------------------------------- */ +.requiredField { + border-color: #a94442; +} + /* Override Boostrap default classes -------------------------------------------------- */ .btn-primary { diff --git a/coselmar-ui/src/main/webapp/views/users/edituser.html b/coselmar-ui/src/main/webapp/views/users/edituser.html index b58bb40..4faee3c 100644 --- a/coselmar-ui/src/main/webapp/views/users/edituser.html +++ b/coselmar-ui/src/main/webapp/views/users/edituser.html @@ -128,7 +128,7 @@ <div class="form-group" ng-if="currentUser && currentUser.userId == user.id" ng-class="{'has-error' : userForm.password.$invalid && !userForm.password.$pristine}"> - <label class="col-md-4 control-label">Tape your current password to validate</label> + <label class="col-md-4 control-label">Tape your current password to validate the modifications *</label> <div class="col-md-5"> <input type="password" class="form-control" name="password" @@ -145,32 +145,36 @@ || userForm.confirmNewPassword.$error.identicalmatch }"> <label class="col-md-4 control-label">New Password</label> - + <div class="col-md-5"> - <input type="password" class="form-control" name="newPassword" - id="newPassword" placeholder="new password" - ng-model="user.newPassword" ng-minlength="6" /> - - <input type="password" class="form-control" name="confirmNewPassword" - id="confirmPassword" placeholder="confirm password" - ng-model="confirmNewPassword" ng-minlength="6" - identical-check="newPassword" - ng-class="{'has-error' : userForm.confirmNewPassword.$error.identicalmatch }"/> - - <p ng-show="userForm.newPassword.$invalid && !userForm.newPassword.$pristine" class="help-block"> - New password should contain at least 6 characters. - {{userForm.newPassword.$error}} - </p> - <p ng-show="userForm.confirmNewPassword.$error.identicalmatch" class="help-block"> - The two new passwords don't match. - </p> + <input type="checkbox" ng-model="newPasswordAsked">I want to change the password<br/> + + <div ng-show="newPasswordAsked"> + <input type="password" class="form-control" name="newPassword" + id="newPassword" placeholder="new password" + ng-model="user.newPassword" ng-minlength="6" /> + + <input type="password" class="form-control" name="confirmNewPassword" + id="confirmPassword" placeholder="confirm password" + ng-model="confirmNewPassword" ng-minlength="6" + identical-check="newPassword" + ng-class="{'has-error' : userForm.confirmNewPassword.$error.identicalmatch }"/> + + <p ng-show="userForm.newPassword.$invalid && !userForm.newPassword.$pristine" class="help-block"> + New password should contain at least 6 characters. + {{userForm.newPassword.$error}} + </p> + <p ng-show="userForm.confirmNewPassword.$error.identicalmatch" class="help-block"> + The two new passwords don't match. + </p> + </div> </div> </div> - <div class="form-group" ng-if="userForm.$valid || currentUser.role == 'ADMIN'"> + <div class="form-group"> <div class="float-right col-md-4"> - <input type="submit" value="Validate" class="btn btn-primary"/> + <input type="submit" value="Validate" class="btn btn-primary" ng-disabled="userForm.$invalid"/> </div> </div> </form> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.