1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-13 23:48:55 +01:00
fab-manager/app/assets/templates/shared/passwordEditModal.html.erb

55 lines
3.1 KiB
Plaintext
Raw Normal View History

2015-05-05 03:10:25 +02:00
<div>
<div class="modal-header">
2016-03-23 18:39:41 +01:00
<img ng-src="{{logoBlack.custom_asset_file_attributes.attachment_url}}" alt="{{logo.custom_asset_file_attributes.attachment}}" class="modal-logo"/>
<h1 translate>{{ 'change_your_password' }}</h1>
2015-05-05 03:10:25 +02:00
</div>
<div class="modal-body">
2016-03-23 18:39:41 +01:00
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
2015-05-05 03:10:25 +02:00
<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>
2016-03-23 18:39:41 +01:00
<input type="password"
name="password"
ng-model="user.password"
class="form-control"
placeholder="{{ 'your_new_password' | translate }}"
required
ng-minlength="8">
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
<span class="help-block" ng-show="passwordEditForm.password.$dirty && passwordEditForm.password.$error.required" translate>{{ 'password_is_required' }}</span>
2019-04-18 11:35:09 +02:00
<span class="help-block" ng-show="passwordEditForm.password.$dirty && passwordEditForm.password.$error.minlength" translate>{{ 'password_is_too_short' }}</span>
2015-05-05 03:10:25 +02:00
</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>
2016-03-23 18:39:41 +01:00
<input type="password"
name="password_confirmation"
ng-model="user.password_confirmation"
class="form-control"
placeholder="{{ 'type_your_password_again' | translate }}"
required
ng-minlength="8"
match="user.password">
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
<span class="help-block" ng-show="passwordEditForm.password_confirmation.$dirty && passwordEditForm.password_confirmation.$error.required" translate>{{ 'password_confirmation_is_required' }}</span>
<span class="help-block" ng-show="passwordEditForm.password_confirmation.$error.match" translate>{{ 'password_does_not_match_with_confirmation' }}</span>
2015-05-05 03:10:25 +02:00
</div>
</div>
</form>
</div>
<div class="panel-footer no-padder">
2016-03-23 18:39:41 +01:00
<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" translate>{{ 'confirm'}}</button>
2015-05-05 03:10:25 +02:00
</div>
</div>
</div>
2019-04-18 11:35:09 +02:00
</div>