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="[% themelang %]/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" ]],
26 $(".confirmdelete").click(function(){
27 return confirm(_("Are you sure you want to delete this field?"));
30 $("#add_field").on('submit', function(){
31 if ( $("#marcfield").val().length > 0
32 && $("select[name='authorised_value_category']" ).val().length > 0 ) {
33 alert("You cannot select an authorised value category and a marcfield");
43 <body id="ser_add_fields" class="ser">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'serials-search.inc' %]
47 <div id="breadcrumbs">
48 <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
51 <div id="doc3" class="yui-t2">
56 <div id="toolbar" class="btn-toolbar">
57 <a class="btn btn-small" id="newfields" href="/cgi-bin/koha/serials/add_fields.pl?op=add_form"><i class="icon-plus"></i> New fields</a>
62 [% FOR message IN messages %]
63 [% IF message.code == 'insert' %]
64 [% IF message.number > 0 %]
65 <div class="dialog message">The field has been inserted</div>
67 <div class="dialog alert">The field has not been inserted (name still exist?)</div>
69 [% ELSIF message.code == 'update' %]
70 [% IF message.number > 0 %]
71 <div class="dialog message">The field has been updated</div>
73 <div class="dialog alert">The field has not been updated (name still exist?)</div>
75 [% ELSIF message.code == 'delete' %]
76 [% IF message.number > 0 %]
77 <div class="dialog message">The field has been deleted</div>
79 <div class="dialog alert">The field has not been deleted</div>
86 <h3>Additional fields for subscriptions</h3>
92 <th>Authorised value category</th>
99 [% FOR field IN fields %]
101 <td>[% field.name %]</td>
102 <td>[% field.authorised_value_category %]</td>
103 <td>[% field.marcfield %]</td>
105 [% IF field.searchable %]Yes[% ELSE %]No[% END %]
108 <a href="/cgi-bin/koha/serials/add_fields.pl?op=add_form&field_id=[% field.id %]" title="Edit this field">Edit</a>
109 <a class="confirmdelete" href="/cgi-bin/koha/serials/add_fields.pl?op=delete&field_id=[% field.id %]" title="Delete this field">Delete</a>
116 There is no field defined.
118 [% ELSIF op == 'add_form' %]
120 <h3>Modify field</h3>
124 <form action="/cgi-bin/koha/serials/add_fields.pl" name="add_form" id="add_field" method="post">
125 <fieldset class="rows">
128 <label for="name" class="required">Name: </label>
129 <input type="text" name="name" id="name" value="[% field.name | html %]" />
132 <label for="av">Authorised value category: </label>
133 <select name="authorised_value_category">
134 <option value="">None</option>
135 [% FOR category IN categories %]
136 [% IF field.authorised_value_category == category %]
137 <option value="[% category %]" selected="selected">[% category %]</option>
139 <option value="[% category %]">[% category %]</option>
145 <label for="marcfield">Marc field: </label>
146 <input type="text" name="marcfield" id="marcfield" value="[% field.marcfield| html %]" />
149 <label for="searchable">Searchable: </label>
150 [% IF field.searchable %]
151 <input type="checkbox" name="searchable" id="searchable" checked="checked" />
153 <input type="checkbox" name="searchable" id="searchable" />
158 <fieldset class="action">
160 <input type="hidden" name="field_id" value="[% field.id %]" />
162 <input type="hidden" name="op" value="add" />
163 <input type="submit" value="Save" />
164 <a href="/cgi-bin/koha/serials/add_fields.pl" class="cancel">Cancel</a>
173 [% INCLUDE 'serials-menu.inc' %]
176 [% INCLUDE 'intranet-bottom.inc' %]