Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
Owen Leonard d5a8a42420
Bug 22954: Minor markup error in OPAC messaging template
This patch corrects a minor error in opac-messaging.tt in order to
quiet errors returned by the HTML validator.

To reproduce the problem you should have the
EnhancedMessagingPreferencesOPAC  system preference enabled. Log in
to the OPAC and go to the "your messaging" page. Run the page through
the W3C validation service: https://validator.w3.org. Either by pasting
in the URL for the search results (if web accessible) or by viewing
source, copying, and pasting into "Validate by Direct Input."

This patch addresses this error:

 - "Self-closing syntax (/>) used on a non-void HTML element. Ignoring
   the slash and treating as a start tag."

To test, apply the patch and try again to reproduce the validation
error. The error should no longer be present. There should be no
visible change to the page.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-06-04 10:12:48 +01:00

190 lines
13 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your messaging settings</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-messaging' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Your messaging settings</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
[% IF Koha.Preference( 'EnhancedMessagingPreferencesOPAC' ) %]
<div id="usermessaging">
<h3>Your messaging settings</h3>
[% IF ( settings_updated ) %]
<div class="alert alert-success"><h4>Settings updated</h4></div>
[% END %]
<form action="/cgi-bin/koha/opac-messaging.pl" method="get" name="opacmessaging">
<input type="hidden" name="modify" value="yes" />
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>&nbsp;</th>
<th>Days in advance</th>
[% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %]
[% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %]
<th>Email</th>
<th>Digests only <i id="info_digests" data-toggle="tooltip" title="You can ask for a digest to reduce the number of messages. Messages will be saved and sent as a single message." data-placement="right" class="fa fa-info-circle"></i></th>
<!-- <th>RSS</th> --><th>Do not notify</th>
</tr>
</thead>
<tbody>
[% FOREACH messaging_preference IN messaging_preferences %]
<tr>
<td>[% IF ( messaging_preference.Item_Due ) %]Item due
[% ELSIF ( messaging_preference.Advance_Notice ) %]Advance notice
[% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming events
[% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
[% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
[% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
[% ELSE %]Unknown [% END %]</td>
[% IF ( messaging_preference.takes_days ) %]
<td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
[% FOREACH select_day IN messaging_preference.select_days %]
[% IF ( select_day.selected ) %]
<option value="[% select_day.day | html %]" selected="selected">[% select_day.day | html %]</option>
[% ELSE %]
<option value="[% select_day.day | html %]">[% select_day.day | html %]</option>
[% END %]
[% END %]
</select></td>
[% ELSE %]
<td>-</td>
[% END %]
[% IF ( SMSSendDriver ) %]
[% IF ( messaging_preference.transport_sms ) %]
<td>
[% IF ( messaging_preference.transports_sms ) %]
<input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% ELSE %]
<input type="checkbox" id="sms[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="sms" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% END %]
</td>
[% ELSE %]
<td>-</td>
[% END %]
[% END %]
[% IF ( TalkingTechItivaPhone ) %]
[% IF ( messaging_preference.transport_phone ) %]
<td>
[% IF ( messaging_preference.transports_phone ) %]
<input type="checkbox"
id="phone[% messaging_preference.message_attribute_id | html %]"
name="[% messaging_preference.message_attribute_id | html %]"
value="phone" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% ELSE %]
<input type="checkbox"
id="phone[% messaging_preference.message_attribute_id | html %]"
name="[% messaging_preference.message_attribute_id | html %]"
value="phone" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% END %]
</td>
[% ELSE %]
<td>-</td>
[% END %]
[% END %]
[% IF ( messaging_preference.transport_email ) %]
<td>
[% IF ( messaging_preference.transports_email ) %]
<input type="checkbox" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% ELSE %]
<input type="checkbox" id="email[% messaging_preference.message_attribute_id | html %]" name="[% messaging_preference.message_attribute_id | html %]" value="email" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% END %]
</td>
[% ELSE %]
<td>-</td>
[% END %]
[% IF ( messaging_preference.has_digest ) %]
<td>
[% IF ( messaging_preference.digest ) %]
<input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" checked="checked" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% ELSE %]
<input type="checkbox" id="digest[% messaging_preference.message_attribute_id | html %]" value="[% messaging_preference.message_attribute_id | html %]" name="digest" onclick = "document.opacmessaging.none[% messaging_preference.message_attribute_id | html %].checked=false;" />
[% END %]
</td>
[% ELSE %]
<td>-</td>
[% END %]
<td><input type="checkbox" class="none" id="none[% messaging_preference.message_attribute_id | html %]" /></td>
</tr>
[% END # / FOREACH messaging_preferences%]
</tbody>
</table>
<fieldset class="rows">
[% IF ( SMSSendDriver ) %]
<ol><li><label>Notice:</label>Some charges for text messages may be incurred when using this service. Please check with your mobile service provider if you have questions.</li></ol>
<ol><li>
<label for="SMSnumber">SMS number:</label> <input type="text" id="SMSnumber" name="SMSnumber" value="[% SMSnumber | html %]" pattern="^\+?[1-9]\d{1,14}$" />
<i>Please enter numbers only. <b>(123) 456-7890</b> would be entered as <b>1234567890</b>.</i>
</li></ol>
[% END %]
[% IF ( SMSSendDriver == 'Email' ) %]
<ol><li>
<label for="sms_provider_id">SMS provider:</label>
<select id="sms_provider_id" name="sms_provider_id">
<option value="">Unknown</option>
[% FOREACH s IN sms_providers %]
[% IF s.id == sms_provider_id %]
<option value="[% s.id | html %]" selected="selected">[% s.name | html %]</option>
[% ELSE %]
<option value="[% s.id | html %]">[% s.name | html %]</option>
[% END %]
[% END %]
</select>
<i>Please contact a library staff member if you are unsure of your mobile service provider, or you do not see your provider in this list.</i>
</li></ol>
[% END %]
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit changes" class="btn" /> <a class="cancel" href="/cgi-bin/koha/opac-user.pl">Cancel</a>
</fieldset>
</form>
</div> <!-- / #usermessaging -->
[% ELSE %]
<h4>You are not allowed to call this page directly</h4>
[% END %]
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
<script>//<![CDATA[
$(document).ready(function(){
$(".none").click(function(){
if($(this).attr("checked")){
var rowid = $(this).attr("id");
newid = Number(rowid.replace("none",""))
$("#sms"+newid).removeAttr("checked");
$("#email"+newid).removeAttr("checked");
$("#digest"+newid).removeAttr("checked");
$("#rss"+newid).removeAttr("checked");
}
});
$("#info_digests").tooltip();
});
//]]>
</script>
[% END %]