Lines 633-643
Link Here
|
633 |
[% END %] |
633 |
[% END %] |
634 |
[% END %] |
634 |
[% END %] |
635 |
[% WRAPPER accordion_panel panel_id="${letter.message_transport_type}_${lang}" %] |
635 |
[% WRAPPER accordion_panel panel_id="${letter.message_transport_type}_${lang}" %] |
636 |
[% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %] |
636 |
[% SET sms_readonly = letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %] |
637 |
<fieldset class="rows mtt" disabled="disabled"> |
637 |
<fieldset class="rows mtt"> |
|
|
638 |
[% IF sms_readonly %] |
638 |
<div class="alert alert-info">You should enable the SMSSendDriver preference to use the SMS templates.</div> |
639 |
<div class="alert alert-info">You should enable the SMSSendDriver preference to use the SMS templates.</div> |
639 |
[% ELSE %] |
|
|
640 |
<fieldset class="rows mtt"> |
641 |
[% END %] |
640 |
[% END %] |
642 |
<input type="hidden" name="message_transport_type" value="[% letter.message_transport_type | html %]" /> |
641 |
<input type="hidden" name="message_transport_type" value="[% letter.message_transport_type | html %]" /> |
643 |
<input type="hidden" name="lang" value="[% lang | html %]" /> |
642 |
<input type="hidden" name="lang" value="[% lang | html %]" /> |
Lines 657-695
Link Here
|
657 |
<li> |
656 |
<li> |
658 |
<label for="is_html_[% letter.message_transport_type | html %]_[% lang | html %]">HTML message:</label> |
657 |
<label for="is_html_[% letter.message_transport_type | html %]_[% lang | html %]">HTML message:</label> |
659 |
[% IF letter.is_html %] |
658 |
[% IF letter.is_html %] |
660 |
<input type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" checked="checked" /> |
659 |
<input [% IF sms_readonly %] disabled="disabled" [% END %] type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" checked="checked" /> |
661 |
[% ELSE %] |
660 |
[% ELSE %] |
662 |
<input type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" /> |
661 |
<input [% IF sms_readonly %] disabled="disabled" [% END %] type="checkbox" name="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" id="is_html_[% letter.message_transport_type | html %]_[% lang | html %]" value="1" /> |
663 |
[% END %] |
662 |
[% END %] |
664 |
</li> |
663 |
</li> |
665 |
<li> |
664 |
<li> |
666 |
<label for="title_[% letter.message_transport_type | html %]_[% lang | html %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type | html %]_[% lang | html %]" name="title" size="60" value="[% letter.title | html %]" /> |
665 |
<label for="title_[% letter.message_transport_type | html %]_[% lang | html %]">Message subject:</label> |
|
|
666 |
<input [% IF sms_readonly %] readonly [% END %] type="text" id="title_[% letter.message_transport_type | html %]_[% lang | html %]" name="title" size="60" value="[% letter.title | html %]" /> |
667 |
</li> |
667 |
</li> |
668 |
<li> |
668 |
<li> |
669 |
<label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label> |
669 |
<label for="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]">Message body:</label> |
670 |
[% IF letter.message_transport_type == 'sms' %] |
670 |
[% IF letter.message_transport_type == 'sms' %] |
671 |
<span class="sms_counter" id="sms_counter_[% lang | html %]"> |
671 |
[% IF !sms_readonly %] |
672 |
[% IF letter.content && letter.content.length > 0 %] |
672 |
<span class="sms_counter" id="sms_counter_[% lang | html %]"> |
673 |
[% tx("{content_length} / 160 characters", {content_length = letter.content.length} ) %] |
673 |
[% IF letter.content && letter.content.length > 0 %] |
674 |
[% ELSE %] |
674 |
[% tx("{content_length} / 160 characters", {content_length = letter.content.length} ) %] |
675 |
[% tx("{content_length} / 160 characters", {content_length = 0} ) %] |
675 |
[% ELSE %] |
676 |
[% END %] |
676 |
[% tx("{content_length} / 160 characters", {content_length = 0} ) %] |
677 |
</span> |
677 |
[% END %] |
|
|
678 |
</span> |
679 |
[% END %] |
678 |
[% END %] |
680 |
[% END %] |
679 |
<table> |
681 |
<table> |
680 |
<tr> |
682 |
<tr> |
681 |
<td> |
683 |
<td> |
682 |
<select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]" multiple="multiple" size="9"> |
684 |
<select [% IF sms_readonly %] disabled="disabled" [% END %] name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type | html %]_[% lang | html %]" multiple="multiple" size="9"> |
683 |
[% FOREACH SQLfieldname IN SQLfieldnames %] |
685 |
[% FOREACH SQLfieldname IN SQLfieldnames %] |
684 |
<option value="[% SQLfieldname.value | html %]">[% SQLfieldname.text | html %]</option> |
686 |
<option value="[% SQLfieldname.value | html %]">[% SQLfieldname.text | html %]</option> |
685 |
[% END %] |
687 |
[% END %] |
686 |
</select> |
688 |
</select> |
687 |
</td> |
689 |
</td> |
688 |
<td class="actions"> |
690 |
<td class="actions"> |
689 |
<button type="button" data-containerid="[% letter.message_transport_type | html %]_[% lang | html %]" class="btn btn-default btn-sm insert">Insert <i class="fa-solid fa-right-long"></i></button> |
691 |
<button [% IF sms_readonly %] disabled="disabled" [% END %] type="button" data-containerid="[% letter.message_transport_type | html %]_[% lang | html %]" class="btn btn-default btn-sm insert">Insert <i class="fa-solid fa-right-long"></i></button> |
690 |
</td> |
692 |
</td> |
691 |
<td> |
693 |
<td> |
692 |
<textarea name="content" data-lang="[% lang | html %]" class="content_[% letter.message_transport_type | html %]" id="content_[% letter.message_transport_type | html %]_[% lang | html %]" cols="80" rows="15">[% letter.content | html %]</textarea> |
694 |
<textarea [% IF sms_readonly %] readonly [% END %] name="content" data-lang="[% lang | html %]" class="content_[% letter.message_transport_type | html %]" id="content_[% letter.message_transport_type | html %]_[% lang | html %]" cols="80" rows="15">[% letter.content | html %]</textarea> |
693 |
</td> |
695 |
</td> |
694 |
</tr> |
696 |
</tr> |
695 |
</table> |
697 |
</table> |
696 |
- |
|
|