~eventum-developers/eventum/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{include file="header.tpl.html"}

{if $post_result != ''}
<br />
<center>
{if $post_result == -1}
  <span class="default">
  <b>{t}An error occurred while trying to run your query{/t}</b>
  </span>
{else}
  <span class="default">
  <b>{t}Thank you, the internal note was posted successfully.{/t}</b>
  </span>
  {include file="app_messages.tpl.html"}
{/if}
</center>
<script type="text/javascript">
<!--
{if $current_user_prefs.close_popup_windows}
setTimeout('closeAndRefresh()', 2000);
{/if}
//-->
</script>
<br />
  {if not $current_user_prefs.close_popup_windows}
  <center>
    <span class="default"><a class="link" href="javascript:void(null);" onClick="javascript:closeAndRefresh();">{t}Continue{/t}</a></span>
  </center>
  {/if}
{else}
{literal}
<script type="text/javascript">
<!--
function validate(f)
{
    if (isWhitespace(f.title.value)) {
        alert('{/literal}{t escape=js}Please enter the title of this note.{/t}{literal}');
        selectField(f, 'title');
        return false;
    }
    if (isWhitespace(f.note.value)) {
        alert('{/literal}{t escape=js}Please enter the message body of this note.{/t}{literal}');
        selectField(f, 'note');
        return false;
    }
    return true;
}
function clearExtraRecipients()
{
    var f = getForm('post_note_form');
    f.elements['note_cc[]'].selectedIndex = -1;
    showSelections('post_note_form', 'note_cc[]');
}
var old_message = '';
function setSignature(f)
{
{/literal}
    var signature = "{$current_user_prefs.email_signature|replace:'"':'\"'|replace:"\r":""|replace:"\n":'\n'}";
{literal}
    if (f.add_email_signature.checked) {
        old_message = f.note.value;
        f.note.value += "\n";
        f.note.value += signature;
    } else {
        f.note.value = old_message;
    }
}
//-->
</script>
{/literal}
<form onSubmit="javascript:return validate(this);" name="post_note_form" method="post" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="cat" value="post_note">
<input type="hidden" name="parent_id" value="{$parent_note_id}">
<input type="hidden" name="issue_id" value="{$issue_id}">
<table align="center" width="100%" cellpadding="3">
  <tr>
    <td>
      <table width="100%" cellspacing="1" cellpadding="2" border="0">
        <tr>
          <td colspan="2" class="default">
            <b>{t}Post New Internal Note{/t}</b>
          </td>
        </tr>
        <tr>
          <td width="140" bgcolor="{$internal_color}" class="default_white">
            <b>{t}From:{/t}</b>
          </td>
          <td bgcolor="{$light_color}" class="default">
            <b>{$from|escape:"html"}</b>
          </td>
        </tr>
        <tr>
          <td width="140" bgcolor="{$internal_color}" class="default_white">
            <b>{t}Recipients:{/t}</b>
          </td>
          <td bgcolor="{$light_color}" class="default">
            Issue #{$issue_id} {t}Notification List{/t} (Members: {$subscribers.staff|replace:"<":"&lt;"|replace:">":"&gt;"})
          </td>
        </tr>
        <tr>
          <td width="140" bgcolor="{$internal_color}" class="default_white">
            <b>{t}Title:{/t} *</b>
          </td>
          <td bgcolor="{$light_color}">
            <input type="text" name="title" class="default" size="50" value="{$reply_subject|escape:"html"}">
            {include file="error_icon.tpl.html" field="title"}
          </td>
        </tr>
        <tr>
          <td bgcolor="{$light_color}" colspan="2">
            <textarea name="note" rows="16" style="width: 97%">{$note.not_body|escape:"html"}{if $current_user_prefs.auto_append_note_sig == 'yes'}


{$current_user_prefs.email_signature|escape:"html"}{/if}</textarea>
            {include file="error_icon.tpl.html" field="note"}
          </td>
        </tr>
        <tr>
          <td width="140" class="default_white" bgcolor="{$internal_color}">
            <b>{t}Extra Note Recipients:{/t}</b>
          </td>
          <td bgcolor="{$light_color}">
            <select class="default" size="4" multiple name="note_cc[]" onChange="javascript:showSelections('post_note_form', 'note_cc[]');">
              {html_options options=$users}
            </select><input class="button" type="button" value="{t}Clear Selections{/t}" onClick="javascript:clearExtraRecipients();"><br />
            {include file="lookup_field.tpl.html" lookup_field_name="search" lookup_field_target="note_cc[]" callbacks="new Array('showSelections(\'post_note_form\', \'note_cc[]\')')"}
            <div class="default" id="selection_note_cc[]"></div>
          </td>
        </tr>
        <tr>
          <td width="140" class="default_white" bgcolor="{$internal_color}">
            <b>{t}Add Extra Recipients To Notification List?{/t}</b>
          </td>
          <td bgcolor="{$light_color}" class="default">
            <input type="radio" name="add_extra_recipients" value="yes"> <a id="link" class="link" href="javascript:void(null);" onClick="javascript:checkRadio('post_note_form', 'add_extra_recipients', 0);">{t}Yes{/t}</a>&nbsp;&nbsp;
            <input type="radio" name="add_extra_recipients" value="no" checked> <a id="link" class="link" href="javascript:void(null);" onClick="javascript:checkRadio('post_note_form', 'add_extra_recipients', 1);">{t}No{/t}</a>
          </td>
        </tr>
        <tr>
          <td width="120" bgcolor="{$internal_color}" class="default_white">
            <b>{t}New Status for Issue{/t} #{$issue_id}:</b>
          </td>
          <td bgcolor="{$light_color}">
            <select name="new_status" class="default">
              {html_options options=$statuses selected=$current_issue_status}
            </select>
          </td>
        </tr>
        <tr>
          <td width="120" bgcolor="{$internal_color}" class="default_white">
            <b>{t}Time Spent:{/t}</b>
          </td>
          <td bgcolor="{$light_color}">
            <input type="text" size="5" name="time_spent" class="default">
            <select name="time_category" class="default">
              {html_options options=$time_categories selected=$note_category_id}
            </select>
            <span class="small_default"><i>(in minutes)</i></span>
            {include file="error_icon.tpl.html" field="time_spent"}
          </td>
        </tr>
        {include file="include/issue_fields.tpl.html"}
        <tr>
          <td colspan="2" bgcolor="{$internal_color}">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
              <tr>
                <td align="center">
                  <input name="main_submit_button" class="button" type="submit" value="{t}Post Internal Note{/t}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input class="button" type="button" value="{t}Cancel{/t}" onClick="javascript:window.close();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
                {if $current_user_prefs.email_signature != "" and $current_user_prefs.auto_append_note_sig != 'yes'}
                <td align="right" class="default_white" width="10%">
                  <nobr>
                  <input type="checkbox" name="add_email_signature" value="yes" onClick="javascript:setSignature(this.form);">
                  <a id="white_link" class="white_link" href="javascript:void(null);" onClick="javascript:toggleCheckbox('post_note_form', 'add_email_signature');setSignature(getForm('post_note_form'));">{t}Add Email Signature{/t}</a>
                  &nbsp;&nbsp;
                  </nobr>
                </td>
                {/if}
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td colspan="2" class="default">
            <b>* {t}Required fields{/t}</b>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
{if $parent_note_id or $smarty.get.cat == 'reply'}
{literal}
<script type="text/javascript">
<!--
window.onload = focusMessageBox;
function focusMessageBox()
{
    var f = getForm('post_note_form');
    f.note.focus();
}
//-->
</script>
{/literal}
{/if}

{/if}

{include file="footer.tpl.html"}