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 => ( ...@@ -39,6 +39,7 @@ use constant get_param_list => (
{ {
name => 'maintainer', name => 'maintainer',
type => 't', type => 't',
no_reset => '1',
default => '', default => '',
checker => \&check_email checker => \&check_email
}, },
......
...@@ -87,7 +87,7 @@ if ($action eq 'save' && $current_module) { ...@@ -87,7 +87,7 @@ if ($action eq 'save' && $current_module) {
my $name = $i->{'name'}; my $name = $i->{'name'};
my $value = $cgi->param($name); my $value = $cgi->param($name);
if (defined $cgi->param("reset-$name")) { if (defined $cgi->param("reset-$name") && !$i->{'no_reset'}) {
$value = $i->{'default'}; $value = $i->{'default'};
} else { } else {
if ($i->{'type'} eq 'm') { if ($i->{'type'} eq 'm') {
......
...@@ -137,11 +137,13 @@ ...@@ -137,11 +137,13 @@
</font> </font>
[% END %] [% END %]
</p> </p>
<p> [% UNLESS param.no_reset %]
<input type="checkbox" name="reset-[% param.name FILTER html %]" <p>
id="reset-[% param.name FILTER html %]"> <input type="checkbox" name="reset-[% param.name FILTER html %]"
<label for="reset-[% param.name FILTER html %]">Reset</label> id="reset-[% param.name FILTER html %]">
</p> <label for="reset-[% param.name FILTER html %]">Reset</label>
</p>
[% END %]
<hr> <hr>
</dd> </dd>
[% END %] [% 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