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[%# INTERFACE: 10 # field: Bugzila::Field; the current field being edited 11 #%] 12 13[% PROCESS "global/field-descs.none.tmpl" %] 14 15<table id="admin_table_edit"> 16 <tr> 17 <th><label for="name">名前:</label></th> 18 <td> 19 [% IF field %] 20 [% field.name FILTER html %] 21 [% ELSE %] 22 <input type="text" id="name" name="name" value="cf_" size="40" maxlength="64" required> 23 [% END %] 24 </td> 25 26 <th> 27 <label for="enter_bug">[% terms.bug %] 作成時に設定可能:</label> 28 </th> 29 <td> 30 <input type="checkbox" id="enter_bug" name="enter_bug" value="1" 31 [%- " checked" IF field.enter_bug %] 32 onchange="toggleCheckbox(this, 'new_bugmail');"> 33 </td> 34 </tr> 35 36 <tr> 37 <th><label for="desc">説明:</label></th> 38 <td> 39 <input type="text" id="desc" name="desc" size="40" 40 value="[% field.description FILTER html %]" required> 41 </td> 42 43 <th> 44 <label for="new_bugmail">新規 [% terms.bugs %] の [% terms.bug %] メールに表示する:</label> 45 </th> 46 <td> 47 <input type="checkbox" id="new_bugmail" name="new_bugmail" value="1" 48 [%- " checked" IF field.mailhead %]> 49 </td> 50 </tr> 51 52 <tr> 53 <th><label for="type">型:</label></th> 54 <td> 55 [% IF field %] 56 [% field_types.${field.type} FILTER html %] 57 [% ELSE %] 58 <select id="type" name="type" onchange="onChangeType(this)"> 59 [% FOREACH type = field_types.keys %] 60 [% NEXT IF type == constants.FIELD_TYPE_UNKNOWN %] 61 <option value="[% type FILTER html %]">[% field_types.$type FILTER html %]</option> 62 [% END %] 63 </select> 64 [% END %] 65 </td> 66 67 <th><label for="obsolete">用済み:</label></th> 68 <td> 69 <input type="checkbox" id="obsolete" name="obsolete" value="1" 70 [%- " checked" IF field.obsolete %]> 71 </td> 72 </tr> 73 74 <tr> 75 <th><label for="sortkey">ソート順:</label></th> 76 <td> 77 <input type="text" id="sortkey" name="sortkey" size="6" maxlength="6" 78 value="[% field.sortkey FILTER html %]"> 79 </td> 80 81 <th><label for="is_mandatory">委任済:</label></th> 82 <td> 83 <input type="checkbox" id="is_mandatory" name="is_mandatory" value="1" 84 [%- ' checked="checked"' IF field.is_mandatory %]> 85 </td> 86 </tr> 87 88 <tr> 89 <th>長い説明:</th> 90 <td> 91 [% INCLUDE global/textarea.html.tmpl 92 name = 'long_desc' 93 id = 'long_desc' 94 minrows = 3 95 maxrows = 5 96 cols = 46 97 defaultcontent = field.long_desc 98 %] 99 </td> 100 101 <th> 102 <label for="visibility_field_id">特定の条件下でのみ利用可能なフィールド:</label> 103 </th> 104 <td> 105 <select name="visibility_field_id" id="visibility_field_id" 106 onchange="onChangeVisibilityField()"> 107 <option></option> 108 [% FOREACH sel_field = Bugzilla.fields({ is_select => 1 }) %] 109 [% NEXT IF field && sel_field.id == field.id %] 110 <option value="[% sel_field.id FILTER html %]" 111 [% ' selected="selected"' 112 IF field && sel_field.id == field.visibility_field.id %]> 113 [% sel_field.description FILTER html %] 114 ([% sel_field.name FILTER html %]) 115 </option> 116 [% END %] 117 </select> 118 <br> 119 <label for="visibility_values"> 120 <strong>設定対象:</strong> 121 </label> 122 <br> 123 <select multiple="multiple" size="5" name="visibility_values" 124 id="visibility_values" class="field_value"> 125 [% IF field %] 126 [% FOREACH value = field.visibility_field.legal_values %] 127 <option value="[% value.id FILTER html %]" 128 [% " selected" IF field.visibility_values.contains(value) %]> 129 [% IF field.visibility_field.name == 'component' %] 130 [% display_value('product', value.product.name) FILTER html %]: 131 [% END %] 132 [%+ display_value(field.visibility_field.name, value.name) FILTER html %] 133 </option> 134 [% END %] 135 [% ELSE %] 136 <option value=""></option> 137 [% END %] 138 </select> 139 </td> 140 </tr> 141 142 [% IF !field || field.is_select || field.type == constants.FIELD_TYPE_BUG_ID %] 143 <tr> 144 [% IF field.is_select %] 145 <th> </th> 146 <td> 147 <a href="editvalues.cgi?field=[% field.name FILTER uri %]">このフィールドの有効な値リストを編集</a> 148 </td> 149 [% ELSE %] 150 <th> 151 <label for="reverse_desc">逆向きの関係性:</label> 152 </th> 153 <td> 154 <input type="text" id="reverse_desc" name="reverse_desc" size="40" 155 value="[% field.reverse_desc FILTER html %]" 156 [% ' disabled="disabled"' IF !field %]> 157 <br> 158 このラベルは、この 159 [%+ field_types.${constants.FIELD_TYPE_BUG_ID} FILTER html %] 160 フィールドを持つような [% terms.bugs %] 161 のリストに対するラベルとして利用できます。 162 たとえば、説明が"の重複"であるような場合に、逆向きの説明は 163 "この [% terms.bug %] への重複" となります。 164 このフィールドへのリストを無効化する場合は空白にしてください。 165 </td> 166 [% END %] 167 168 [% IF !field || field.is_select %] 169 <th> 170 <label for="value_field_id"> 171 このフィールドに出現する<br> 172 値を決定するためのフィールド : 173 </label> 174 </th> 175 <td> 176 <select name="value_field_id" id="value_field_id" 177 [% ' disabled="disabled"' IF !field %]> 178 <option></option> 179 [% FOREACH sel_field = Bugzilla.fields({ is_select => 1 }) %] 180 [% NEXT IF field && sel_field.id == field.id %] 181 <option value="[% sel_field.id FILTER html %]" 182 [% ' selected="selected"' IF field && sel_field.id == field.value_field.id %]> 183 [% sel_field.description FILTER html %] 184 ([% sel_field.name FILTER html %]) 185 </option> 186 [% END %] 187 </select> 188 </td> 189 [% ELSE %] 190 <th></th> 191 <td></td> 192 [% END %] 193 </tr> 194 [% END %] 195</table> 196