1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Serials › Manage new fields for subscriptions
3 [% IF op == "list" %] › List of fields
4 [% ELSIF op == "add_form" %]
5 [% IF field %] › Modify field
6 [% ELSE %] › Add field
10 [% INCLUDE 'doc-head-close.inc' %]
11 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12 [% INCLUDE "datatables.inc" %]
13 <script type="text/javascript">
15 $(document).ready(function(){
17 $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
19 'sDom': 't<"bottom pager"ilpf>',
20 'sPaginationType': 'four_button',
21 'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
23 'aaSorting': [[ 0, "asc" ]],
25 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
29 $(".confirmdelete").click(function(){
30 return confirm(_("Are you sure you want to delete this field?"));
33 $("#add_field").on('submit', function(){
34 if ( $("#marcfield").val().length > 0
35 && $("select[name='authorised_value_category']" ).val().length > 0 ) {
36 alert("You cannot select an authorised value category and a marcfield");
46 <body id="ser_add_fields" class="ser">
47 [% INCLUDE 'header.inc' %]
48 [% INCLUDE 'serials-search.inc' %]
50 <div id="breadcrumbs">
51 <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
54 <div id="doc3" class="yui-t2">
59 <div id="toolbar" class="btn-toolbar">
60 <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>
65 [% FOR message IN messages %]
66 [% IF message.code == 'insert' %]
67 [% IF message.number > 0 %]
68 <div class="dialog message">Field created.</div>
70 <div class="dialog alert">The field could not be created. Perhaps the name already exists?</div>
72 [% ELSIF message.code == 'update' %]
73 [% IF message.number > 0 %]
74 <div class="dialog message">Field updated.</div>
76 <div class="dialog alert">The field could not be updated. Perhaps the name already exists?</div>
78 [% ELSIF message.code == 'delete' %]
79 [% IF message.number > 0 %]
80 <div class="dialog message">Field deleted.</div>
82 <div class="dialog alert">The field could not be deleted. Check the log for errors.</div>
89 <h3>Additional fields for subscriptions</h3>
95 <th>Authorised value category</th>
102 [% FOR field IN fields %]
104 <td>[% field.name %]</td>
105 <td>[% field.authorised_value_category %]</td>
106 <td>[% field.marcfield %]</td>
108 [% IF field.searchable %]Yes[% ELSE %]No[% END %]
111 <a class="btn btn-mini" href="/cgi-bin/koha/serials/add_fields.pl?op=add_form&field_id=[% field.id %]"><i class="fa fa-pencil"></i> Edit</a>
112 <a class="confirmdelete btn btn-mini" href="/cgi-bin/koha/serials/add_fields.pl?op=delete&field_id=[% field.id %]"><i class="fa fa-trash"></i> Delete</a>
119 There is no field defined.
121 [% ELSIF op == 'add_form' %]
123 <h3>Modify field</h3>
127 <form action="/cgi-bin/koha/serials/add_fields.pl" name="add_form" id="add_field" method="post">
128 <fieldset class="rows">
131 <label for="name" class="required">Name: </label>
132 <input type="text" name="name" id="name" value="[% field.name | html %]" class="required" required="required" />
133 <span class="required">Required</span>
136 <label for="av">Authorised value category: </label>
137 <select name="authorised_value_category">
138 <option value="">None</option>
139 [% FOR category IN categories %]
140 [% IF field.authorised_value_category == category %]
141 <option value="[% category %]" selected="selected">[% category %]</option>
143 <option value="[% category %]">[% category %]</option>
149 <label for="marcfield">Marc field: </label>
150 <input type="text" name="marcfield" id="marcfield" value="[% field.marcfield| html %]" />
153 <label for="searchable">Searchable: </label>
154 [% IF field.searchable %]
155 <input type="checkbox" name="searchable" id="searchable" checked="checked" />
157 <input type="checkbox" name="searchable" id="searchable" />
162 <fieldset class="action">
164 <input type="hidden" name="field_id" value="[% field.id %]" />
166 <input type="hidden" name="op" value="add" />
167 <input type="submit" value="Save" />
168 <a href="/cgi-bin/koha/serials/add_fields.pl" class="cancel">Cancel</a>
177 [% INCLUDE 'serials-menu.inc' %]
180 [% INCLUDE 'intranet-bottom.inc' %]