]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-close-signature.patch
- memory limit patches merged
[packages/eventum.git] / eventum-close-signature.patch
1 adds "Add signature" feature to issue close page, ie if you send issue close
2 comments to all issue notification list members it's nice to have email
3 signature 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/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 --- eventum-localization-dev2/templates/close.tpl.html~ 2006-06-02 00:56:06.638714939 +0300
57 +++ eventum-localization-dev2/templates/close.tpl.html  2006-06-02 00:57:12.060184006 +0300
58 @@ -222,7 +222,16 @@
59                <tr>
60                  <td><input class="button" type="button" value="&lt;&lt; {t}Back{/t}" onClick="javascript:history.go(-1);"></td>
61                  <td width="100%" align="center"><input class="button" type="submit" value="{t}Close Issue{/t}"></td>
62 -              </tr>
63 +                {if $current_user_prefs.email_signature != "" and $current_user_prefs.auto_append_sig != 'yes'}
64 +                <td class="default_white" align="right" width="150">
65 +                  <nobr>
66 +                  <input type="checkbox" name="add_email_signature" value="yes" onClick="javascript:setSignature(this.form);">
67 +                  <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>
68 +                  &nbsp;&nbsp;
69 +                  </nobr>
70 +                </td>
71 +                {/if}
72 +            </tr>
73              </table>
74            </td>
75          </tr>
This page took 0.036045 seconds and 3 git commands to generate.