1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[% title = BLOCK %]Enter [% terms.Bug %]: [% product.name FILTER html %][% END %]
10
11[% PROCESS global/header.html.tmpl
12  title = title
13  yui = [ 'autocomplete', 'calendar', 'datatable', 'button' ]
14  style_urls = [ 'skins/standard/attachment.css',
15                 'skins/standard/enter_bug.css' ]
16  javascript_urls = [ "js/attachment.js", "js/util.js",
17                      "js/field.js", "js/TUI.js", "js/bug.js" ]
18  onload = "set_assign_to(); hideElementById('attachment_true');
19            showElementById('attachment_false'); showElementById('btn_no_attachment');"
20%]
21
22<script type="text/javascript">
23<!--
24
25var initialowners = new Array([% product.components.size %]);
26var last_initialowner;
27var initialccs = new Array([% product.components.size %]);
28var components = new Array([% product.components.size %]);
29var comp_desc = new Array([% product.components.size %]);
30var flags = new Array([% product.components.size %]);
31[% IF Param("useqacontact") %]
32    var initialqacontacts = new Array([% product.components.size %]);
33    var last_initialqacontact;
34[% END %]
35[% count = 0 %]
36[%- FOREACH c = product.components %]
37    [% NEXT IF NOT c.is_active %]
38    components[[% count %]] = "[% c.name FILTER js %]";
39    comp_desc[[% count %]] = "[% c.description FILTER html_light FILTER js %]";
40    initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]";
41    [% flag_list = [] %]
42    [% FOREACH f = c.flag_types.bug %]
43      [% NEXT UNLESS f.is_active %]
44      [% flag_list.push(f.id) %]
45    [% END %]
46    [% FOREACH f = c.flag_types.attachment %]
47      [% NEXT UNLESS f.is_active %]
48      [% flag_list.push(f.id) %]
49    [% END %]
50    flags[[% count %]] = [[% flag_list.join(",") FILTER js %]];
51    [% IF Param("useqacontact") %]
52        initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]";
53    [% END %]
54
55    [% SET initial_cc_list = [] %]
56    [% FOREACH cc_user = c.initial_cc %]
57      [% initial_cc_list.push(cc_user.login) %]
58    [% END %]
59    initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]";
60
61    [% count = count + 1 %]
62[%- END %]
63
64function set_assign_to() {
65    // Based on the selected component, fill the "Assign To:" field
66    // with the default component owner, and the "QA Contact:" field
67    // with the default QA Contact. It also selectively enables flags.
68    var form = document.Create;
69    var assigned_to = form.assigned_to.value;
70
71[% IF Param("useqacontact") %]
72    var qa_contact = form.qa_contact.value;
73[% END %]
74
75    var index = -1;
76    if (form.component.type == 'select-one') {
77        index = form.component.selectedIndex;
78    } else if (form.component.type == 'hidden') {
79        // Assume there is only one component in the list
80        index = 0;
81    }
82    if (index != -1) {
83        var owner = initialowners[index];
84        var component = components[index];
85        if (assigned_to == last_initialowner
86            || assigned_to == owner
87            || assigned_to == '') {
88            form.assigned_to.value = owner;
89            last_initialowner = owner;
90        }
91
92        document.getElementById('initial_cc').innerHTML = initialccs[index];
93        document.getElementById('comp_desc').innerHTML = comp_desc[index];
94
95        [% IF Param("useqacontact") %]
96            var contact = initialqacontacts[index];
97            if (qa_contact == last_initialqacontact
98                || qa_contact == contact
99                || qa_contact == '') {
100                  form.qa_contact.value = contact;
101                  last_initialqacontact = contact;
102            }
103        [% END %]
104
105        // We show or hide the available flags depending on the selected component.
106        var flag_rows = YAHOO.util.Dom.getElementsByClassName('bz_flag_type', 'tbody');
107        for (var i = 0; i < flag_rows.length; i++) {
108            // Each flag table row should have one flag form select element
109            // We get the flag type id from the id attribute of the select.
110            var flag_select = YAHOO.util.Dom.getElementsByClassName('flag_select',
111                                                                    'select',
112                                                                    flag_rows[i])[0];
113            var type_id = flag_select.id.split('-')[1];
114            var can_set = flag_select.options.length > 1 ? 1 : 0;
115            var show = 0;
116            // Loop through the allowed flag ids for the selected component
117            // and if we match, then show the row, otherwise hide the row.
118            for (var j = 0; j < flags[index].length; j++) {
119                if (flags[index][j] == type_id) {
120                    show = 1;
121                    break;
122                }
123            }
124            if (show && can_set) {
125                flag_select.disabled = false;
126                YAHOO.util.Dom.removeClass(flag_rows[i], 'bz_default_hidden');
127            } else {
128                flag_select.disabled = true;
129                YAHOO.util.Dom.addClass(flag_rows[i], 'bz_default_hidden');
130            }
131        }
132    }
133}
134
135var status_comment_required = new Array();
136[% FOREACH status = bug_status %]
137  status_comment_required['[% status.name FILTER js %]'] =
138    [% status.comment_required_on_change_from() ? 'true' : 'false' %]
139[% END %]
140
141TUI_alternates['expert_fields'] = 'Show Advanced Fields';
142// Hide the Advanced Fields by default, unless the user has a cookie
143// that specifies otherwise.
144TUI_hide_default('expert_fields');
145// Also hide the "Paste text as attachment" textarea by default.
146TUI_hide_default('attachment_text_field');
147-->
148</script>
149
150<form name="Create" id="Create" method="post" action="post_bug.cgi"
151      class="enter_bug_form" enctype="multipart/form-data"
152      onsubmit="return validateEnterBug(this)">
153<input type="hidden" name="product" value="[% product.name FILTER html %]">
154<input type="hidden" name="token" value="[% token FILTER html %]">
155
156<table>
157<tbody>
158  <tr>
159    <td colspan="4">
160    [%# Migration note: The following file corresponds to the old Param
161      # 'entryheaderhtml'
162      #%]
163    [% PROCESS 'bug/create/user-message.html.tmpl' %]
164    </td>
165  </tr>
166
167  <tr>
168    <td colspan="2">
169      <a id="expert_fields_controller" class="controller bz_default_hidden"
170         href="javascript:TUI_toggle_class('expert_fields')">Hide
171        Advanced Fields</a>
172      [%# Show the link if the browser supports JS %]
173      <script type="text/javascript">
174        YAHOO.util.Dom.removeClass('expert_fields_controller',
175                                   'bz_default_hidden');
176      </script>
177    </td>
178    <td colspan="2">
179      (<span class="required_star">*</span> =
180      <span class="required_explanation">Required Field</span>)
181   </td>
182  </tr>
183
184  <tr>
185    [% INCLUDE bug/field.html.tmpl
186      bug = default, field = bug_fields.product, editable = 0,
187      value = product.name %]
188    [% INCLUDE bug/field.html.tmpl
189      bug = default, field = bug_fields.reporter, editable = 0,
190      value = user.login %]
191  </tr>
192
193  [%# We can't use the select block in these two cases for various reasons. %]
194  <tr>
195    [% component_desc_url = BLOCK -%]
196      describecomponents.cgi?product=[% product.name FILTER uri %]
197    [% END %]
198    [% INCLUDE "bug/field-label.html.tmpl"
199      field = bug_fields.component editable = 1
200      desc_url = component_desc_url
201    %]
202    <td id="field_container_component">
203      <select name="component" id="component" onchange="set_assign_to();"
204              size="7" aria-required="true" class="required">
205        [%# Build the lists of assignees and QA contacts if "usemenuforusers" is enabled. %]
206        [% IF Param("usemenuforusers") %]
207          [% assignees_list = user.get_userlist.clone %]
208          [% qa_contacts_list = user.get_userlist.clone %]
209        [% END %]
210
211        [%- FOREACH c = product.components %]
212          [% NEXT IF NOT c.is_active %]
213          <option value="[% c.name FILTER html %]"
214                  id="v[% c.id FILTER html %]_component"
215            [% IF c.name == default.component_ %]
216              [%# This is for bug/field.html.tmpl, for visibility-related
217                # controls. %]
218              [% default.component_id = c.id %]
219              selected="selected"
220            [% END %]>
221            [% c.name FILTER html -%]
222          </option>
223          [% IF Param("usemenuforusers") %]
224            [% INCLUDE build_userlist default_user = c.default_assignee,
225                                      userlist = assignees_list %]
226            [% INCLUDE build_userlist default_user = c.default_qa_contact,
227                                      userlist = qa_contacts_list %]
228          [% END %]
229        [%- END %]
230      </select>
231
232      <script type="text/javascript">
233       <!--
234         [%+ INCLUDE "bug/field-events.js.tmpl"
235                     field = bug_fields.component, product = product %]
236       //-->
237       </script>
238    </td>
239
240    <td colspan="2" id="comp_desc_container">
241      [%# Enclose the fieldset in a nested table so that its width changes based
242        # on the length on the component description. %]
243      <table>
244        <tr>
245          <td>
246            <fieldset>
247              <legend>Component Description</legend>
248              <div id="comp_desc" class="comment">Select a component to read its description.</div>
249            </fieldset>
250          </td>
251        </tr>
252      </table>
253    </td>
254  </tr>
255
256  <tr>
257    [% INCLUDE "bug/field-label.html.tmpl"
258      field = bug_fields.version editable = 1 rowspan = 3
259    %]
260    <td rowspan="3">
261      <select name="version" id="version" size="5" aria-required="true"
262              class="required">
263        [%- FOREACH v = version %]
264          [% NEXT IF NOT v.is_active %]
265          <option value="[% v.name FILTER html %]"
266            [% ' selected="selected"' IF v.name == default.version %]>[% v.name FILTER html -%]
267          </option>
268        [%- END %]
269      </select>
270    </td>
271
272    [% INCLUDE bug/field.html.tmpl
273      bug = default, field = bug_fields.bug_severity, editable = 1,
274      value = default.bug_severity %]
275  </tr>
276
277  <tr>
278    [% INCLUDE bug/field.html.tmpl
279      bug = default, field = bug_fields.rep_platform, editable = 1,
280      value = default.rep_platform %]
281  </tr>
282
283  <tr>
284    [% INCLUDE bug/field.html.tmpl
285       bug = default, field = bug_fields.op_sys, editable = 1,
286       value = default.op_sys %]
287  </tr>
288  [% IF (!Param('defaultplatform') || !Param('defaultopsys')) && !cloned_bug_id %]
289    <tr>
290      <th colspan="3">&nbsp;</th>
291      <td id="os_guess_note" class="comment">
292        <div>We've made a guess at your
293        [% IF Param('defaultplatform') %]
294          operating system. Please check it
295        [% ELSIF Param('defaultopsys') %]
296          platform. Please check it
297        [% ELSE %]
298          operating system and platform. Please check them
299        [% END %]
300        and make any corrections if necessary.</div>
301      </td>
302    </tr>
303  [% END %]
304</tbody>
305
306<tbody class="expert_fields">
307  <tr>
308    [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %]
309      [% INCLUDE select field = bug_fields.target_milestone %]
310    [% ELSE %]
311      <td colspan="2">&nbsp;</td>
312    [% END %]
313
314    [% IF Param('letsubmitterchoosepriority') %]
315      [% INCLUDE bug/field.html.tmpl
316        bug = default, field = bug_fields.priority, editable = 1,
317        value = default.priority %]
318    [% ELSE %]
319      <td colspan="2">&nbsp;</td>
320    [% END %]
321  </tr>
322</tbody>
323
324<tbody class="expert_fields">
325  <tr>
326    <td colspan="4">&nbsp;</td>
327  </tr>
328
329  <tr>
330    [% INCLUDE bug/field.html.tmpl
331      bug = default, field = bug_fields.bug_status,
332      editable = (bug_status.size > 1), value = default.bug_status
333      override_legal_values = bug_status %]
334
335    <td>&nbsp;</td>
336    [%# Calculate the number of rows we can use for flags %]
337    [% num_rows = 7 + (Param("useqacontact") ? 1 : 0) +
338                      (user.is_timetracker ? 3 : 0)
339    %]
340
341    <td rowspan="[% num_rows FILTER html %]">
342      [% IF product.flag_types.bug.size > 0 %]
343        [% display_flag_headers = 0 %]
344        [% any_flags_requesteeble = 0 %]
345
346        [% FOREACH flag_type = product.flag_types.bug %]
347          [% NEXT UNLESS flag_type.is_active %]
348          [% display_flag_headers = 1 %]
349          [% SET any_flags_requesteeble = 1 IF flag_type.is_requestable && flag_type.is_requesteeble %]
350        [% END %]
351
352        [% IF display_flag_headers %]
353          [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug
354                                           any_flags_requesteeble = any_flags_requesteeble
355                                           flag_table_id = "bug_flags"
356          %]
357        [% END %]
358      [% END %]
359    </td>
360  </tr>
361
362  <tr>
363    [% INCLUDE "bug/field-label.html.tmpl"
364      field = bug_fields.assigned_to editable = 1
365    %]
366    <td colspan="2">
367      [% INCLUDE global/userselect.html.tmpl
368         id => "assigned_to"
369         name => "assigned_to"
370         value => assigned_to
371         disabled => assigned_to_disabled
372         size => 30
373         emptyok => 1
374         custom_userlist => assignees_list
375       %]
376      <noscript>(Leave blank to assign to component's default assignee)</noscript>
377    </td>
378  </tr>
379
380[% IF Param("useqacontact") %]
381    <tr>
382      [% INCLUDE "bug/field-label.html.tmpl"
383        field = bug_fields.qa_contact editable = 1
384      %]
385      <td colspan="2">
386      [% INCLUDE global/userselect.html.tmpl
387         id => "qa_contact"
388         name => "qa_contact"
389         value => qa_contact
390         disabled => qa_contact_disabled
391         size => 30
392         emptyok => 1
393         custom_userlist => qa_contacts_list
394       %]
395        <noscript>(Leave blank to assign to default qa contact)</noscript>
396      </td>
397    </tr>
398[% END %]
399
400  <tr>
401    [% INCLUDE "bug/field-label.html.tmpl"
402      field = bug_fields.cc editable = 1
403    %]
404    <td colspan="2">
405      [% INCLUDE global/userselect.html.tmpl
406         id => "cc"
407         name => "cc"
408         value => cc
409         disabled => cc_disabled
410         size => 30
411         multiple => 5
412       %]
413    </td>
414  </tr>
415
416  <tr>
417    <th>Default [% field_descs.cc FILTER html %]:</th>
418    <td colspan="2">
419      <div id="initial_cc">
420      </div>
421   </td>
422  </tr>
423
424  <tr>
425    <td colspan="3">&nbsp;</td>
426  </tr>
427
428[% IF user.is_timetracker %]
429  <tr>
430    [% INCLUDE "bug/field-label.html.tmpl"
431      field = bug_fields.estimated_time editable = 1
432    %]
433    <td colspan="2">
434      <input name="estimated_time" size="6" maxlength="6" value="[% estimated_time FILTER html %]">
435    </td>
436  </tr>
437  <tr>
438    [% INCLUDE bug/field.html.tmpl
439      bug = default, field = bug_fields.deadline, value = deadline,
440      editable = 1, value_span = 2 %]
441  </tr>
442
443  <tr>
444    <td colspan="3">&nbsp;</td>
445  </tr>
446[% END %]
447
448  <tr>
449    [% INCLUDE "bug/field-label.html.tmpl"
450      field = bug_fields.alias editable = 1
451    %]
452    <td colspan="2">
453      <input name="alias" size="20" value="[% alias FILTER html %]">
454    </td>
455  </tr>
456
457  <tr>
458    [% INCLUDE "bug/field-label.html.tmpl"
459      field = bug_fields.bug_file_loc editable = 1
460    %]
461    <td colspan="2" class="field_value">
462      <input name="bug_file_loc" id="bug_file_loc" class="text_input"
463             size="40" value="[% bug_file_loc FILTER html %]">
464    </td>
465  </tr>
466</tbody>
467
468<tbody>
469  [% USE Bugzilla %]
470
471  [% FOREACH field = Bugzilla.active_custom_fields %]
472    [% NEXT UNLESS field.enter_bug %]
473    [% SET value = ${field.name}.defined ? ${field.name} : "" %]
474    <tr [% 'class="expert_fields"' IF !field.is_mandatory %]>
475      [% INCLUDE bug/field.html.tmpl
476        bug = default, field = field, value = value, editable = 1,
477        value_span = 3 %]
478    </tr>
479  [% END %]
480</tbody>
481
482<tbody>
483
484  <tr>
485    [% INCLUDE "bug/field-label.html.tmpl"
486      field = bug_fields.short_desc editable = 1
487    %]
488    <td colspan="3" class="field_value">
489      <input name="short_desc" size="70" value="[% short_desc FILTER html %]"
490             maxlength="255" spellcheck="true" aria-required="true"
491             class="required text_input" id="short_desc">
492    </td>
493  </tr>
494
495  [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %]
496    <tr id="possible_duplicates_container" class="bz_default_hidden">
497      <th>Possible<br>Duplicates:</th>
498      <td colspan="3">
499        <div id="possible_duplicates"></div>
500        <script type="text/javascript">
501          var dt_columns = [
502              { key: "id", label: "[% field_descs.bug_id FILTER js %]",
503                formatter: YAHOO.bugzilla.dupTable.formatBugLink },
504              { key: "summary",
505                label: "[% field_descs.short_desc FILTER js %]",
506                formatter: "text" },
507              { key: "status",
508                label: "[% field_descs.bug_status FILTER js %]",
509                formatter: YAHOO.bugzilla.dupTable.formatStatus },
510              { key: "update_token", label: '',
511                formatter: YAHOO.bugzilla.dupTable.formatCcButton }
512          ];
513          YAHOO.bugzilla.dupTable.addCcMessage = "Add Me to the CC List";
514          YAHOO.bugzilla.dupTable.init({
515            container: 'possible_duplicates',
516            columns: dt_columns,
517            product_name: '[% product.name FILTER js %]',
518            summary_field: 'short_desc',
519            options: {
520              MSG_LOADING: 'Searching for possible duplicates...',
521              MSG_EMPTY:   'No possible duplicates found.',
522              SUMMARY:     'Possible Duplicates'
523            }
524          });
525        </script>
526      </td>
527    </tr>
528  [% END %]
529
530  <tr>
531    <th>Description:</th>
532    <td colspan="3">
533
534      [% defaultcontent = BLOCK %]
535        [% IF cloned_bug_id %]
536+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++
537
538
539        [% END %]
540        [%-# We are within a BLOCK. The comment will be correctly HTML-escaped
541          # by global/textarea.html.tmpl. So we must not escape the comment here. %]
542        [% comment FILTER none %]
543      [%- END %]
544      [% INCLUDE global/textarea.html.tmpl
545         name           = 'comment'
546         id             = 'comment'
547         minrows        = 10
548         maxrows        = 25
549         cols           = constants.COMMENT_COLS
550         defaultcontent = defaultcontent
551       %]
552      <br>
553    </td>
554  </tr>
555
556  [% IF user.is_insider %]
557    <tr class="expert_fields">
558      <th>&nbsp;</th>
559      <td colspan="3">
560        &nbsp;&nbsp;
561        <input type="checkbox" id="comment_is_private" name="comment_is_private"
562          [% ' checked="checked"' IF comment_is_private %]
563               onClick="updateCommentTagControl(this, 'comment')">
564        <label for="comment_is_private">
565          Make description and any new attachment private (visible only to members
566          of the <strong>[% Param('insidergroup') FILTER html %]</strong> group)
567        </label>
568        <script>
569          updateCommentTagControl(document.getElementById('comment_is_private'), 'comment');
570        </script>
571      </td>
572    </tr>
573  [% END %]
574
575  [% IF Param("maxattachmentsize") || Param("maxlocalattachment") %]
576  <tr>
577    <th>Attachment:</th>
578    <td colspan="3">
579      <div id="attachment_false" class="bz_default_hidden">
580        <input type="button" value="Add an attachment" onClick="handleWantsAttachment(true)">
581      </div>
582
583      <div id="attachment_true">
584        <input type="button" id="btn_no_attachment" value="Don't add an attachment"
585               class="bz_default_hidden"  onClick="handleWantsAttachment(false)">
586        <fieldset>
587          <legend>Add an attachment</legend>
588          <table class="attachment_entry">
589            [% PROCESS attachment/createformcontents.html.tmpl
590                       flag_types = product.flag_types.attachment
591                       any_flags_requesteeble = 1
592                       flag_table_id ="attachment_flags" %]
593          </table>
594        </fieldset>
595      </div>
596    </td>
597  </tr>
598  [% END %]
599</tbody>
600
601<tbody class="expert_fields">
602  [% IF user.in_group('editbugs', product.id) %]
603    [% IF use_keywords %]
604      <tr>
605        [% INCLUDE bug/field.html.tmpl
606           bug = default, field = bug_fields.keywords, editable = 1,
607           value = keywords, possible_values = all_keywords,
608           desc_url = "describekeywords.cgi", value_span = 2
609        %]
610      </tr>
611    [% END %]
612
613    <tr>
614      [% INCLUDE "bug/field-label.html.tmpl"
615        field = bug_fields.dependson editable = 1
616      %]
617      <td colspan="3">
618        <input name="dependson" accesskey="d" value="[% dependson FILTER html %]">
619      </td>
620    </tr>
621    <tr>
622      [% INCLUDE "bug/field-label.html.tmpl"
623        field = bug_fields.blocked editable = 1
624      %]
625      <td colspan="3">
626        <input name="blocked" accesskey="b" value="[% blocked FILTER html %]">
627      </td>
628    </tr>
629  [% END %]
630</tbody>
631
632<tbody class="expert_fields">
633  [% IF product.groups_available.size %]
634  <tr>
635    <th>&nbsp;</th>
636    <td colspan="3">
637      <br>
638        <strong>
639          Only users in all of the selected groups can view this
640          [%+ terms.bug %]:
641        </strong>
642      <br>
643      <font size="-1">
644        (Leave all boxes unchecked to make this a public [% terms.bug %].)
645      </font>
646      <br>
647      <br>
648
649      <!-- Checkboxes -->
650      <input type="hidden" name="defined_groups" value="1">
651      [% FOREACH group = product.groups_available %]
652        <input type="checkbox" id="group_[% group.id FILTER html %]"
653               name="groups" value="[% group.name FILTER html %]"
654               [% ' checked="checked"' IF default.groups.contains(group.name)
655                                          OR group.is_default %]>
656        <label for="group_[% group.id FILTER html %]">
657          [%- group.description FILTER html_light %]</label><br>
658      [% END %]
659    </td>
660  </tr>
661  [% END %]
662</tbody>
663
664<tbody>
665  [%# Form controls for entering additional data about the bug being created. %]
666  [% Hook.process("form") %]
667
668  <tr>
669    <th>&nbsp;</th>
670    <td colspan="3">
671      <input type="submit" id="commit" value="Submit [% terms.Bug %]">
672      &nbsp;&nbsp;&nbsp;&nbsp;
673      <input type="submit" name="maketemplate" id="maketemplate"
674             value="Remember values as bookmarkable template"
675             onclick="bz_no_validate_enter_bug=true" class="expert_fields">
676    </td>
677  </tr>
678</tbody>
679  </table>
680  <input type="hidden" name="form_name" value="enter_bug">
681</form>
682
683[%# Links or content with more information about the bug being created. %]
684[% Hook.process("end") %]
685
686[% PROCESS global/footer.html.tmpl %]
687
688[%############################################################################%]
689[%# Block for SELECT fields                                                  #%]
690[%############################################################################%]
691
692[% BLOCK select %]
693
694  [% INCLUDE "bug/field-label.html.tmpl"
695    field = field editable = 1
696  %]
697  <td>
698    <select name="[% field.name FILTER html %]"
699            id="[% field.name FILTER html %]">
700    [%- FOREACH x = ${field.name} %]
701      [% NEXT IF NOT x.is_active %]
702      <option value="[% x.name FILTER html %]"
703        [% " selected=\"selected\"" IF x.name == default.${field.name} %]>
704        [% display_value(field.name, x.name) FILTER html %]
705      </option>
706    [% END %]
707    </select>
708  </td>
709[% END %]
710
711[% BLOCK build_userlist %]
712  [% user_found = 0 %]
713  [% default_login = default_user.login %]
714  [% RETURN UNLESS default_login %]
715
716  [% FOREACH user = userlist %]
717    [% IF user.login == default_login %]
718      [% user_found = 1 %]
719      [% LAST %]
720    [% END %]
721  [% END %]
722
723  [% userlist.push({login    => default_login,
724                    identity => default_user.identity,
725                    visible  => 1})
726     UNLESS user_found %]
727[% END %]
728