mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
41 lines
2.6 KiB
Plaintext
41 lines
2.6 KiB
Plaintext
<div>
|
|
<div class="modal-header">
|
|
<%= image_tag("fablab-w.png", class: 'modal-logo') %>
|
|
<h1>Modifier votre mot de passe</h1>
|
|
</div>
|
|
<div class="modal-body">
|
|
<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</alert>
|
|
<div class="panel panel-default bg-light">
|
|
<div class="panel-body">
|
|
<form name="passwordEditForm" class="form-horizontal" ng-keydown="passwordEditForm.$valid && $event.which == 13 && changePassword()">
|
|
<div class="form-group" ng-class="{'has-error': passwordEditForm.password.$dirty && passwordEditForm.password.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
|
<input type="password" name="password" ng-model="user.password" class="form-control" placeholder="Votre nouveau mot de passe" required ng-minlength="8">
|
|
</div>
|
|
<span class="help-block" ng-show="passwordEditForm.password.$dirty && passwordEditForm.password.$error.required">Mot de passe est obligatoire</span>
|
|
<span class="help-block" ng-show="passwordEditForm.password.$dirty && passwordEditForm.password.$error.minlength">Mot de passe est trop court (au moins 8 caractères)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-class="{'has-error': passwordEditForm.password_confirmation.$dirty && passwordEditForm.password_confirmation.$invalid}">
|
|
<div class="col-sm-12">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
|
<input type="password" name="password_confirmation" ng-model="user.password_confirmation" class="form-control" placeholder="Resaisissez votre mot de passe" required ng-minlength="8" match="user.password">
|
|
</div>
|
|
<span class="help-block" ng-show="passwordEditForm.password_confirmation.$dirty && passwordEditForm.password_confirmation.$error.required">Mot de passe de confirmation est obligatoire</span>
|
|
<span class="help-block" ng-show="passwordEditForm.password_confirmation.$error.match">Mot de passe ne concorde pas avec la confirmation</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
<div class="panel-footer no-padder">
|
|
<button class="btn btn-valid btn-warning btn-block p-l btn-lg text-u-c r-b" ng-click="changePassword()" ng-disabled="passwordEditForm.$invalid">Valider</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div> |