]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/PBSRemoteEdit.js
quarantines: dock attachement grid to bottom, avoid toggle button
[pmg-gui.git] / js / PBSRemoteEdit.js
index 4fbe0756afdae8ebc239ef0b80a9fa9b1821cd39..5a89680e4b870a72d2ed72101ec12e0179c2ed00 100644 (file)
@@ -8,11 +8,8 @@ Ext.define('PMG.PBSInputPanel', {
 
     cbindData: function(initialConfig) {
        let me = this;
-
        me.isCreate = initialConfig.isCreate || !initialConfig.remoteId;
-       return {
-           unsetValue: me.isCreate ? null : undefined,
-       };
+       return {};
     },
 
     items: [
@@ -29,56 +26,71 @@ Ext.define('PMG.PBSInputPanel', {
                    xtype: 'pmxDisplayEditField',
                    name: 'remote',
                    cbind: {
-                       value: '{unsetValue}',
                        editable: '{isCreate}',
                    },
                    fieldLabel: gettext('ID'),
                    allowBlank: false,
                },
                {
-                   xtype: 'proxmoxtextfield',
+                   xtype: 'pmxDisplayEditField',
                    name: 'server',
-                   cbind: {
-                       value: '{unsetValue}',
-                   },
                    vtype: 'DnsOrIp',
                    fieldLabel: gettext('Server'),
+                   cbind: { editable: '{isCreate}' },
                    allowBlank: false,
                },
                {
-                   xtype: 'proxmoxtextfield',
+                   xtype: 'pmxDisplayEditField',
                    name: 'datastore',
-                   cbind: {
-                       value: '{unsetValue}',
-                   },
                    fieldLabel: 'Datastore',
+                   cbind: { editable: '{isCreate}' },
                    allowBlank: false,
                },
+               {
+                   xtype: 'pmxDisplayEditField',
+                   name: 'namespace',
+                   fieldLabel: gettext('Namespace'),
+                   cbind: { editable: '{isCreate}' },
+                   emptyText: gettext('Root'),
+               },
            ],
            column2: [
                {
-                   xtype: 'proxmoxtextfield',
+                   xtype: 'pmxDisplayEditField',
                    name: 'username',
-                   cbind: {
-                       value: '{unsetValue}',
-                   },
-                   emptyText: gettext('Example') + ': admin@pbs',
                    fieldLabel: gettext('Username'),
+                   emptyText: gettext('Example') + ': admin@pbs',
+                   cbind: { editable: '{isCreate}' },
                    regex: /\S+@\w+/,
                    regexText: gettext('Example') + ': admin@pbs',
                    allowBlank: false,
                },
                {
-                   xtype: 'proxmoxtextfield',
+                   xtype: 'pmxDisplayEditField',
+                   editable: true, // FIXME: set to false if (!create && user == token)
+                   editConfig: {
+                       xtype: 'proxmoxtextfield',
+                   },
                    inputType: 'password',
                    name: 'password',
                    cbind: {
-                       value: '{unsetValue}',
                        allowBlank: '{!isCreate}',
                        emptyText: (get) => get('isCreate') ? '' : gettext('Unchanged'),
                    },
                    fieldLabel: gettext('Password'),
                },
+               {
+                   xtype: 'proxmoxKVComboBox',
+                   name: 'notify',
+                   fieldLabel: gettext('Notify'),
+                   comboItems: [
+                       ['always', gettext('Always')],
+                       ['error', gettext('Errors')],
+                       ['never', gettext('Never')],
+                   ],
+                   deleteEmpty: false,
+                   emptyText: gettext('Never'),
+               },
                {
                    xtype: 'proxmoxcheckbox',
                    name: 'enable',
@@ -86,21 +98,19 @@ Ext.define('PMG.PBSInputPanel', {
                    uncheckedValue: 0,
                    fieldLabel: gettext('Enable'),
                },
+           ],
+           columnB: [
                {
                    xtype: 'proxmoxcheckbox',
                    name: 'include-statistics',
                    checked: true,
                    uncheckedValue: 0,
-                   fieldLabel: gettext('Include Statistics'),
+                   fieldLabel: gettext('Statistics'),
+                   boxLabel: gettext('Include in Backup'),
                },
-           ],
-           columnB: [
                {
                    xtype: 'proxmoxtextfield',
                    name: 'fingerprint',
-                   cbind: {
-                       value: '{unsetValue}',
-                   },
                    fieldLabel: gettext('Fingerprint'),
                    emptyText: gettext('Server certificate SHA-256 fingerprint, required for self-signed certificates'),
                    regex: /[A-Fa-f0-9]{2}(:[A-Fa-f0-9]{2}){31}/,