[pmg-devel] [PATCH pmg-gui 1/2] add onlineHelp anchor to ndr_on_block
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Nov 20 11:46:25 CET 2019
On 11/19/19 1:21 PM, Stoiko Ivanov wrote:
> since we have a small section explicitly dealing with before and after
> queue filtering in our documentation we should link the Help button there.
>
> Since onlineHelp is not overridable in the add_*_row function in ObjectGrid,
> we duplicate the row definition.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> js/MailProxyOptions.js | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/js/MailProxyOptions.js b/js/MailProxyOptions.js
> index 61a0d6c..8cc5da2 100644
> --- a/js/MailProxyOptions.js
> +++ b/js/MailProxyOptions.js
> @@ -69,7 +69,27 @@ Ext.define('PMG.MailProxyOptions', {
> { deleteEmpty: true, defaultValue: 'ESMTP Proxmox' });
> /*jslint confusion: false*/
>
> - me.add_boolean_row('ndr_on_block', gettext('Send NDR on Blocked E-Mails'));
> + var ndr_on_block_text = gettext('Send NDR on Blocked E-Mails');
> + me.rows['ndr_on_block'] = {
> + required: true,
> + header: ndr_on_block_text,
> + renderer: Proxmox.Utils.format_boolean,
> + editor: {
> + xtype: 'proxmoxWindowEdit',
> + subject: ndr_on_block_text,
> + onlineHelp: 'pmgconfig_mailproxy_before_after_queue',
> + items: {
> + xtype: 'proxmoxcheckbox',
> + name: 'ndr_on_block',
> + uncheckedValue: 0,
> + defaultValue: 0,
> + checked: false,
> + labelWidth: Proxmox.Utils.compute_min_label_width(
> + ndr_on_block_text),
> + fieldLabel: ndr_on_block_text
> + }
> + }
> + };
>
> var baseurl = '/config/mail';
>
>
replaced with:
diff --git a/js/MailProxyOptions.js b/js/MailProxyOptions.js
index 61a0d6c..ce36411 100644
--- a/js/MailProxyOptions.js
+++ b/js/MailProxyOptions.js
@@ -70,6 +70,9 @@ Ext.define('PMG.MailProxyOptions', {
/*jslint confusion: false*/
me.add_boolean_row('ndr_on_block', gettext('Send NDR on Blocked E-Mails'));
+ // FIXME allow to pass onlineHelp to ObjectGrid's add_xyz_row..
+ // onlineHelp: 'pmgconfig_mailproxy_before_after_queue',
+ me.rows.ndr_on_block.editor.onlineHelp = 'pmgconfig_mailproxy_before_after_queue';
var baseurl = '/config/mail';
More information about the pmg-devel
mailing list