OLD | NEW |
(Empty) | |
| 1 <div id="makechanges"> |
| 2 [# Note: user must have AddIssueComment permission to even include this file. ] |
| 3 |
| 4 <div class="h4" style="margin-bottom: 0" |
| 5 ><label for="addCommentTextArea">Add a comment |
| 6 [if-any offer_make_changes]and make changes[end]</label> |
| 7 </div> |
| 8 <div id="makechangesarea" class="closed" style="margin-top:0; padding:5px"> |
| 9 |
| 10 [if-any discourage_plus_one][if-any page_perms.SetStar][if-any read_only][els
e] |
| 11 <div class="updates" style="margin-bottom: 1em; padding-left:5px"> |
| 12 <a class="star" id="star2" style="text-decoration:none; cursor:pointer; col
or:[if-any starred]cornflowerblue[else]gray[end]" title="[if-any starred]Un-s[el
se]S[end]tar this issue"> |
| 13 [if-any starred]★[else]☆[end] |
| 14 </a> |
| 15 <b id="vote_feedback">Vote for this issue and get email change notification
s</b> |
| 16 </div> |
| 17 [end][end][end] |
| 18 |
| 19 <div> |
| 20 <form action="detail.do" id="issue_update_form" |
| 21 method="POST" enctype="multipart/form-data"> |
| 22 <input type="hidden" name="_charset_" value=""> |
| 23 <input type="hidden" name="token" value="[form_token]"> |
| 24 <input type="hidden" name="id" value="[issue.local_id]"> |
| 25 <input type="hidden" name="can" value="[can]"> |
| 26 <input type="hidden" name="q" value="[query]"> |
| 27 <input type="hidden" name="colspec" value="[colspec]"> |
| 28 <input type="hidden" name="sort" value="[sortspec]"> |
| 29 <input type="hidden" name="groupby" value="[groupby]"> |
| 30 <input type="hidden" name="start" value="[start]"> |
| 31 <input type="hidden" name="num" value="[num]"> |
| 32 <input type="hidden" name="pagegen" value="[pagegen]"> |
| 33 <table cellpadding="0" cellspacing="0" border="0"> |
| 34 <tr> |
| 35 <td> |
| 36 [if-any errors.comment] |
| 37 <div class="fielderror">[errors.comment]</div> |
| 38 [end] |
| 39 <textarea cols="80" rows="8" name="comment" id="addCommentTextArea" |
| 40 class="issue_text">[initial_comment]</textarea><br> |
| 41 [if-any allow_attachments] |
| 42 <div id="attachmentarea"></div> |
| 43 <span id="attachprompt"><img width="16" height="16" src="/static/images/p
aperclip.png" border="0" |
| 44 alt="A paperclip"> |
| 45 <a href="#" id="attachafile">Attach a file</a></span> |
| 46 <span id="attachmaxsize" style="margin-left:2em; display:none">Max. attac
hments per comment: [max_attach_size]</span><br> |
| 47 [if-any errors.attachments] |
| 48 <div class="fielderror">[errors.attachments]</div> |
| 49 [end] |
| 50 [else] |
| 51 <div style="color:#666">Issue attachment storage quota exceeded.</div> |
| 52 [end] |
| 53 <br> |
| 54 </td> |
| 55 [if-any discourage_plus_one] |
| 56 <td valign="top"> |
| 57 <div class="tip"> |
| 58 Each comment triggers notification emails. |
| 59 So, please do not post |
| 60 "<tt style="white-space:nowrap">+1 Me too!</tt>".<br> |
| 61 Instead, click the star icon. |
| 62 </div> |
| 63 </td> |
| 64 [end] |
| 65 </tr> |
| 66 <tr> |
| 67 <td> |
| 68 <table cellspacing="0" cellpadding="3" border="0" class="rowmajor"> |
| 69 [# Only show specific issue fields if the user can edit them.] |
| 70 [if-any page_perms.EditIssue page_perms.EditIssueSummary] |
| 71 <tr><th style="width: 1em"><label for="summary">Summary:</label></th> |
| 72 <td class="inplace" colspan="2"> |
| 73 <input type="text" size="90" |
| 74 name="summary" id="summary" value="[initial_summary]"> |
| 75 [if-any errors.summary] |
| 76 <div class="fielderror">[errors.summary]</div> |
| 77 [end] |
| 78 </td> |
| 79 </tr> |
| 80 [end] |
| 81 |
| 82 |
| 83 [if-any page_perms.EditIssue page_perms.EditIssueStatus] |
| 84 <tr><th><label for="statusedit">Status:</label></th><td class="inplace" c
olspan="2"> |
| 85 <input type="text" id="statusedit" style="width: 12em" autocomplete=
"off" |
| 86 name="status" value="[initial_status]"> |
| 87 <span id="merge_area" style="margin-left:2em;"> |
| 88 Merge into issue: |
| 89 <input type="text" id="merge_into" name="merge_into" style="width
: 5em" |
| 90 value="[is initial_merge_into "0"][else][initial_merge_int
o][end]"> |
| 91 </span> |
| 92 [if-any errors.merge_into_id] |
| 93 <div class="fielderror">[errors.merge_into_id]</div> |
| 94 [end] |
| 95 </td> |
| 96 </tr> |
| 97 [end] |
| 98 |
| 99 [if-any page_perms.EditIssue page_perms.EditIssueOwner] |
| 100 <tr><th><label for="owneredit">Owner:</label></th><td class="inplace"> |
| 101 <input type="text" id="owneredit" autocomplete="off" |
| 102 style="width: 12em" |
| 103 name="owner" value="[is initial_owner "----"][else][initia
l_owner][end]"> |
| 104 [if-any errors.owner] |
| 105 <div class="fielderror" id="ownererror">[errors.owner]</div> |
| 106 [end] |
| 107 </td> |
| 108 </tr> |
| 109 [end] |
| 110 |
| 111 [if-any page_perms.EditIssue page_perms.EditIssueCc] |
| 112 <tr><th><label for="memberccedit">Cc:</label></th><td class="inplace" col
span="2"> |
| 113 <input type="text" multiple id="memberccedit" size="90" autocomplete
="off" |
| 114 name="cc" value="[initial_cc]"> |
| 115 [if-any errors.cc] |
| 116 <div class="fielderror">[errors.cc]</div> |
| 117 [end] |
| 118 </td></tr> |
| 119 [end] |
| 120 |
| 121 [if-any page_perms.EditIssue] [# TODO(jrobbins): page_perms.EditIssueComp
onent] |
| 122 <tr><th><label for="componentedit">Components:</label></th><td class="inp
lace" colspan="2"> |
| 123 <input type="text" id="componentedit" size="90" autocomplete="off" |
| 124 name="components" value="[initial_components]"> |
| 125 [if-any errors.components] |
| 126 <div class="fielderror">[errors.components]</div> |
| 127 [end] |
| 128 </td></tr> |
| 129 [end] |
| 130 |
| 131 [if-any page_perms.EditIssue][# Show field editing elements iff user can e
dit.] |
| 132 [define any_fields_to_reveal]No[end] |
| 133 <tbody class="collapse"> |
| 134 [for fields] |
| 135 [if-any fields.applicable] |
| 136 [# TODO(jrobbins): determine applicability dynamically and update f
ields in JS] |
| 137 <tr [if-any fields.display][else]class="ifExpand"[define any_fields
_to_reveal]Yes[end][end]> |
| 138 <th class="vt" title="[fields.field_def.docstring_short][if-any f
ields.field_def.validate_help] |
| 139 [fields.field_def.validate_help][end]">[fie
lds.field_name]:</th> |
| 140 <td class="vt"> |
| 141 [include "field-value-widgets.ezt" fields.field_def.is_multival
ued_bool] |
| 142 <div class="fielderror" style="display:none" id="error_custom_[
fields.field_id]"></div> |
| 143 </td> |
| 144 <tr> |
| 145 [end] |
| 146 [end] |
| 147 [is any_fields_to_reveal "Yes"] |
| 148 <tr class="ifCollapse"> |
| 149 <td colspan="2"><a href="#" class="toggleCollapse">Show all fields<
/a><t/td> |
| 150 </tr> |
| 151 [end] |
| 152 </tbody> |
| 153 [end] |
| 154 |
| 155 |
| 156 [if-any page_perms.EditIssue][# Show label editing elements iff the user c
an edit.] |
| 157 <tr><th class="vt"><label for="label0">Labels:</label></th> |
| 158 <td class="labelediting" colspan="2"> |
| 159 [include "label-fields.ezt" "just-two"] |
| 160 </td> |
| 161 </tr> |
| 162 |
| 163 <tr><th style="white-space:nowrap"><label for="blocked_on">Blocked on:</l
abel></th> |
| 164 <td class="inplace" colspan="2"> |
| 165 <input type="text" name="blocked_on" id="blocked_on" value="[initial_bl
ocked_on]"> |
| 166 [if-any errors.blocked_on] |
| 167 <div class="fielderror">[errors.blocked_on]</div> |
| 168 [end] |
| 169 </td> |
| 170 </tr> |
| 171 <tr><th><label for="blocking">Blocking:</label></th> |
| 172 <td class="inplace" colspan="2"> |
| 173 <input type="text" name="blocking" id="blocking" value="[initial_blocki
ng]" /> |
| 174 [if-any errors.blocking] |
| 175 <div class="fielderror">[errors.blocking]</div> |
| 176 [end] |
| 177 </td> |
| 178 </tr> |
| 179 |
| 180 <tr id="copy_issue_form_fragment" style="display:none"> |
| 181 <td style="white-space:nowrap"> |
| 182 <b><label for="copy_to">Copy to project:</label> </b> |
| 183 </td> |
| 184 <td> |
| 185 <input type="text" name="copy_to" id="copy_to" autocomplete="off" |
| 186 [if-any errors.copy_to_project]value="[errors.copy_to_project]"
[else]value="[projectname]"[end] > |
| 187 <span id="derived_labels_target"></span> |
| 188 [if-any errors.copy_to] |
| 189 <div class="fielderror">[errors.copy_to]</div> |
| 190 [end] |
| 191 </td> |
| 192 </tr> |
| 193 |
| 194 <tr id="move_issue_form_fragment" style="display:none"> |
| 195 <td style="white-space:nowrap"> |
| 196 <b><label for="move_to">Move to project:</label> </b> |
| 197 </td> |
| 198 <td> |
| 199 <input type="text" name="move_to" id="move_to" autocomplete="off" |
| 200 [if-any errors.move_to_project]value="[errors.move_to_project]"
[end] > |
| 201 <span id="derived_labels_target"></span> |
| 202 [if-any errors.move_to] |
| 203 <div class="fielderror">[errors.move_to]</div> |
| 204 [end] |
| 205 </td> |
| 206 </tr> |
| 207 |
| 208 [end][# if page_perms.EditIssue] |
| 209 |
| 210 [if-any show_captcha] |
| 211 <tr><th class="vt" style="white-space:nowrap">Human Verification:</th> |
| 212 <td colspan="2"> |
| 213 [include "../framework/captcha-field.ezt"] |
| 214 </td> |
| 215 </tr> |
| 216 [end] |
| 217 |
| 218 [include "../framework/label-validation-row.ezt"] |
| 219 </table> |
| 220 |
| 221 <input type="submit" id="submit_btn" name="btn" value="Save changes"> |
| 222 <input type="button" id="discard" name="nobtn" value="Discard" data-local
-id="[issue.local_id]"> |
| 223 [if-any page_perms.EditIssue] |
| 224 <span style="margin-left:1.5em"><label for="after_issue_update">And then:
</label></span> |
| 225 <select name="after_issue_update" id="after_issue_update"> |
| 226 <option value="0" [is after_issue_update "0"]selected=selected[end]>Go u
p to issue list</option> |
| 227 <option value="1" [is after_issue_update "1"]selected=selected[end]>Stay
on this issue</option> |
| 228 <option value="2" [is after_issue_update "2"]selected=selected[end]>Go t
o next issue</option> |
| 229 </select> |
| 230 <input type="hidden" name="next_id" value="[if-any flipper.show][flipper.
next_id][else][end]"> |
| 231 [end] |
| 232 |
| 233 [if-any page_perms.EditIssue] |
| 234 <input type="checkbox" checked="checked" name="send_email" id="send_email
" |
| 235 style="margin-left:1.5em"> |
| 236 <label for="send_email" title="Send issue change notifications to interes
ted users">Send email</label> |
| 237 [end] |
| 238 |
| 239 [if-any page_perms.DeleteIssue] |
| 240 <label for="more_actions" style="margin-left:3em">More actions:</label> |
| 241 <select name="more_actions" id="more_actions" style="display:none"> |
| 242 <option value="0" selected="selected" disabled="1">More actions...</opti
on> |
| 243 <option value="delete">Delete issue</option> |
| 244 <option value="copy" [if-any offer_issue_copy_move][else]disabled="disab
led"[end]>Copy issue</option> |
| 245 <option value="move" [if-any offer_issue_copy_move][else]disabled="disab
led"[end]>Move issue</option> |
| 246 </select> |
| 247 [end] |
| 248 |
| 249 </td> |
| 250 </tr> |
| 251 </table> |
| 252 </form> |
| 253 |
| 254 [if-any page_perms.DeleteIssue] |
| 255 <div id="delete_div"><br><br> |
| 256 <form action="delete.do" method="post" id="delete_form"> |
| 257 <input type="hidden" name="token" value="[delete_form_token]"> |
| 258 <input type="hidden" name="id" value="[issue.local_id]"> |
| 259 <input type="hidden" name="delete" value="true"> |
| 260 <input type="submit" name="deletebtn" value="Delete issue"> |
| 261 </form> |
| 262 </div> |
| 263 |
| 264 <script type="text/javascript" nonce="[nonce]"> |
| 265 runOnLoad(function() { |
| 266 [# Hide the non-js UI and show a better UI to users that have JS enabled.] |
| 267 [if-any errors.copy_to][else] |
| 268 document.getElementById('copy_issue_form_fragment').style.display = "none"; |
| 269 [end] |
| 270 [if-any errors.move_to][else] |
| 271 document.getElementById('move_issue_form_fragment').style.display = "none"; |
| 272 [end] |
| 273 [if-any page_perms.DeleteIssue] |
| 274 document.getElementById('delete_div').style.display = "none"; |
| 275 [end] |
| 276 |
| 277 // TODO(jobbins): _attachIssueMoveValidator('move_to', '[issue.local_id]'); |
| 278 }); |
| 279 </script> |
| 280 |
| 281 <script type="text/javascript" nonce="[nonce]"> |
| 282 runOnLoad(function() { |
| 283 var more_actions = document.getElementById('more_actions'); |
| 284 more_actions.style.display = ""; |
| 285 }); |
| 286 </script> |
| 287 [end] |
| 288 |
| 289 |
| 290 </div>[# makechangesarea] |
| 291 </div>[# makechanges] |
| 292 |
| 293 |
| 294 <script type="text/javascript" nonce="[nonce]"> |
| 295 runOnLoad(function() { |
| 296 if ($("attachafile")) { |
| 297 $("attachafile").addEventListener("click", function(event) { |
| 298 _addAttachmentFields("attachmentarea"); |
| 299 event.preventDefault(); |
| 300 }); |
| 301 } |
| 302 |
| 303 if ($("addCommentTextArea")) { |
| 304 $("addCommentTextArea").addEventListener("keyup", function(event) { |
| 305 _dirty(); |
| 306 return true; |
| 307 }); |
| 308 } |
| 309 |
| 310 if ($("submit_btn")) { |
| 311 $("submit_btn").addEventListener("focus", function(event) { |
| 312 _acrob(null); |
| 313 }); |
| 314 $("submit_btn").addEventListener("mousedown", function(event) { |
| 315 _acrob(null); |
| 316 }); |
| 317 $("submit_btn").addEventListener("click", function(event) { |
| 318 _trimCommas(); |
| 319 userMadeChanges = false; |
| 320 TKR_isDirty = false; |
| 321 }); |
| 322 } |
| 323 if ($("discard")) { |
| 324 $("discard").addEventListener("focus", function(event) { |
| 325 _acrob(null); |
| 326 }); |
| 327 $("discard").addEventListener("click", function(event) { |
| 328 _acrob(null); |
| 329 _confirmDiscardUpdate('detail?id=' + event.target.getAttribute("data-local
-id")); |
| 330 return false; |
| 331 }); |
| 332 } |
| 333 if ($("more_actions")) { |
| 334 $("more_actions").addEventListener("change", function(event) { |
| 335 _handleDetailActions(); |
| 336 }); |
| 337 } |
| 338 |
| 339 if ($("summary")) { |
| 340 $("summary").addEventListener("focus", function(event) { |
| 341 _acrob(null); |
| 342 _acof(event); |
| 343 }); |
| 344 $("summary").addEventListener("keyup", function(event) { |
| 345 _dirty(); |
| 346 return true; |
| 347 }); |
| 348 } |
| 349 if ($("blocked_on")) { |
| 350 $("blocked_on").addEventListener("focus", function(event) { |
| 351 _acrob(null); |
| 352 _acof(event); |
| 353 }); |
| 354 $("blocked_on").addEventListener("keyup", function(event) { |
| 355 _dirty(); |
| 356 return true; |
| 357 }); |
| 358 } |
| 359 if ($("statusedit")) { |
| 360 $("statusedit").addEventListener("focus", function(event) { |
| 361 _acof(event); |
| 362 }); |
| 363 $("statusedit").addEventListener("keyup", function(event) { |
| 364 _dirty(); |
| 365 return _confirmNovelStatus($("statusedit")); |
| 366 }); |
| 367 } |
| 368 |
| 369 var _idsToAddDefaultListeners = [[] |
| 370 "owneredit", "memberccedit", "componentedit", "copy_to", "move_to"]; |
| 371 for (var i = 0; i < _idsToAddDefaultListeners.length; i++) { |
| 372 var id = _idsToAddDefaultListeners[[]i]; |
| 373 if ($(id)) { |
| 374 $(id).addEventListener("focus", function(event) { |
| 375 _acof(event); |
| 376 }); |
| 377 $(id).addEventListener("keyup", function(event) { |
| 378 _dirty(); |
| 379 return true; |
| 380 }); |
| 381 } |
| 382 } |
| 383 |
| 384 _allOrigLabels = [[] |
| 385 "[label0]", "[label1]", "[label2]", "[label3]", "[label4]", |
| 386 "[label5]", "[label6]", "[label7]", "[label8]", "[label9]", |
| 387 "[label10]", "[label11]", "[label12]", "[label13]", "[label14]", |
| 388 "[label15]", "[label16]", "[label17]", "[label18]", "[label19]", |
| 389 "[label20]", "[label21]", "[label22]", "[label23]"]; |
| 390 |
| 391 _lfidprefix = 'labeledit'; |
| 392 |
| 393 window.allowSubmit = true; |
| 394 $("issue_update_form").addEventListener("submit", function(event) { |
| 395 if (!_checkPlusOne()) |
| 396 event.preventDefault(); |
| 397 [# User cannot remove restricted labels if they cannot see them.] |
| 398 [if-any page_perms.EditIssue] |
| 399 if (!_checkUnrestrict([if-any prevent_restriction_removal]true[else]false[e
nd])) |
| 400 event.preventDefault(); |
| 401 [end] |
| 402 if (allowSubmit) { |
| 403 allowSubmit = false; |
| 404 $("submit_btn").value = "Adding comment..."; |
| 405 $("submit_btn").disabled = "disabled"; |
| 406 } |
| 407 else { |
| 408 event.preventDefault(); |
| 409 } |
| 410 }); |
| 411 |
| 412 if ($("star2")) |
| 413 $("star2").addEventListener("click", function (event) { |
| 414 _TKR_toggleStar($("star2"), "[projectname]", [issue.local_id], "[set_star
_token]"); |
| 415 _TKR_syncStarIcons($("star2"), "star"); |
| 416 }); |
| 417 |
| 418 if ($("flag_spam")) { |
| 419 $("flag_spam").addEventListener("click", function(event) { |
| 420 $("spam_form").submit(); |
| 421 return; |
| 422 }); |
| 423 } |
| 424 }); |
| 425 </script> |
| 426 |
| 427 [# If the user can edit issue metadata, we need to do a bunch of JS setup for ed
iting features. |
| 428 Otherwise, if they can only enter comments, they still might need to retry a
failed CAPTCHA. ] |
| 429 |
| 430 [if-any page_perms.EditIssue page_perms.EditIssueStatus page_perms.EditIssueOwne
r page_perms.EditIssueCc] |
| 431 <script type="text/javascript" nonce="[nonce]"> |
| 432 runOnLoad(function() { |
| 433 [if-any page_perms.EditIssue] |
| 434 _exposeExistingLabelFields(); |
| 435 [end] |
| 436 |
| 437 [if-any errors.custom_fields] |
| 438 [for errors.custom_fields] |
| 439 var field_error; |
| 440 field_error = document.getElementById('error_custom_' + [errors.custom_fie
lds.field_id]); |
| 441 field_error.innerText = "[errors.custom_fields.message]"; |
| 442 field_error.style.display = ""; |
| 443 [end] |
| 444 [end] |
| 445 |
| 446 |
| 447 function checksubmit() { |
| 448 var restrict_to_known = [if-any restrict_to_known]true[else]false[end]; |
| 449 var submit = $('submit_btn'); |
| 450 var blocksubmitmsg = $('blocksubmitmsg'); |
| 451 var cg = $('cg'); |
| 452 if (cg != undefined) { submit.disabled='disabled'; } |
| 453 var confirmmsg = $('confirmmsg'); |
| 454 var statusedit = $('statusedit'); |
| 455 var merge_area = $('merge_area'); |
| 456 var statuses_offer_merge = [[] [for statuses_offer_merge]"[statuses_offer_merg
e]"[if-index statuses_offer_merge last][else],[end][end] ]; |
| 457 if ((restrict_to_known && confirmmsg && confirmmsg.innerText) || |
| 458 (blocksubmitmsg && blocksubmitmsg.innerHTML) || |
| 459 (cg && cg.value == "") || |
| 460 (!allowSubmit)) { |
| 461 submit.disabled='disabled'; |
| 462 } else { |
| 463 submit.disabled=''; |
| 464 } |
| 465 |
| 466 if (statusedit) { |
| 467 var offer_merge = 'none'; |
| 468 for (var i = 0; i < statuses_offer_merge.length; i++) { |
| 469 if (statusedit.value == statuses_offer_merge[[]i]) offer_merge = ''; |
| 470 } |
| 471 merge_area.style.display = offer_merge; |
| 472 } |
| 473 } |
| 474 |
| 475 [if-any any_errors] |
| 476 // Take user directly to the errors. |
| 477 if (!location.hash) { |
| 478 location.hash = "#makechanges"; |
| 479 } |
| 480 [end] |
| 481 |
| 482 checksubmit(); |
| 483 setInterval(checksubmit, 700); [# catch changes that were not keystrokes, e.g.,
paste menu item.] |
| 484 |
| 485 }); |
| 486 </script> |
| 487 [end] |
| 488 |
| 489 |
| 490 [include "field-value-widgets-js.ezt"] |
OLD | NEW |