]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-close-signature.patch
- show xml files inline
[packages/eventum.git] / eventum-close-signature.patch
CommitLineData
1ef5c80b
ER
1adds "Add signature" feature to issue close page, ie if you send issue close
2comments to all issue notification list members it's nice to have email
3signature appended. feature request by slay.
4
5--- eventum-1.7.1/close.php 2006-03-31 12:03:17.580792647 +0300
6+++ /home/glen/close.php 2006-03-31 12:04:45.222748601 +0300
7@@ -80,5 +80,9 @@
8 ));
9 }
10
11+$usr_id = Auth::getUserID();
12+$user_prefs = Prefs::get($usr_id);
13+$tpl->assign("current_user_prefs", $user_prefs);
14+
15 $tpl->displayTemplate();
16-?>
17\ No newline at end of file
18+?>
19--- eventum-1.7.1/templates/en/close.tpl.html 2006-03-31 12:03:17.310786621 +0300
20+++ /home/glen/close.tpl.html 2006-03-31 12:04:47.462798592 +0300
21@@ -90,6 +90,22 @@
22 cell.style.background = "{/literal}{$internal_color}{literal}";
23 }
24 }
25+
26+var old_reason = '';
27+function setSignature(f)
28+{
29+{/literal}
30+ var signature = "{$current_user_prefs.email_signature|replace:'"':'\"'|replace:"\r":""|replace:"\n":'\n'}";
31+{literal}
32+ if (f.add_email_signature.checked) {
33+ old_reason = f.reason.value;
34+ f.reason.value += "\n";
35+ f.reason.value += signature;
36+ } else {
37+ f.reason.value = old_reason;
38+ }
39+}
40+
41 //-->
42 </script>
43 {/literal}
44@@ -159,7 +175,10 @@
45 <b>Reason for closing issue: *</b><br />
46 </td>
47 <td bgcolor="{$light_color}" class="default">
48- <textarea name="reason" rows="8" style="width: 97%"></textarea>
49+ <textarea name="reason" rows="8" style="width: 97%">{if $current_user_prefs.auto_append_sig == 'yes'}
50+
51+
52+{$current_user_prefs.email_signature|escape:"html"}{/if}</textarea>
53 {include file="error_icon.tpl.html" field="reason"}
54 </td>
55 </tr>
56@@ -205,6 +224,16 @@
57 <tr>
58 <td><input class="button" type="button" value="&lt;&lt; Back" onClick="javascript:history.go(-1);"></td>
59 <td width="100%" align="center"><input class="button" type="submit" value="Close Issue"></td>
60+
61+ {if $current_user_prefs.email_signature != "" and $current_user_prefs.auto_append_sig != 'yes'}
62+ <td class="default_white" align="right" width="150">
63+ <nobr>
64+ <input type="checkbox" name="add_email_signature" value="yes" onClick="javascript:setSignature(this.form);">
65+ <a id="white_link" class="white_link" href="javascript:void(null);" onClick="javascript:toggleCheckbox('close_form', 'add_email_signature');setSignature(getForm('close_form'));">Add Email Signature</a>
66+ &nbsp;&nbsp;
67+ </nobr>
68+ </td>
69+ {/if}
70 </tr>
71 </table>
72 </td>
This page took 0.117097 seconds and 4 git commands to generate.