mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Feature #4614: Add button to view current password in sunstone
This commit is contained in:
parent
695787711e
commit
e106ad1880
@ -43,6 +43,7 @@ define(function(require) {
|
||||
var XML_ROOT = "USER";
|
||||
var PASSWORD_DIALOG_ID = require('tabs/users-tab/dialogs/password/dialogId');
|
||||
var LOGIN_TOKEN_DIALOG_ID = require('tabs/users-tab/dialogs/login-token/dialogId');
|
||||
var CONFIRM_DIALOG_ID = require('utils/dialogs/generic-confirm/dialogId');
|
||||
|
||||
/*
|
||||
CONSTRUCTOR
|
||||
@ -126,7 +127,30 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
// Password button
|
||||
// View password button
|
||||
context.off("click", "#view_password");
|
||||
context.on("click", "#view_password", function(){
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({
|
||||
header : Locale.tr("Password"),
|
||||
headerTabId: TAB_ID,
|
||||
body: '<label>' + Locale.tr("Current password") + '</label>' +
|
||||
'<pre>'+that.element.PASSWORD+'</pre>',
|
||||
question : '',
|
||||
buttons : [
|
||||
Locale.tr("Close"),
|
||||
],
|
||||
submit : [
|
||||
function(){
|
||||
return false;
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).reset();
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).show();
|
||||
});
|
||||
|
||||
// Edit password button
|
||||
context.off("click", "#update_password");
|
||||
context.on("click", "#update_password", function(){
|
||||
Sunstone.getDialog(PASSWORD_DIALOG_ID).setParams(
|
||||
|
@ -76,19 +76,23 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="key_td">{{tr "Authentication driver"}}</td>
|
||||
<td class="value_td">{{element.AUTH_DRIVER}}</td>
|
||||
<td></td>
|
||||
<td class="value_td" colspan="2">{{element.AUTH_DRIVER}}</td>
|
||||
</tr>
|
||||
{{#isTabActionEnabled "users-tab" "User.update_password"}}
|
||||
<tr class="passsword_edit">
|
||||
<td class="key_td">{{tr "Password"}}</td>
|
||||
<td class="value_td">
|
||||
<button id="update_password" type="button" class="button small radius secondary" style="min-width:80%">
|
||||
{{tr "Update password"}} <i class="fa fa-pencil-square-o"/>
|
||||
<button id="view_password" type="button" class="button small radius secondary" style="min-width:80%">
|
||||
{{tr "View"}}
|
||||
</button>
|
||||
</td>
|
||||
<td class="value_td">
|
||||
{{#isTabActionEnabled "users-tab" "User.update_password"}}
|
||||
<div>
|
||||
<a id="update_password" class="edit_e" href="#"> <i class="fa fa-pencil-square-o right"/></a>
|
||||
</div>
|
||||
{{/isTabActionEnabled}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/isTabActionEnabled}}
|
||||
{{#isTabActionEnabled "users-tab" "User.login_token"}}
|
||||
<tr class="login_token">
|
||||
<td class="key_td">{{tr "Login token"}}</td>
|
||||
@ -97,6 +101,7 @@
|
||||
{{tr "Get a login token"}}
|
||||
</button>
|
||||
</td>
|
||||
<td/>
|
||||
</tr>
|
||||
{{/isTabActionEnabled}}
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user