diff options
Diffstat (limited to 'js/app/directives')
-rw-r--r-- | js/app/directives/credentialfield.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/app/directives/credentialfield.js b/js/app/directives/credentialfield.js index 1cee2e22..8d509830 100644 --- a/js/app/directives/credentialfield.js +++ b/js/app/directives/credentialfield.js @@ -34,15 +34,18 @@ return { scope: { value: '=value', - secret: '=secret' + secret: '=secret', + inputField: '=useInput', + inputFieldplaceholder: '=inputPlaceholder' }, restrict: 'A', replace: 'true', template: "" + '<span class="credential_field">' + '<div class="value" ng-class="{\'ellipsis\': isLink}">' + - '<span ng-repeat="n in [] | range:value.length" ng-if="!valueVisible">*</span>' + - '<span ng-if="valueVisible" ng-bind-html="value"></span>' + + '<span ng-if="secret"><span ng-repeat="n in [] | range:value.length" ng-if="!valueVisible">*</span></span>' + + '<span ng-if="valueVisible && !inputField" ng-bind-html="value"></span>' + + '<span ng-if="valueVisible && inputField"><input type="text" ng-model="value" select-on-click placeholder="{{ inputFieldplaceholder }}!"</span>' + '</div>' + '<div class="tools">' + '<div class="cell" ng-if="toggle" tooltip="tggltxt" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': !valueVisible, \'fa-eye-slash\': valueVisible }"></i></div>' + |