~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/send.tpl.html

  • Committer: Elan Ruusamäe
  • Date: 2015-04-03 17:16:08 UTC
  • Revision ID: glen@delfi.ee-20150403171608-u41tcmt49uayv0g4
discard {literal} from templates

it is rarely needed in Smarty3

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
{section name="i" loop=$js_canned_responses}
76
76
email_responses[{$js_canned_responses[i].ere_id}] = "{$js_canned_responses[i].ere_response_body}";
77
77
{/section}
78
 
{literal}
 
78
 
79
79
function validateForm()
80
80
{
81
81
    var to_field = Eventum.getField('to');
82
82
    if (to_field.length > 0) {
83
83
        if (Validation.isFieldWhitespace(to_field)) {
84
 
            Validation.errors[Validation.errors.length] = new Option('{/literal}{t escape=js}To{/t}{literal}', 'to');
 
84
            Validation.errors[Validation.errors.length] = new Option('{t escape=js}To{/t}', 'to');
85
85
        }
86
86
    }
87
87
    if (Validation.isFieldWhitespace('subject')) {
88
 
        Validation.errors[Validation.errors.length] = new Option('{/literal}{t escape=js}Subject{/t}{literal}', 'subject');
 
88
        Validation.errors[Validation.errors.length] = new Option('{t escape=js}Subject{/t}', 'subject');
89
89
    }
90
90
    if (Validation.isFieldWhitespace('message')) {
91
 
        Validation.errors[Validation.errors.length] = new Option('{/literal}{t escape=js}Message{/t}{literal}', 'message');
 
91
        Validation.errors[Validation.errors.length] = new Option('{t escape=js}Message{/t}', 'message');
92
92
    }
93
 
{/literal}
 
93
 
94
94
    var leave_page = true;
95
95
{if $core.current_role != $core.roles.customer and $issue_id != 0}
96
96
    {if !$can_send_email}
100
100
    {else}
101
101
    var warning_msg = "{t}WARNING: This email will be sent to all names on this issue's Notification List.\nIf you want all users to receive your message now, press OK.\nOtherwise, to return to your editing window, press CANCEL.{/t}";
102
102
    {/if}
103
 
{literal}
 
103
 
104
104
    if ((Validation.errors.length < 1)) {
105
105
        if ($.inArray(Eventum.getField('cat').val(), ['save_draft', 'update_draft']) == -1) {
106
106
            leave_page = confirm(warning_msg);
112
112
            return false;
113
113
        }
114
114
    }
115
 
{/literal}
 
115
 
116
116
{else}
117
117
    Eventum.checkWindowClose(false);
118
118
    return true;
119
119
{/if}
120
 
{literal}
 
120
 
121
121
}
122
122
function setResponseBody()
123
123
{
141
141
var old_message = '';
142
142
function setSignature(f)
143
143
{
144
 
{/literal}
 
144
 
145
145
    var signature = "{$current_user_prefs.email_signature|replace:'"':'\"'|replace:"\r":""|replace:"\n":'\n'}";
146
 
{literal}
 
146
 
147
147
    if (f.add_email_signature.checked) {
148
148
        old_message = f.message.value;
149
149
        f.message.value += "\n";
158
158
});
159
159
//-->
160
160
</script>
161
 
{/literal}
 
161
 
162
162
<form class="validate dropzone" data-validation-function='validateForm' id="send_email_form" name="send_email_form" method="post" enctype="multipart/form-data">
163
163
<input type="hidden" name="cat" value="send_email">
164
164
<input type="hidden" name="parent_id" value="{$parent_email_id|default:''}">