Hide password in change password view
This commit is contained in:
parent
88fabd10ab
commit
ab08708ec1
@ -603,7 +603,7 @@ angular.module('OpenSlidesApp.core.pdf', [])
|
||||
},
|
||||
// Helper function for determinating whether a parent of element is a list item.
|
||||
isInsideAList = function (element) {
|
||||
parent = element.parentNode;
|
||||
var parent = element.parentNode;
|
||||
while(parent !== null) {
|
||||
if (parent.nodeName.toLowerCase() === 'li') {
|
||||
return true;
|
||||
|
@ -987,7 +987,7 @@ angular.module('OpenSlidesApp.motions.site', [
|
||||
function (motion) {return motion.category ? motion.category.name : '';},
|
||||
function (motion) {return motion.motionBlock ? motion.motionBlock.name : '';},
|
||||
function (motion) {return motion.recommendation ? motion.getRecommendationName() : '';},
|
||||
function (motion) {return _.filter(motion.comments, function (comment) {return !!comment;}).join(' ');},
|
||||
function (motion) {return _.filter(motion.comments).join(' ');},
|
||||
];
|
||||
$scope.filter.propertyDict = {
|
||||
'submitters': function (submitter) {
|
||||
|
@ -109,7 +109,7 @@ angular.module('OpenSlidesApp.users.site', [
|
||||
}
|
||||
])
|
||||
|
||||
.value('LoginDialog', {id: undefined})
|
||||
.value('LoginDialog', {})
|
||||
|
||||
/*
|
||||
* Directive to check for permissions
|
||||
@ -913,6 +913,18 @@ angular.module('OpenSlidesApp.users.site', [
|
||||
}
|
||||
])
|
||||
|
||||
.directive("showPassword", function() {
|
||||
return function linkFn(scope, elem, attrs) {
|
||||
scope.$watch(attrs.showPassword, function(value) {
|
||||
if (value) {
|
||||
elem.attr("type", "text");
|
||||
} else {
|
||||
elem.attr("type", "password");
|
||||
}
|
||||
});
|
||||
};
|
||||
})
|
||||
|
||||
.controller('UserPasswordCtrl', [
|
||||
'$scope',
|
||||
'$state',
|
||||
|
@ -20,9 +20,9 @@
|
||||
{{ alert.msg }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputOldPassword" translate>New password</label>
|
||||
<label for="inputNewPassword" translate>New password</label>
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
<input show-password="showPassword"
|
||||
ng-model="new_password"
|
||||
class="form-control"
|
||||
name="inputNewPassword"
|
||||
@ -38,6 +38,10 @@
|
||||
<i class="fa fa-info-circle"></i>
|
||||
<translate>Initial password</translate>: {{ user.default_password }}
|
||||
</span>
|
||||
<span class="pull-right spacer-right pointer" ng-click="showPassword = !showPassword">
|
||||
<translate>Show password</translate>
|
||||
<i class="fa" ng-class="showPassword ? 'fa-check-square-o' : 'fa-square-o'"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" ng-click="save(user)" class="btn btn-primary btn-sm" translate>
|
||||
|
Loading…
Reference in New Issue
Block a user