From 437efcb5fc44331d0fa1454bfbca6b7616694881 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 May 2014 16:55:20 -0700 Subject: [PATCH] Allow popup to be disabled --- web-lib-funcs.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 750b81ec9..e940c94f8 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -1707,6 +1707,10 @@ parameters are : =item scrollbars - Set to 1 if the window should have scrollbars +=item fields - See below + +=item disabled - The button is disabled if non-zero + The field-mappings parameter is an array ref of array refs containing =item - Attribute to assign field to in the popup window @@ -1719,7 +1723,7 @@ The field-mappings parameter is an array ref of array refs containing sub popup_window_button { return &theme_popup_window_button(@_) if (defined(&theme_popup_window_button)); -my ($url, $w, $h, $scroll, $fields) = @_; +my ($url, $w, $h, $scroll, $fields, $disabled) = @_; my $scrollyn = $scroll ? "yes" : "no"; my $rv = ""; +$rv .= "' value=\"...\""; +if ($disabled) { + $rv .= " disabled"; + } +$rv .= ">"; return $rv; }