summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/custom_fields/create.html.tmpl
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-10-25 06:11:30 +0200
committermkanat%bugzilla.org <>2008-10-25 06:11:30 +0200
commit3cea91884b28b52df4e38f2ba88c00b65071a81f (patch)
treec0f451235176b2b542a38b0c935dcddf0453a1ee /template/en/default/admin/custom_fields/create.html.tmpl
parente0da20baba17b7f068946c8647fb6d67e77c39b7 (diff)
downloadbugzilla-3cea91884b28b52df4e38f2ba88c00b65071a81f.tar.gz
bugzilla-3cea91884b28b52df4e38f2ba88c00b65071a81f.tar.xz
Bug 291433: Ability to have custom fields whose visibility depends on the values of other fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'template/en/default/admin/custom_fields/create.html.tmpl')
-rw-r--r--template/en/default/admin/custom_fields/create.html.tmpl37
1 files changed, 25 insertions, 12 deletions
diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl
index 5dd50ce3b..da10c7bcb 100644
--- a/template/en/default/admin/custom_fields/create.html.tmpl
+++ b/template/en/default/admin/custom_fields/create.html.tmpl
@@ -19,22 +19,17 @@
[% PROCESS "global/field-descs.none.tmpl" %]
+[% javascript = BLOCK %]
+ [% INCLUDE "admin/custom_fields/cf-js.js.tmpl" %]
+[% END %]
+
[% PROCESS global/header.html.tmpl
title = "Add a new Custom Field"
onload = "document.getElementById('new_bugmail').disabled = true;"
+ javascript_urls = [ 'js/util.js' ]
doc_section = "custom-fields.html#add-custom-fields"
%]
-<script type="text/javascript">
- <!--
- // Disable a checkbox based on the state of another one.
- function toggleCheckbox(this_checkbox, other_checkbox_id) {
- var other_checkbox = document.getElementById(other_checkbox_id);
- other_checkbox.disabled = !this_checkbox.checked;
- }
- //-->
-</script>
-
<p>
Adding custom fields can make the interface of [% terms.Bugzilla %] very
complicated. Many admins who are new to [% terms.Bugzilla %] start off
@@ -97,8 +92,26 @@
<input type="text" id="sortkey" name="sortkey" size="6" maxlength="6">
</td>
- <th>&nbsp;</th>
- <td>&nbsp;</td>
+ <th align="right">
+ <label for="visibility_field_id">Field only appears when:</label>
+ </th>
+ <td>
+ <select name="visibility_field_id" id="visibility_field_id"
+ onchange="onChangeVisibilityField()">
+ <option></option>
+ [% FOREACH sel_field = Bugzilla.active_custom_fields %]
+ [% NEXT IF !sel_field.is_select %]
+ <option value="[% sel_field.id FILTER html %]">
+ [% sel_field.description FILTER html %]
+ ([% sel_field.name FILTER html %])
+ </option>
+ [% END %]
+ </select>
+ <label for="visibility_value_id"><strong>is set to:</strong></label>
+ <select name="visibility_value_id" id="visibility_value_id">
+ <option value=""></option>
+ </select>
+ </td>
</tr>
</table>
<p>