[pve-devel] [PATCH manager 1/4] ui: api token: remove record context from TokenView add button handler
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Nov 5 09:14:37 CET 2024
Consider the whole series
Tested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
On October 31, 2024 2:46 pm, Daniel Kral wrote:
> Removes the record ("rec") variable from the TokenView, as it is always
> undefined, because the "Add" button is a ExtJS Button and therefore the
> button handler doesn't pass a third parameter as ProxmoxButton does.
>
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>
> ---
> Please correct me if I'm missing something here, but I tested this
> through Firefox's JavaScript debugger and assumed that tbar items are
> "ExtJS.button.Button" by default, except when specifing another xtype.
>
> This will make the fix for #5722 clearer to implement.
>
> www/manager6/dc/TokenView.js | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/www/manager6/dc/TokenView.js b/www/manager6/dc/TokenView.js
> index 69c60569..eb910feb 100644
> --- a/www/manager6/dc/TokenView.js
> +++ b/www/manager6/dc/TokenView.js
> @@ -106,13 +106,11 @@ Ext.define('PVE.dc.TokenView', {
> {
> text: gettext('Add'),
> disabled: !caps.access['User.Modify'],
> - handler: function(btn, e, rec) {
> + handler: function(btn, e) {
> let data = {};
> if (me.fixedUser) {
> data.userid = me.fixedUser;
> data.fixedUser = true;
> - } else if (rec && rec.data) {
> - data.userid = rec.data.userid;
> }
> let win = Ext.create('PVE.dc.TokenEdit', {
> isCreate: true,
> --
> 2.39.5
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
More information about the pve-devel
mailing list