Bug 16726: Clear text in syspref searchbox after submitting
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / items_search_fields.tt
1 [% USE AuthorisedValues %]
2 [% INCLUDE 'doc-head-open.inc' %]
3   <title>Koha &rsaquo; Administration &rsaquo; Item search fields</title>
4   [% INCLUDE 'doc-head-close.inc' %]
5   <script type="text/javascript">
6       var MSG_ITEM_SEARCH_DELETE_CONFIRM = _("Are you sure you want to delete this field?");
7   </script>
8   <script type="text/javascript" src="[% interface %]/[% theme %]/js/item_search_fields.js"></script>
9 </head>
10 <body id="admin_itemssearchfields" class="admin">
11   [% INCLUDE 'header.inc' %]
12   [% INCLUDE 'prefs-admin-search.inc' %]
13   <div id="breadcrumbs">
14     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
15     <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
16     Item search fields
17   </div>
18
19   <div id="doc3" class="yui-t2">
20     <div id="bd">
21       <div id="yui-main">
22         <div class="yui-b">
23
24     <div id="toolbar" class="btn-toolbar">
25         <a class="btn btn-default btn-sm" id="new_search_field" href="/cgi-bin/koha/admin/items_search_fields.pl"><i class="fa fa-plus"></i> New search field</a>
26     </div>
27
28           [% IF field_added %]
29             <div class="dialog message">
30               Field successfully added: [% field_added.label %]
31             </div>
32           [% ELSIF field_not_added %]
33             <div class="dialog alert">
34               <p>Failed to add field. Please make sure the field name doesn't already exist.</p>
35               <p>Check logs for more details.</p>
36             </div>
37           [% ELSIF field_deleted %]
38             <div class="dialog message">
39               Field successfully deleted.
40             </div>
41           [% ELSIF field_not_deleted %]
42             <div class="dialog alert">
43               <p>Failed to delete field.</p>
44               <p>Check logs for more details.</p>
45             </div>
46           [% ELSIF field_updated %]
47             <div class="dialog message">
48               Field successfully updated: [% field_updated.label %]
49             </div>
50           [% ELSIF field_not_updated %]
51             <div class="dialog alert">
52               <p>Failed to update field.</p>
53               <p>Check logs for more details.</p>
54             </div>
55           [% END %]
56           [% IF fields.size %]
57               <div id="search_fields_list">
58                   <h2>Item search fields</h2>
59
60                   <table id="search_fields_table">
61                     <thead>
62                       <tr>
63                         <th>Name</th>
64                         <th>Label</th>
65                         <th>MARC field</th>
66                         <th>MARC subfield</th>
67                         <th>Authorised values category</th>
68                         <th>Actions</th>
69                       </tr>
70                     </thead>
71                     <tbody>
72                       [% FOREACH field IN fields %]
73                         <tr>
74                           <td>[% field.name %]</td>
75                           <td>[% field.label %]</td>
76                           <td>[% field.tagfield %]</td>
77                           <td>[% field.tagsubfield %]</td>
78                           <td>[% field.authorised_values_category %]</td>
79                           <td>
80                             <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_field.pl?name=[% field.name %]" title="Edit [% field.name %] field"><i class="fa fa-pencil"></i> Edit</a>
81                             <a class="field-delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_fields.pl?op=del&name=[% field.name %]"><i class="fa fa-trash"></i> Delete</a>
82                           </td>
83                         </tr>
84                       [% END %]
85                     </tbody>
86                   </table>
87               </div>
88           [% ELSE %]
89               <div class="dialog message">
90                   There are no item search fields defined.
91               </div>
92           [% END %]
93
94           <form id="add_field_form" action="/cgi-bin/koha/admin/items_search_fields.pl" method="POST" class="validated">
95             <fieldset class="rows">
96               <legend>Add a new field</legend>
97               [% INCLUDE 'admin-items-search-field-form.inc' field=undef %]
98               <input type="hidden" name="op" value="add" />
99             </fieldset>
100             <fieldset class="action">
101               <input type="submit" value="Submit" />
102               <a href="#" class="cancel">Cancel</a>
103             </fieldset>
104           </form>
105
106         </div>
107       </div>
108       <div class="yui-b">
109         [% INCLUDE 'admin-menu.inc' %]
110       </div>
111     </div>
112
113     [% INCLUDE 'intranet-bottom.inc' %]