summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/custom_fields/cf-js.js.tmpl
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-11-07 18:34:39 +0100
committermkanat%bugzilla.org <>2008-11-07 18:34:39 +0100
commit63be194996849202878c4a87e4c68a25d1976d3e (patch)
tree657fbe1458ce256015a832251219669070886e1e /template/en/default/admin/custom_fields/cf-js.js.tmpl
parentebd2e3a29a893e1ea26899bac53296fc6422f47c (diff)
downloadbugzilla-63be194996849202878c4a87e4c68a25d1976d3e.tar.gz
bugzilla-63be194996849202878c4a87e4c68a25d1976d3e.tar.xz
Bug 308253: Ability to add select (enum) fields to a bug whose list of values depends on the value of another field
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'template/en/default/admin/custom_fields/cf-js.js.tmpl')
-rw-r--r--template/en/default/admin/custom_fields/cf-js.js.tmpl12
1 files changed, 12 insertions, 0 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 bf72ff998..6c5bbf626 100644
--- a/template/en/default/admin/custom_fields/cf-js.js.tmpl
+++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl
@@ -32,6 +32,18 @@ var select_values = new Array();
];
[% END %]
+function onChangeType(type_field) {
+ var value_field = document.getElementById('value_field_id');
+ if (type_field.value == [% constants.FIELD_TYPE_SINGLE_SELECT %]
+ || type_field.value == [% constants.FIELD_TYPE_MULTI_SELECT %])
+ {
+ value_field.disabled = false;
+ }
+ else {
+ value_field.disabled = true;
+ }
+}
+
function onChangeVisibilityField() {
var vis_field = document.getElementById('visibility_field_id');
var vis_value = document.getElementById('visibility_value_id');