From: Lorenz Stechauner <l.stechauner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/1] ui: dc/UserEdit: add warning for disabling users
Date: Thu, 20 May 2021 15:53:41 +0200 [thread overview]
Message-ID: <20210520135342.58549-2-l.stechauner@proxmox.com> (raw)
In-Reply-To: <20210520135342.58549-1-l.stechauner@proxmox.com>
see #3101
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
---
www/manager6/dc/UserEdit.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index b637cd53..65a612fd 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -73,6 +73,12 @@ Ext.define('PVE.dc.UserEdit', {
uncheckedValue: 0,
defaultValue: 1,
checked: true,
+ listeners: {
+ change: function(checkbox) {
+ let taskWarning = me.lookup('taskWarning');
+ taskWarning.setHidden(!(me.wasEnabled && !checkbox.value));
+ },
+ },
},
];
@@ -93,6 +99,13 @@ Ext.define('PVE.dc.UserEdit', {
fieldLabel: gettext('E-Mail'),
vtype: 'proxmoxMail',
},
+ {
+ xtype: 'displayfield',
+ reference: 'taskWarning',
+ userCls: 'pmx-hint',
+ value: gettext('Note: Already running tasks of user will not be terminated automatically!'),
+ hidden: true,
+ },
];
if (me.isCreate) {
@@ -161,6 +174,7 @@ Ext.define('PVE.dc.UserEdit', {
success: function(response, options) {
var data = response.result.data;
me.setValues(data);
+ me.wasEnabled = data.enable;
if (data.keys) {
if (data.keys === 'x!oath' || data.keys === 'x!u2f') {
me.down('[name="keys"]').setDisabled(1);
--
2.20.1
next prev parent reply other threads:[~2021-05-20 13:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 13:53 [pve-devel] [PATCH-SERIES manager/docs] add warning for disabling or deleting users Lorenz Stechauner
2021-05-20 13:53 ` Lorenz Stechauner [this message]
2021-05-20 13:53 ` [pve-devel] [PATCH docs 1/1] pveum: " Lorenz Stechauner
2021-06-21 7:53 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210520135342.58549-2-l.stechauner@proxmox.com \
--to=l.stechauner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal