Koha/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
Jonathan Druart 5825026448 Bug 21526: uri escape TT variables when used in 'a href'
This patch has been generated with the script provided on bug 21576.
It only affects variable used in the href attribute of a link *when*
href it the first attribute of the node (grep "a href")

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-26 17:09:57 +00:00

149 lines
6.6 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
[%- IF ( action == "new" ) %]
Add a new collection
[% ELSE %]
Edit collection [% editColTitle | html %]
[% END -%]
</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_editCollections" class="tools rcoll">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo;
[%- IF ( action == "new" ) %]
Add a new collection
[% ELSE %]
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId | uri %]">Collection <i>[% editColTitle | html %]</i></a> &rsaquo; Edit
[% END -%]
</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF ( previousActionCreate ) %]
[% IF ( createSuccess ) %]
<div class="dialog message">
<p>Collection <i>[% createdTitle | html %]</i> added successfully</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% ELSE %]
<div class="dialog alert">
<p>Collection <i>[% createdTitle | html %]</i> failed to be added</p>
<p>
[% IF failureMessage == "NO_TITLE" %]
No title entered.
[% ELSIF failureMessage == "DUPLICATE_TITLE" %]
Title already in use.
[% ELSIF failureMessage == "NO_DESCRIPTION" %]
No description entered.
[% ELSE %]
[% failureMessage | html %]
[% END %]
</p>
</div>
[% END %]
[% END %]
[% IF ( previousActionDelete ) %]
[% IF ( deleteSuccess ) %]
<div class="dialog message">
<p>Collection deleted successfully</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% ELSE %]
<div class="dialog alert">Collection failed to be deleted</div>
[% END %]
[% END %]
[% IF ( previousActionUpdate ) %]
[% IF ( updateSuccess ) %]
<div class="dialog message">
<p>Collection <i>[% updatedTitle | html %]</i> updated successfully</p>
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
</div>
[% ELSE %]
<div class="dialog alert">
<p>Collection <i>[% updatedTitle | html %]</i> failed to be updated</p>
<p>
[% IF failureMessage == "NO_ID" %]
No collection id given.
[% ELSIF failureMessage == "DUPLICATE_TITLE" %]
Title already in use.
[% ELSE %]
[% failureMessage | html %]
[% END %]
</p>
</div>
[% END %]
[% END %]
<div>
[% IF action == "new" || action == "edit" %]
[% IF ( previousActionEdit ) %]
<h1>Edit collection <i>[% editColTitle | html %]</i></h1>
[% ELSE %]
<h1>Add new collection</h1>
[% END %]
<form action="editCollections.pl" method="post" class="validated">
[% IF ( previousActionEdit ) %]
<input type="hidden" name="action" value="update" />
<input type="hidden" name="colId" value="[% editColId | html %]" />
[% ELSE %]
<input type="hidden" name="action" value="create" />
[% END %]
<fieldset class="rows">
<ol>
<li>
<label class="required" for="title">Title: </label>
[% IF ( editColTitle ) %]
<input type="text" name="title" value="[% editColTitle | html %]" required="required" />
<span class="required">Required</span>
[% ELSE %]
<input type="text" name="title" required="required" />
<span class="required">Required</span>
[% END %]
</li>
<li>
<label for="description">Description: </label>
[% IF (editColDescription ) %]
<input type="text" size="50" name="description" value="[% editColDescription | html %]" />
[% ELSE %]
<input type="text" size="50" name="description" />
[% END %]
</li>
</ol>
</fieldset>
<fieldset class="action">
<p><input type="submit" value="Submit" /> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a></p>
</fieldset>
</form>
[% END %]
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% Asset.js("js/rotating-collections.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]