[%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Guy Pyrzak # Portions created by the Initial Developer are Copyright (C) 2010 the # Initial Developer. All Rights Reserved. # # Contributor(s): Guy Pyrzak # Reed Loden # #%] [%# INTERFACE: # field: a Bugzilla::Field object # value: the value or values that should be used to prepopulate the field # accesskey: the access key used to access the field more quickly # onchange: js to run when the change event fires on the field # type_selected: used by the free text to indicate which type of text # search was selected for a particular field #%] [% SWITCH field.type %] [% CASE [ constants.FIELD_TYPE_FREETEXT, constants.FIELD_TYPE_TEXTAREA, constants.FIELD_TYPE_UNKNOWN ] %] [% INCLUDE "bug/field-label.html.tmpl" field = field tag_name = "span" editable = 1 %] [% INCLUDE "search/type-select.html.tmpl" name = field.name _ "_type", types = types, selected = type_selected %] [% CASE constants.FIELD_TYPE_KEYWORDS %] [% INCLUDE "bug/field-label.html.tmpl" field = field tag_name = "span" editable = 1 %] [% INCLUDE "search/type-select.html.tmpl" name = field.name _ "_type", types = types, selected = type_selected %]
[% CASE constants.FIELD_TYPE_DATETIME %] [% INCLUDE "bug/field-label.html.tmpl" field = field tag_name = "span" editable = 1 %] from to (YYYY-MM-DD or relative dates) [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, constants.FIELD_TYPE_MULTI_SELECT ] %]
[% INCLUDE "bug/field-label.html.tmpl" field = field editable = 1 tag_name = "span" %]
[% IF value_controllers.${field.name}.defined %] [% END %] [% IF duplicates.${field.name}.keys.size %] [% SET field_dups = duplicates.${field.name} %] [% SET dup_counts = duplicate_count.${field.name} %] [% END %] [% END %] [%# END OF SWITCH %] [% BLOCK controller_js %] [%# If there are selected values already, we need to fire the # "change" event once the page has loaded, so we can set all # the values in all the other