Add ghost feature translation
This commit is contained in:
@@ -384,18 +384,20 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'users.setGhostDialog.title' | tr }}</h4>
|
||||
<h4 class="modal-title">{{ 'users.setGhostDialog.title' | tr: { username: setGhost.user.username} }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-hide="invitation.inviteLink">
|
||||
<p>{{ 'users.setGhostDialog.description' | tr }}</p>
|
||||
</div>
|
||||
<form name="setGhostForm" role="form" novalidate ng-submit="setGhost.submit()" autocomplete="off">
|
||||
|
||||
<div class="form-group" ng-class="{ 'has-error': setGhost.error }">
|
||||
<label class="control-label" for="setGhostPassword">{{ 'users.setGhost.password' | tr }}</label>
|
||||
<label class="control-label" for="setGhostPassword">{{ 'users.setGhostDialog.password' | tr }}</label>
|
||||
<div class="control-label" ng-show="setGhost.error">
|
||||
<small ng-show="setGhost.error">{{ setGhost.error }}</small>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="setGhostPassword" class="form-control" name="password" ng-model="setGhost.password" required/>
|
||||
<input type="text" id="setGhostPassword" class="form-control" name="password" ng-model="setGhost.password" required ng-disabled="setGhost.success"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="setGhostClipboardButton" type="button" data-clipboard-target="#setGhostPassword"><i class="fa fa-clipboard"></i></button>
|
||||
</span>
|
||||
@@ -405,8 +407,9 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-click="setGhost.submit()" ng-disabled="setGhostForm.$invalid || setGhost.busy"><i class="fa fa-circle-notch fa-spin" ng-show="setGhost.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
<button type="button" class="btn btn-default" ng-show="setGhost.success" data-dismiss="modal">{{ 'main.dialog.close' | tr }}</button>
|
||||
<button type="button" class="btn btn-default" ng-hide="setGhost.success" data-dismiss="modal">{{ 'main.dialog.cancel' | tr }}</button>
|
||||
<button type="button" class="btn btn-success" ng-hide="setGhost.success" ng-click="setGhost.submit()" ng-disabled="setGhostForm.$invalid || setGhost.busy"><i class="fa fa-circle-notch fa-spin" ng-show="setGhost.busy"></i> {{ 'main.dialog.save' | tr }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -599,11 +599,13 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$scope.setGhost = {
|
||||
busy: false,
|
||||
error: null,
|
||||
success: false,
|
||||
user: null,
|
||||
password: '',
|
||||
|
||||
show: function (user) {
|
||||
$scope.setGhost.busy = false;
|
||||
$scope.setGhost.success = false;
|
||||
$scope.setGhost.error = null;
|
||||
$scope.setGhost.user = user;
|
||||
$scope.setGhost.password = generatePassword();
|
||||
@@ -621,6 +623,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$scope.setGhost.error = error.message;
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
$scope.setGhost.success = true;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user