summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2016-01-11 05:27:18 +0100
committerByron Jones <glob@mozilla.com>2016-01-11 05:27:18 +0100
commit9e478ddf25411f901bf552e8b85e5a0776775ea0 (patch)
tree63abc7cf08968e54dfe2df1489adef96a9244c00 /extensions/BMO/template/en
parent9bc226afaf6c0108576f11d6a234ac48347dbbf5 (diff)
downloadbugzilla-9e478ddf25411f901bf552e8b85e5a0776775ea0.tar.gz
bugzilla-9e478ddf25411f901bf552e8b85e5a0776775ea0.tar.xz
Bug 1237185 - hide 'cab review' custom field behind a "click through" to direct people to servicenow
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/bug/edit-custom_field.html.tmpl42
1 files changed, 42 insertions, 0 deletions
diff --git a/extensions/BMO/template/en/default/hook/bug/edit-custom_field.html.tmpl b/extensions/BMO/template/en/default/hook/bug/edit-custom_field.html.tmpl
index c11e6ea42..d81299004 100644
--- a/extensions/BMO/template/en/default/hook/bug/edit-custom_field.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/edit-custom_field.html.tmpl
@@ -60,3 +60,45 @@
RETURN;
END;
%]
+
+[%
+ IF field.name == 'cf_cab_review' AND bug.cf_cab_review == '---';
+ field.hidden = 1;
+ value = '---';
+%]
+ [%# lifted from bug/field.html.tmpl %]
+ <tr>
+ [% PROCESS "bug/field-label.html.tmpl" hidden=0 %]
+ <td class="field_value" id="field_container_[% field.name FILTER html %]" colspan="2">
+ <span id="cab-review-gate">
+ <a href="https://mozilla.service-now.com/change_request.do?sysparm_stack=change_request_list.do&amp;sys_id=-1&amp;sysparm_query=active=true" target="_blank">ServiceNow Change Request</a>
+ (<a href="#" id="cab-review-gate-close">use flag</a>)
+ </span>
+ <span id="cab-review-edit" style="display:none">
+ <input type="hidden" id="[% field.name FILTER html %]_dirty">
+ <select id="[% field.name FILTER html %]" name="[% field.name FILTER html %]">
+ [%
+ FOREACH legal_value = field.legal_values;
+ NEXT IF NOT legal_value.is_active AND NOT value.contains(legal_value.name).size;
+ NEXT UNLESS bug.check_can_change_field(field.name, '---', legal_value.name)
+ OR value.contains(legal_value.name).size;
+ %]
+ <option value="[% legal_value.name FILTER html %]"
+ id="v[% legal_value.id FILTER html %]_[% field.name FILTER html %]"
+ [% IF value.contains(legal_value.name).size %]
+ selected
+ [% ELSIF bug AND !legal_value.is_visible_on_bug(bug) %]
+ class="bz_hidden_option" disabled
+ [% END %]
+ >[% display_value(field.name, legal_value.name) FILTER html %]</option>
+ [%
+ END;
+ %]
+ </select>
+ </span>
+ </td>
+ </tr>
+[%
+ RETURN;
+ END;
+%]