Kyle M Hall
a8942c2884
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commite140603a59
. Revert "Bug 13618: Specific for branches.opac_info" This reverts commit06e4a50f00
. Revert "Bug 13618: (follow-up) Specific for other prefs" This reverts commitd6475a111f
. Revert "Bug 13618: Fix for debarredcomment and patron messages" This reverts commitdd98c9df92
. Revert "Bug 13618: Do not display html tags in patron's notices" This reverts commita065b243fe
. Revert "Bug 13618: Do not display and html tags in item fields content" This reverts commitbaeeaffbf8
. Revert "Bug 13618: Fix for system preference description" This reverts commita967a09261
. Revert "Bug 13618: Remove html filters for newly pushed code" This reverts commit0e98662b10
. Revert "Bug 13618: (follow-up) add missing lines for opac-shelves" This reverts commitfc2fb605e5
. Revert "Bug 13618: (follow-up) Specific for ColumnsSettings" This reverts commitbc308fdd9c
. Revert "Bug 13618: Fix for edit biblios and items" This reverts commit811c4e8402
. Revert "Bug 13618: followup to remove tabs" This reverts commitca8e8c397c
. Revert "Bug 13618: Fix last occurrences recently introduced to master" This reverts commitbb417b256b
. Revert "Bug 13618: Fix for news" This reverts commitae5b98020a
. Revert "Bug 13618: Fix escape on sending baskets or shelves by email" This reverts commita7731ffe25
. Revert "Bug 13618: Specific for XSLTBloc" This reverts commit11fa38dc29
. Revert "Bug 13618: Specific for Salutation on editing a patron" This reverts commit36c07ad6d3
. Revert "Bug 13618: Specific for other prefs" This reverts commite6ea281a3b
. Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference" This reverts commit7824874557
. Revert "Bug 13618: Specific for ColumnsSettings" This reverts commit1834da3da3
. Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs" This reverts commit21ae62b253
. Revert "Bug 13618: Fix error 'Not a GLOB reference'" This reverts commit602bdbab4c
. Revert "Bug 13618: Specific for the ISBD view" This reverts commitd254362435
. Revert "Bug 13618: Specific for pagination_bar" This reverts commit8837a8ae68
. Revert "Bug 13618: Specific places where we don't need to escape variables - intra" This reverts commit00eff140b3
. Revert "Bug 13618: Remove html filters at the intranet" This reverts commit7db851ff03
. Revert "Bug 13618: Specific places where we don't need to escape variables" This reverts commit49a3738b8d
. Revert "Bug 13618: Remove html filters at the OPAC" This reverts commitcedaa0e23e
. Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter" This reverts commit01b38d3b13
. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
176 lines
6 KiB
Text
176 lines
6 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Serials › Manage new fields for subscriptions
|
|
[% IF op == "list" %] › List of fields
|
|
[% ELSIF op == "add_form" %]
|
|
[% IF field %] › Modify field
|
|
[% ELSE %] › Add field
|
|
[% END %]
|
|
[% END %]
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE "datatables.inc" %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
|
|
$("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
'bAutoWidth': false,
|
|
'sDom': 't<"bottom pager"ilpf>',
|
|
'sPaginationType': 'four_button',
|
|
'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
|
|
'iDisplayLength': 20,
|
|
'aaSorting': [[ 0, "asc" ]],
|
|
}));
|
|
|
|
$(".confirmdelete").click(function(){
|
|
return confirm(_("Are you sure you want to delete this field?"));
|
|
});
|
|
|
|
$("#add_field").on('submit', function(){
|
|
if ( $("#marcfield").val().length > 0
|
|
&& $("select[name='authorised_value_category']" ).val().length > 0 ) {
|
|
alert("You cannot select an authorised value category and a marcfield");
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
|
|
<body id="ser_add_fields" class="ser">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'serials-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Manage new fields for subscriptions
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
[% IF op == 'list' %]
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<a class="btn btn-small" id="newfields" href="/cgi-bin/koha/serials/add_fields.pl?op=add_form"><i class="fa fa-plus"></i> New fields</a>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF messages %]
|
|
[% FOR message IN messages %]
|
|
[% IF message.code == 'insert' %]
|
|
[% IF message.number > 0 %]
|
|
<div class="dialog message">The field has been inserted</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">The field has not been inserted (name still exist?)</div>
|
|
[% END %]
|
|
[% ELSIF message.code == 'update' %]
|
|
[% IF message.number > 0 %]
|
|
<div class="dialog message">The field has been updated</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">The field has not been updated (name still exist?)</div>
|
|
[% END %]
|
|
[% ELSIF message.code == 'delete' %]
|
|
[% IF message.number > 0 %]
|
|
<div class="dialog message">The field has been deleted</div>
|
|
[% ELSE %]
|
|
<div class="dialog alert">The field has not been deleted</div>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF op == 'list' %]
|
|
<h3>Additional fields for subscriptions</h3>
|
|
[% IF fields %]
|
|
<table id="fieldst">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Authorised value category</th>
|
|
<th>Marc field</th>
|
|
<th>Searchable</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOR field IN fields %]
|
|
<tr>
|
|
<td>[% field.name %]</td>
|
|
<td>[% field.authorised_value_category %]</td>
|
|
<td>[% field.marcfield %]</td>
|
|
<td>
|
|
[% IF field.searchable %]Yes[% ELSE %]No[% END %]
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/serials/add_fields.pl?op=add_form&field_id=[% field.id %]" title="Edit this field">Edit</a>
|
|
<a class="confirmdelete" href="/cgi-bin/koha/serials/add_fields.pl?op=delete&field_id=[% field.id %]" title="Delete this field">Delete</a>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
There is no field defined.
|
|
[% END %]
|
|
[% ELSIF op == 'add_form' %]
|
|
[% IF field %]
|
|
<h3>Modify field</h3>
|
|
[% ELSE %]
|
|
<h3>Add field</h3>
|
|
[% END %]
|
|
<form action="/cgi-bin/koha/serials/add_fields.pl" name="add_form" id="add_field" method="post">
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label for="name" class="required">Name: </label>
|
|
<input type="text" name="name" id="name" value="[% field.name | html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="av">Authorised value category: </label>
|
|
<select name="authorised_value_category">
|
|
<option value="">None</option>
|
|
[% FOR category IN categories %]
|
|
[% IF field.authorised_value_category == category %]
|
|
<option value="[% category %]" selected="selected">[% category %]</option>
|
|
[% ELSE %]
|
|
<option value="[% category %]">[% category %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="marcfield">Marc field: </label>
|
|
<input type="text" name="marcfield" id="marcfield" value="[% field.marcfield| html %]" />
|
|
</li>
|
|
<li>
|
|
<label for="searchable">Searchable: </label>
|
|
[% IF field.searchable %]
|
|
<input type="checkbox" name="searchable" id="searchable" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" name="searchable" id="searchable" />
|
|
[% END %]
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
[% IF field %]
|
|
<input type="hidden" name="field_id" value="[% field.id %]" />
|
|
[% END %]
|
|
<input type="hidden" name="op" value="add" />
|
|
<input type="submit" value="Save" />
|
|
<a href="/cgi-bin/koha/serials/add_fields.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
[% INCLUDE 'serials-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|