Lines 301-323
Link Here
|
301 |
<input type="hidden" name="lang" value="[% lang %]" /> |
301 |
<input type="hidden" name="lang" value="[% lang %]" /> |
302 |
<label for="is_html_[% letter.message_transport_type %]">HTML message:</label> |
302 |
<label for="is_html_[% letter.message_transport_type %]">HTML message:</label> |
303 |
[% IF letter.is_html %] |
303 |
[% IF letter.is_html %] |
304 |
<input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]" value="1" checked="checked" /> |
304 |
<input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]_[% lang %]" value="1" checked="checked" /> |
305 |
[% ELSE %] |
305 |
[% ELSE %] |
306 |
<input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]" value="1" /> |
306 |
<input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]_[% lang %]" value="1" /> |
307 |
[% END %] |
307 |
[% END %] |
308 |
</li> |
308 |
</li> |
309 |
<li> |
309 |
<li> |
310 |
<label for="title_[% letter.message_transport_type %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type %]" name="title" size="60" value="[% letter.title %]" /> |
310 |
<label for="title_[% letter.message_transport_type %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type %]_[% lang %]" name="title" size="60" value="[% letter.title %]" /> |
311 |
</li> |
311 |
</li> |
312 |
<li> |
312 |
<li> |
313 |
<label for="SQLfieldname_[% letter.message_transport_type %]">Message body:</label> |
313 |
<label for="SQLfieldname_[% letter.message_transport_type %]">Message body:</label> |
314 |
[% IF letter.message_transport_type == 'sms' %] |
314 |
[% IF letter.message_transport_type == 'sms' %] |
315 |
<span id="sms_counter">[% IF letter.content && letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span> |
315 |
<span class="sms_counter" id="sms_counter_[% lang %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span> |
316 |
[% END %] |
316 |
[% END %] |
317 |
<table> |
317 |
<table> |
318 |
<tr> |
318 |
<tr> |
319 |
<td> |
319 |
<td> |
320 |
<select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type %]" multiple="multiple" size="9"> |
320 |
<select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type %]_[% lang %]" multiple="multiple" size="9"> |
321 |
[% FOREACH SQLfieldname IN SQLfieldnames %] |
321 |
[% FOREACH SQLfieldname IN SQLfieldnames %] |
322 |
<option value="[% SQLfieldname.value %]">[% SQLfieldname.text %]</option> |
322 |
<option value="[% SQLfieldname.value %]">[% SQLfieldname.text %]</option> |
323 |
[% END %] |
323 |
[% END %] |
Lines 326-332
Link Here
|
326 |
<td class="actions"> |
326 |
<td class="actions"> |
327 |
<button type="button" data-containerid="[% letter.message_transport_type %]_[% lang %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button> |
327 |
<button type="button" data-containerid="[% letter.message_transport_type %]_[% lang %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button> |
328 |
</td> |
328 |
</td> |
329 |
<td><textarea name="content" id="content_[% letter.message_transport_type %]" cols="80" rows="15">[% letter.content %]</textarea></td> |
329 |
<td><textarea name="content" data-lang="[% lang %]" class="content_[% letter.message_transport_type %]" id="content_[% letter.message_transport_type %]_[% lang %]" cols="80" rows="15">[% letter.content %]</textarea></td> |
330 |
</tr> |
330 |
</tr> |
331 |
</table> |
331 |
</table> |
332 |
</li> |
332 |
</li> |
Lines 500-512
Link Here
|
500 |
}); |
500 |
}); |
501 |
|
501 |
|
502 |
var sms_limit = 160; |
502 |
var sms_limit = 160; |
503 |
$("#content_sms").on("keyup", function(){ |
503 |
$(".content_sms").on("keyup", function(){ |
504 |
var length = $(this).val().length; |
504 |
var length = $(this).val().length; |
505 |
$("#sms_counter").html(length + "/" + sms_limit + _(" characters")); |
505 |
var sms_counter = ("#sms_counter_" + $(this).data('lang')); |
|
|
506 |
$(sms_counter).html(length + "/" + sms_limit + _(" characters")); |
506 |
if ( length > sms_limit ) { |
507 |
if ( length > sms_limit ) { |
507 |
$("#sms_counter").css("color", "red"); |
508 |
$(sms_counter).css("color", "red"); |
508 |
} else { |
509 |
} else { |
509 |
$("#sms_counter").css("color", "black"); |
510 |
$(sms_counter).css("color", "black"); |
510 |
} |
511 |
} |
511 |
}); |
512 |
}); |
512 |
$( ".transport-types" ).accordion({ collapsible: true, active:false, animate: 200 }); |
513 |
$( ".transport-types" ).accordion({ collapsible: true, active:false, animate: 200 }); |
513 |
- |
|
|