Skip to content

Instantly share code, notes, and snippets.

@zzzeek
Created May 28, 2013 14:04
Show Gist options
  • Select an option

  • Save zzzeek/5662983 to your computer and use it in GitHub Desktop.

Select an option

Save zzzeek/5662983 to your computer and use it in GitHub Desktop.
--- trac/ticket/templates/ticket.html 2013-01-31 19:47:40.000000000 -0500
+++ trac/ticket/templates/ticket.html 2013-05-27 12:40:14.000000000 -0400
@@ -326,6 +326,22 @@
$controls
<span class="hint" py:for="hint in hints">$hint</span>
</div>
+
+ <py:for each="field in fields">
+ <py:choose>
+ <span py:when="field.cc_entry"><!--! Special case for Cc: field -->
+ <label for="field-${field.name}" py:if="field"
+ py:strip="field.type == 'radio'" i18n:msg="field">${
+ field.edit_label or field.label or field.name}:</label>
+ <em>${field.cc_entry}</em>
+ <input type="checkbox" id="field-cc" name="cc_update"
+ title="This checkbox allows you to add or remove yourself from the CC list."
+ checked="${field.cc_update}" />
+
+ </span>
+ </py:choose>
+ </py:for>
+
</fieldset>
<py:otherwise>
<py:for each="key, label, controls, hints in action_controls">
diff -ur ./trac/ticket/web_ui.py /Users/classic/dev/trac/Trac-1.0.1/trac/ticket/web_ui.py
--- trac/ticket/web_ui.py 2013-01-31 19:47:40.000000000 -0500
+++ trac/ticket/web_ui.py 2013-05-27 12:35:43.000000000 -0400
@@ -1203,6 +1203,10 @@
"reporter."))
valid = False
changed.discard('reporter')
+
+ if 'cc' in changed:
+ changed.discard('cc')
+
if changed and 'TICKET_CHGPROP' not in req.perm(resource):
add_warning(req, _("No permission to change ticket fields."))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment