From 75c45bfe94e44c4bbe77bd11ccfc13b7da57c1bb Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Tue, 9 Feb 2010 22:00:48 -0600 Subject: Bug 537846 - "Disable the "Reset" checkbox for the maintainer parameter" [r=mkanat a=mkanat] --- Bugzilla/Config/General.pm | 1 + editparams.cgi | 2 +- template/en/default/admin/params/common.html.tmpl | 12 +++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Bugzilla/Config/General.pm b/Bugzilla/Config/General.pm index 3a6b827ed..0f043548b 100644 --- a/Bugzilla/Config/General.pm +++ b/Bugzilla/Config/General.pm @@ -39,6 +39,7 @@ use constant get_param_list => ( { name => 'maintainer', type => 't', + no_reset => '1', default => '', checker => \&check_email }, diff --git a/editparams.cgi b/editparams.cgi index 9b4f04e3c..a8dc0daf9 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -87,7 +87,7 @@ if ($action eq 'save' && $current_module) { my $name = $i->{'name'}; my $value = $cgi->param($name); - if (defined $cgi->param("reset-$name")) { + if (defined $cgi->param("reset-$name") && !$i->{'no_reset'}) { $value = $i->{'default'}; } else { if ($i->{'type'} eq 'm') { diff --git a/template/en/default/admin/params/common.html.tmpl b/template/en/default/admin/params/common.html.tmpl index 5b0d00429..18aa1fb69 100644 --- a/template/en/default/admin/params/common.html.tmpl +++ b/template/en/default/admin/params/common.html.tmpl @@ -137,11 +137,13 @@ [% END %]

-

- - -

+ [% UNLESS param.no_reset %] +

+ + +

+ [% END %]
[% END %] -- cgit v1.2.3-24-g4f1b