Commit 75c45bfe authored by Reed Loden's avatar Reed Loden

Bug 537846 - "Disable the "Reset" checkbox for the maintainer parameter" [r=mkanat a=mkanat]

parent 8f239b45
......@@ -39,6 +39,7 @@ use constant get_param_list => (
{
name => 'maintainer',
type => 't',
no_reset => '1',
default => '',
checker => \&check_email
},
......
......@@ -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') {
......
......@@ -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 %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment