diff options
author | Reed Loden <reed@reedloden.com> | 2010-02-10 05:00:48 +0100 |
---|---|---|
committer | Reed Loden <reed@reedloden.com> | 2010-02-10 05:00:48 +0100 |
commit | 75c45bfe94e44c4bbe77bd11ccfc13b7da57c1bb (patch) | |
tree | 1ba546f8bcf80a4fdb6dabbf6557cb857e879ff8 | |
parent | 8f239b454b12bbef4d3ef6172e03e3006ae2679d (diff) | |
download | bugzilla-75c45bfe94e44c4bbe77bd11ccfc13b7da57c1bb.tar.gz bugzilla-75c45bfe94e44c4bbe77bd11ccfc13b7da57c1bb.tar.xz |
Bug 537846 - "Disable the "Reset" checkbox for the maintainer parameter" [r=mkanat a=mkanat]
-rw-r--r-- | Bugzilla/Config/General.pm | 1 | ||||
-rwxr-xr-x | editparams.cgi | 2 | ||||
-rw-r--r-- | 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 @@ </font> [% END %] </p> - <p> - <input type="checkbox" name="reset-[% param.name FILTER html %]" - id="reset-[% param.name FILTER html %]"> - <label for="reset-[% param.name FILTER html %]">Reset</label> - </p> + [% UNLESS param.no_reset %] + <p> + <input type="checkbox" name="reset-[% param.name FILTER html %]" + id="reset-[% param.name FILTER html %]"> + <label for="reset-[% param.name FILTER html %]">Reset</label> + </p> + [% END %] <hr> </dd> [% END %] |