summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorSunil Joshi <joshi_sunil@in.com>2012-10-12 19:39:38 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-10-12 19:39:38 +0200
commitd642d81c9c3438b3778e8d03d00804bc4f7732b0 (patch)
tree0386b7ecbb5dfe89a7e31d6f8a9f8e360234e8a5 /template
parent8dc5c9bbd7484c59cec8884435a80bc16ef428e2 (diff)
downloadbugzilla-d642d81c9c3438b3778e8d03d00804bc4f7732b0.tar.gz
bugzilla-d642d81c9c3438b3778e8d03d00804bc4f7732b0.tar.xz
Bug 297213: Submit button appears without having anything to submit
r/a=LpSolit
Diffstat (limited to 'template')
-rw-r--r--template/en/default/admin/products/groupcontrol/edit.html.tmpl219
1 files changed, 106 insertions, 113 deletions
diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
index cd738960e..889647e7e 100644
--- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl
+++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
@@ -13,122 +13,115 @@
title = title
%]
-<form method="post" action="editproducts.cgi">
- <input type="hidden" name="action" value="updategroupcontrols">
- <input type="hidden" name="product" value="[% product.name FILTER html %]">
- <input type="hidden" name="token" value="[% token FILTER html %]">
+[% display_headers = 1 %]
+[% FOREACH group = product.group_controls(1).values.sort("name") %]
+ [% NEXT UNLESS group.group.isactive OR group.bug_count %]
+ [% IF display_headers %]
+ [% display_headers = 0 %]
+ <form method="post" action="editproducts.cgi">
+ <input type="hidden" name="action" value="updategroupcontrols">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
+ <input type="hidden" name="token" value="[% token FILTER html %]">
- <table id="form" cellspacing="0" cellpadding="4" border="1">
- <tr bgcolor="#6666ff">
- <th>Group</th>
- <th>Entry</th>
- <th>MemberControl</th>
- <th>OtherControl</th>
- <th>Canedit</th>
- <th>editcomponents</th>
- <th>canconfirm</th>
- <th>editbugs</th>
- <th>[% terms.Bugs %]</th>
- </tr>
- [% FOREACH group = product.group_controls(1).values.sort("name") %]
- [% IF !group.group.isactive AND group.bug_count %]
- <tr bgcolor="#bbbbbb">
- <td>
- [% group.group.name FILTER html %]
- </td>
- <td align="center" colspan=7>
- Disabled
- </td>
- <td>
- [% group.bug_count FILTER html %]
- </td>
- <tr>
- [% ELSIF group.group.is_active %]
- <tr>
- <td>
- [% group.group.name FILTER html %]
- </td>
- <td>
- <input type=checkbox value=1 name=entry_[% group.id %]
- [% " checked=\"checked\"" IF group.entry %]>
- </td>
- <td>
- <select name="membercontrol_[% group.id %]">
- <option value=[% constants.CONTROLMAPNA %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPNA %]
- >NA
- </option>
- <option value=[% constants.CONTROLMAPSHOWN %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPSHOWN %]
- >Shown
- </option>
- <option value=[% constants.CONTROLMAPDEFAULT %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPDEFAULT %]
- >Default
- </option>
- <option value=[% constants.CONTROLMAPMANDATORY %]
- [% " selected=\"selected\""
- IF group.membercontrol == constants.CONTROLMAPMANDATORY %]
- >Mandatory
- </option>
- </select>
- </td>
- <td>
- <select name="othercontrol_[% group.id %]">
- <option value=[% constants.CONTROLMAPNA %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPNA %]
- >NA
- </option>
- <option value=[% constants.CONTROLMAPSHOWN %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPSHOWN %]
- >Shown
- </option>
- <option value=[% constants.CONTROLMAPDEFAULT %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPDEFAULT %]
- >Default
- </option>
- <option value=[% constants.CONTROLMAPMANDATORY %]
- [% " selected=\"selected\""
- IF group.othercontrol == constants.CONTROLMAPMANDATORY %]
- >Mandatory
- </option>
- </select>
- </td>
- <td>
- <input type=checkbox value=1 name=canedit_[% group.id %]
- [% " checked=\"checked\"" IF group.canedit %]>
- </td>
- <td>
- <input type=checkbox value=1 name=editcomponents_[% group.id %]
- [% " checked=\"checked\"" IF group.editcomponents %]>
- </td>
- <td>
- <input type=checkbox value=1 name=canconfirm_[% group.id %]
- [% " checked=\"checked\"" IF group.canconfirm %]>
- </td>
- <td>
- <input type=checkbox value=1 name=editbugs_[% group.id %]
- [% " checked=\"checked\"" IF group.editbugs %]>
- </td>
- <td>
- [% group.bug_count || 0 FILTER html %]
- </td>
+ <table id="form" cellspacing="0" cellpadding="4" border="1">
+ <tr bgcolor="#6666ff">
+ <th>Group</th>
+ <th>Entry</th>
+ <th>MemberControl</th>
+ <th>OtherControl</th>
+ <th>Canedit</th>
+ <th>editcomponents</th>
+ <th>canconfirm</th>
+ <th>editbugs</th>
+ <th>[% terms.Bugs %]</th>
</tr>
- [% END %]
- [% END %]
-
- </table>
- <br>
- <input type=submit name="submit" value="submit">
- <br>
-</form>
+ [% END %]
+ [% IF !group.group.isactive %]
+ <tr bgcolor="#bbbbbb">
+ <td>[% group.group.name FILTER html %]</td>
+ <td align="center" colspan="7">Disabled</td>
+ <td>[% group.bug_count FILTER html %]</td>
+ </tr>
+ [% ELSE %]
+ <tr>
+ <td>[% group.group.name FILTER html %]</td>
+ <td>
+ <input type=checkbox value=1 name=entry_[% group.id %]
+ [% " checked='checked'" IF group.entry %]>
+ </td>
+ <td>
+ <select name="membercontrol_[% group.id %]">
+ <option value=[% constants.CONTROLMAPNA %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPNA %]
+ >NA
+ </option>
+ <option value=[% constants.CONTROLMAPSHOWN %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPSHOWN %]
+ >Shown
+ </option>
+ <option value=[% constants.CONTROLMAPDEFAULT %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPDEFAULT %]
+ >Default
+ </option>
+ <option value=[% constants.CONTROLMAPMANDATORY %]
+ [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPMANDATORY %]
+ >Mandatory
+ </option>
+ </select>
+ </td>
+ <td>
+ <select name="othercontrol_[% group.id %]">
+ <option value=[% constants.CONTROLMAPNA %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPNA %]
+ >NA
+ </option>
+ <option value=[% constants.CONTROLMAPSHOWN %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPSHOWN %]
+ >Shown
+ </option>
+ <option value=[% constants.CONTROLMAPDEFAULT %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPDEFAULT %]
+ >Default
+ </option>
+ <option value=[% constants.CONTROLMAPMANDATORY %]
+ [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPMANDATORY %]
+ >Mandatory
+ </option>
+ </select>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=canedit_[% group.id %]
+ [% " checked='checked'" IF group.canedit %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=editcomponents_[% group.id %]
+ [% " checked='checked'" IF group.editcomponents %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=canconfirm_[% group.id %]
+ [% " checked='checked'" IF group.canconfirm %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=editbugs_[% group.id %]
+ [% " checked='checked'" IF group.editbugs %]>
+ </td>
+ <td>[% group.bug_count || 0 FILTER html %]</td>
+ </tr>
+ [% END %]
+[% END %]
+[% IF display_headers %]
+ <p>No groups are available for products.
+ [% IF user.in_group('creategroups') %]
+ <a href="editgroups.cgi?action=add">Create a new group</a>
+ [% END %]
+ </p>
+[% ELSE %]
+ </table>
+ <br>
+ <input type=submit name="submit" value="submit">
+ </form>
+[% END %]
<p>
These settings control the relationship of the groups to this