diff options
Diffstat (limited to 'template/en/default/admin/custom_fields/edit.html.tmpl')
-rw-r--r-- | template/en/default/admin/custom_fields/edit.html.tmpl | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index 02334ab13..2186c7562 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -14,7 +14,7 @@ #%] [%# INTERFACE: - # none + # field: Bugzila::Field; the current field being edited #%] [% PROCESS "global/field-descs.none.tmpl" %] @@ -23,22 +23,17 @@ Edit the Custom Field '[% field.name FILTER html %]' ([% field.description FILTER html %]) [% END %] +[% javascript = BLOCK %] + [% INCLUDE "admin/custom_fields/cf-js.js.tmpl" %] +[% END %] + [% PROCESS global/header.html.tmpl title = title onload = "toggleCheckbox(document.getElementById('enter_bug'), 'new_bugmail');" + javascript_urls = [ 'js/util.js' ] doc_section = "custom-fields.html#edit-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> Descriptions are a very short string describing the field and will be used as the label for this field in the user interface. @@ -82,12 +77,36 @@ <input type="text" id="sortkey" name="sortkey" size="6" maxlength="6" value="[% field.sortkey FILTER html %]"> </td> - - <th> </th> - <td> </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 || sel_field.id == field.id %] + <option value="[% sel_field.id FILTER html %]" + [% ' selected="selected"' + IF sel_field.id == field.visibility_field.id %]> + [% 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"> + [% FOREACH value = field.visibility_field.legal_values %] + <option value="[% value.id FILTER html %]" + [% ' selected="selected"' + IF field.visibility_value.id == value.id %]> + [% value.name FILTER html %] + </option> + [% END %] + </select> + </td> </tr> - [% IF field.type == constants.FIELD_TYPE_SINGLE_SELECT - || field.type == constants.FIELD_TYPE_MULTI_SELECT %] + [% IF field.is_select %] <tr> <th> </th> <td colspan="3"> |