mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 15:17:57 +01:00
fix angular scope issue + disable LastPass in some forms
This commit is contained in:
parent
f167e8ea0a
commit
6b940c4366
2467
docs-web/src/main/webapp/package-lock.json
generated
Normal file
2467
docs-web/src/main/webapp/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,8 @@ angular.module('docs').controller('SettingsUserEdit', function($scope, $dialog,
|
||||
data.storage_quota /= 1000000;
|
||||
$scope.user = data;
|
||||
});
|
||||
} else {
|
||||
$scope.user = {}; // Very important otherwise ng-if in template will make a new scope variable
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,12 +34,14 @@
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="inputUsername">{{ 'login.username' | translate }}</label>
|
||||
<input class="form-control" type="text" id="inputUsername" ng-attr-placeholder="{{ 'login.username' | translate }}" ng-model="user.username" />
|
||||
<input class="form-control" type="text" id="inputUsername" name="username"
|
||||
ng-attr-placeholder="{{ 'login.username' | translate }}" ng-model="user.username" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="sr-only" for="inputPassword">{{ 'login.password' | translate }}</label>
|
||||
<input class="form-control" type="password" id="inputPassword" ng-attr-placeholder="{{ 'login.password' | translate }}" ng-model="user.password" />
|
||||
<input class="form-control" type="password" id="inputPassword" name="password"
|
||||
ng-attr-placeholder="{{ 'login.password' | translate }}" ng-model="user.password" />
|
||||
</div>
|
||||
|
||||
<span class="help-block" ng-if="codeRequired">
|
||||
@ -48,12 +50,13 @@
|
||||
</span>
|
||||
<div class="form-group" ng-if="codeRequired">
|
||||
<label class="sr-only" for="inputCode">{{ 'login.validation_code' | translate }}</label>
|
||||
<input class="form-control" type="text" id="inputCode" ng-attr-placeholder="{{ 'login.validation_code' | translate }}" ng-model="user.code" />
|
||||
<input class="form-control" type="text" id="inputCode" name="code"
|
||||
ng-attr-placeholder="{{ 'login.validation_code' | translate }}" ng-model="user.code" />
|
||||
</div>
|
||||
|
||||
<div class="checkbox text-muted">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="user.remember" /> {{ 'login.remember_me' | translate }}
|
||||
<input type="checkbox" ng-model="user.remember" name="remember" /> {{ 'login.remember_me' | translate }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
<h1 translate="settings.account.title"></h1>
|
||||
<form class="form-horizontal" name="editUserForm" novalidate>
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.password.$valid && editUserForm.$dirty, success: editUserForm.password.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputPassword">{{ 'settings.account.password' | translate }}</label>
|
||||
<form class="form-horizontal" name="editUserForm" novalidate autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.accountPassword.$valid && editUserForm.$dirty, success: editUserForm.accountPassword.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputAccountPassword">{{ 'settings.account.password' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="password" type="password" id="inputPassword" required class="form-control"
|
||||
<input name="accountPassword" type="password" id="inputAccountPassword" required class="form-control"
|
||||
ng-minlength="8" ng-maxlength="50" ng-attr-placeholder="{{ 'settings.account.password' | translate }}" ng-model="user.password" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.accountPassword.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.accountPassword.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.accountPassword.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.passwordconfirm.$valid && editUserForm.$dirty, success: editUserForm.passwordconfirm.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputPasswordConfirm">{{ 'settings.account.password_confirm' | translate }}</label>
|
||||
<label class="col-sm-2 control-label" for="inputAccountPasswordConfirm">{{ 'settings.account.password_confirm' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="passwordconfirm" type="password" id="inputPasswordConfirm" required class="form-control"
|
||||
<input name="passwordconfirm" type="password" id="inputAccountPasswordConfirm" required class="form-control"
|
||||
ui-validate="'$value == user.password'" ui-validate-watch="'user.password'"
|
||||
ng-attr-placeholder="{{ 'settings.account.password_confirm' | translate }}" ng-model="user.passwordconfirm" />
|
||||
</div>
|
||||
|
@ -65,7 +65,7 @@
|
||||
</button>
|
||||
<button type="submit" class="btn btn-warning" ng-click="testInboxConfig()">
|
||||
<span class="fas fa-pencil-alt"></span> {{ 'settings.inbox.test' | translate }}
|
||||
<span ng-if="testLoading" class="fas fa-circle-notch fa-spin"></>
|
||||
<span ng-if="testLoading" class="fas fa-circle-notch fa-spin"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,37 +4,37 @@
|
||||
<h2 ng-show="isEdit()" translate="settings.user.edit.edit_user_title" translate-values="{ username: user.username }"></h2>
|
||||
<h2 ng-show="!isEdit()" translate="settings.user.edit.add_user_title"></h2>
|
||||
|
||||
<form class="form-horizontal" name="editUserForm" novalidate>
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.username.$valid && editUserForm.$dirty, success: editUserForm.username.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputUsername">{{ 'settings.user.edit.username' | translate }}</label>
|
||||
<form class="form-horizontal" name="editUserForm" novalidate autocomplete="off">
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.userUsername.$valid && editUserForm.$dirty, success: editUserForm.userUsername.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputUserUsername">{{ 'settings.user.edit.username' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="username" type="text" id="inputUsername" required ng-disabled="isEdit()" class="form-control"
|
||||
<input name="userUsername" type="text" id="inputUserUsername" required ng-disabled="isEdit()" class="form-control"
|
||||
ng-minlength="3" ng-maxlength="50" ng-attr-placeholder="{{ 'settings.user.edit.username' | translate }}" ng-model="user.username"/>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<span class="help-block" ng-show="editUserForm.username.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.username.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.username.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userUsername.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userUsername.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userUsername.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.email.$valid && editUserForm.$dirty, success: editUserForm.email.$valid }">
|
||||
<div class="form-group" ng-class="{ 'has-error': !editUserForm.userEmail.$valid && editUserForm.$dirty, success: editUserForm.userEmail.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputEmail">{{ 'settings.user.edit.email' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="email" type="email" id="inputEmail" required class="form-control"
|
||||
<input name="userEmail" type="email" id="inputEmail" required class="form-control"
|
||||
ng-minlength="1" ng-maxlength="100" ng-attr-placeholder="{{ 'settings.user.edit.email' | translate }}" ng-model="user.email"/>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<span class="help-block" ng-show="editUserForm.email.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.email.$error.email && editUserForm.$dirty">{{ 'validation.email' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.email.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.email.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userEmail.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userEmail.$error.email && editUserForm.$dirty">{{ 'validation.email' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userEmail.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userEmail.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="user.groups.length > 0">
|
||||
<div class="form-group" ng-show="user.groups.length > 0">
|
||||
<label class="col-sm-2 control-label">{{ 'settings.user.edit.groups' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<span ng-repeat="group in user.groups">
|
||||
@ -60,17 +60,17 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="user.username != 'guest'"
|
||||
ng-class="{ 'has-error': !editUserForm.password.$valid && editUserForm.$dirty, success: editUserForm.password.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputPassword">{{ 'settings.user.edit.password' | translate }}</label>
|
||||
ng-class="{ 'has-error': !editUserForm.userPassword.$valid && editUserForm.$dirty, success: editUserForm.userPassword.$valid }">
|
||||
<label class="col-sm-2 control-label" for="inputUserPassword">{{ 'settings.user.edit.password' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="password" type="password" id="inputPassword" ng-required="!isEdit()" class="form-control"
|
||||
<input name="userPassword" type="password" id="inputUserPassword" ng-required="!isEdit()" class="form-control"
|
||||
ng-minlength="8" ng-maxlength="50" ng-attr-placeholder="{{ 'settings.user.edit.password' | translate }}" ng-model="user.password"/>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.password.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userPassword.$error.required && editUserForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userPassword.$error.minlength && editUserForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editUserForm.userPassword.$error.maxlength && editUserForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user