Lines 132-137
Link Here
|
132 |
</div> <!-- /.modal-dialog --> |
132 |
</div> <!-- /.modal-dialog --> |
133 |
</div> <!-- /#preview_template --> |
133 |
</div> <!-- /#preview_template --> |
134 |
|
134 |
|
|
|
135 |
<!-- Sample display modal --> |
136 |
<div class="modal" id="noticeSampleModal" tabindex="-1" aria-labelledby="noticeSampleModalLabel" aria-hidden="true"> |
137 |
<div class="modal-dialog"> |
138 |
<div class="modal-content"> |
139 |
<div class="modal-header"> |
140 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"> |
141 |
<span aria-hidden="true">×</span> |
142 |
</button> |
143 |
<h5 class="modal-title" id="noticeSampleModalLabel">Default template</h5> |
144 |
</div> |
145 |
<div class="modal-body"> |
146 |
... |
147 |
</div> |
148 |
<div class="modal-footer"> |
149 |
<button type="button" class="btn btn-default deny cancel" data-dismiss="modal"><i class="fa fa-times"></i> Close</button> |
150 |
</div> |
151 |
</div> <!-- /.modal-content --> |
152 |
</div> <!-- /.modal-dialog --> |
153 |
</div> <!-- /.modal --> |
154 |
|
135 |
[% IF add_form or copy_form %] |
155 |
[% IF add_form or copy_form %] |
136 |
<div class="main container-fluid"> |
156 |
<div class="main container-fluid"> |
137 |
<div class="row"> |
157 |
<div class="row"> |
Lines 673-678
Link Here
|
673 |
<a href="/cgi-bin/koha/svc/letters/preview" class="preview_template btn btn-default btn-xs" title="Preview this notice template" data-mtt="[% letter.message_transport_type | html %]" data-lang="[% lang | html %]"><i class="fa-solid fa-eye"></i> Preview</a> |
693 |
<a href="/cgi-bin/koha/svc/letters/preview" class="preview_template btn btn-default btn-xs" title="Preview this notice template" data-mtt="[% letter.message_transport_type | html %]" data-lang="[% lang | html %]"><i class="fa-solid fa-eye"></i> Preview</a> |
674 |
</li> |
694 |
</li> |
675 |
[% END %] |
695 |
[% END %] |
|
|
696 |
[% IF letter.sample %] |
697 |
<li> |
698 |
<button data-noticeid="[% letter.id %]" class="notice-sample btn btn-default btn-sm"><i class="fa-solid fa-eye"></i> View default</button> |
699 |
<iframe class="hidden" id="notice[% letter.id | html %]" srcdoc="<code><pre>[% letter.sample | html %]</pre></code>"></iframe> |
700 |
</li> |
701 |
[% END %] |
676 |
</ol> |
702 |
</ol> |
677 |
</fieldset> <!-- /.rows.mtt --> |
703 |
</fieldset> <!-- /.rows.mtt --> |
678 |
[% END %] |
704 |
[% END %] |
Lines 761-766
Link Here
|
761 |
'}'; |
787 |
'}'; |
762 |
}); |
788 |
}); |
763 |
}); |
789 |
}); |
|
|
790 |
|
791 |
$(".notice-sample").on("click", function(e){ |
792 |
e.preventDefault(); |
793 |
var title = $(this).text(); |
794 |
var noticeid = $(this).data("noticeid"); |
795 |
var body = $("#notice" + noticeid ).attr("srcdoc"); |
796 |
$("#noticeSampleModalLabel").text( title ); |
797 |
$("#noticeSampleModal .modal-body").html( body ); |
798 |
$("#noticeSampleModal").modal("show"); |
799 |
}); |
800 |
|
801 |
$("#noticeSampleModal").on("hide.bs.modal", function(){ |
802 |
$("#noticeSampleModalLabel").text(""); |
803 |
$("#noticeSampleModal .modal-body").html(""); |
804 |
}); |
805 |
|
764 |
}); |
806 |
}); |
765 |
</script> |
807 |
</script> |
766 |
[% Asset.js("js/letter.js") | $raw %] |
808 |
[% Asset.js("js/letter.js") | $raw %] |