diff options
author | Tiago Mello <timello@gmail.com> | 2010-08-27 00:27:08 -0300 |
---|---|---|
committer | Tiago Mello <timello@gmail.com> | 2010-08-27 00:27:08 -0300 |
commit | 0844fe9fc6d2d5293fad1384d2955dedf30fc8c4 (patch) | |
tree | 636a0bbcdf71017fda712e60cd1a0dc1b7038b7b /template/en/default/admin | |
parent | d94865b30a92be8a3a900f8d1d8262d36044b1ca (diff) | |
download | bugs-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar bugs-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar.gz bugs-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar.bz2 bugs-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar.xz bugs-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.zip |
Bug 479400: Add the ability to show or hide particular custom fields
based on multiple values of another field (visibility controllers)
r/a=mkanat
Diffstat (limited to 'template/en/default/admin')
-rw-r--r-- | template/en/default/admin/custom_fields/cf-js.js.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/admin/custom_fields/create.html.tmpl | 7 | ||||
-rw-r--r-- | template/en/default/admin/custom_fields/edit.html.tmpl | 10 |
3 files changed, 12 insertions, 7 deletions
diff --git a/template/en/default/admin/custom_fields/cf-js.js.tmpl b/template/en/default/admin/custom_fields/cf-js.js.tmpl index f9c31b5c7..cc1a4e4aa 100644 --- a/template/en/default/admin/custom_fields/cf-js.js.tmpl +++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl @@ -65,7 +65,7 @@ function onChangeType(type_field) { function onChangeVisibilityField() { var vis_field = document.getElementById('visibility_field_id'); - var vis_value = document.getElementById('visibility_value_id'); + var vis_value = document.getElementById('visibility_values'); if (vis_field.value) { var values = select_values[vis_field.value]; diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl index b96738473..f89f979fd 100644 --- a/template/en/default/admin/custom_fields/create.html.tmpl +++ b/template/en/default/admin/custom_fields/create.html.tmpl @@ -130,8 +130,11 @@ YAHOO.util.Event.onDOMReady(function() {onChangeType(document.getElementById('ty </option> [% END %] </select> - <label for="visibility_value_id"><strong>is set to:</strong></label> - <select name="visibility_value_id" id="visibility_value_id"> + <label for="visibility_values"> + <strong>is set to any of:</strong> + </label> + <select multiple="multiple" size="5" name="visibility_values" + id="visibility_values" class="field_value"> <option value=""></option> </select> </td> diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index 48c3396f3..5ce2b7fd5 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -118,12 +118,14 @@ </option> [% END %] </select> - <label for="visibility_value_id"><strong>is set to:</strong></label> - <select name="visibility_value_id" id="visibility_value_id"> + <label for="visibility_values"> + <strong>is set to any of:</strong> + </label> + <select multiple="multiple" size="5" name="visibility_values" + id="visibility_values" class="field_value"> [% FOREACH value = field.visibility_field.legal_values %] <option value="[% value.id FILTER html %]" - [% ' selected="selected"' - IF field.visibility_value.id == value.id %]> + [% " selected" IF field.visibility_values.contains(value) %]> [% IF field.visibility_field.name == 'component' %] [% display_value('product', value.product.name) FILTER html %]: [% END %] |