Bug 11795 - Use validation plugin when creating new Z39.50 server
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / roadtype.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %]Road types &rsaquo; [% IF ( roadtypeid ) %] Modify road type[% ELSE %] New road type[% END %][% ELSE %][% IF ( delete_confirm ) %]Road types &rsaquo; Confirm deletion of road type[% ELSE %] Road type[% END %][% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7         function isNotNull(f,noalert) {
8                 if (f.value.length == 0) {
9         return false;
10                 }
11         return true;
12         }
13         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
14         function isNum(v,maybenull) {
15         var n = new Number(v.value);
16         if (isNaN(n)) {
17                 return false;
18                 }
19         if (maybenull == 0 && v.value =='') {
20                 return false;
21         }
22         return true;
23         }
24         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
25         function Check(f) {
26                 var ok=1;
27                 var _alertString="";
28                 var alertString2;
29                 if (f.road_type.value.length == 0  ) {
30                         _alertString += "\n- " + _("Road type");
31                         alert(_alertString);    
32                 }
33                 else{
34                 document.Aform.submit();
35                 }
36         }
37 //]]>
38 </script>
39 </head>
40 <body id="admin_roadtype" class="admin">
41 [% INCLUDE 'header.inc' %]
42 [% INCLUDE 'roadtype-admin-search.inc' %]
43 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( add_form ) %]<a href="/cgi-bin/koha/admin/roadtype.pl">Road types</a> &rsaquo; [% IF ( roadtypeid ) %] Modify road type[% ELSE %] New road type[% END %][% ELSE %][% IF ( delete_confirm ) %]<a href="/cgi-bin/koha/admin/roadtype.pl">Road types</a> &rsaquo; Confirm deletion of road type[% ELSE %] Road type[% END %][% END %]</div>
44
45 <div id="doc3" class="yui-t2">
46    
47    <div id="bd">
48         <div id="yui-main">
49         <div class="yui-b">
50
51 [% IF ( add_form ) %]
52         [% IF ( roadtypeid ) %]
53                 <h1>Modify road type</h1>
54         [% ELSE %]
55                 <h1>New road type</h1>
56         [% END %]
57
58         <form action="[% script_name %]" name="Aform" method="post">
59         <input type="hidden" name="op" value="add_validate" />
60         <input type="hidden" name="checked" value="0" />
61         <input type="hidden" name="roadtypeid" value="[% roadtypeid %]" />
62
63 <fieldset class="rows"><ol>
64 [% IF ( roadtypeid ) %]
65 <li>
66         <span class="label">Road type: </span>[% roadtypeid %]
67         </li>
68 [% END %]
69         <li>                    
70                 <label for="road_type">Road type: </label>
71         <input  type="text" name="road_type" id="road_type" size="80" maxlength="100" value="[% road_type |html %]" />
72         </li></ol></fieldset>
73         
74         <fieldset class="action">                                         
75         <input class="button" type="button" onclick="Check(this.form)" value="Submit" />        <a class="cancel" href="/cgi-bin/koha/admin/roadtype.pl">Cancel</a>
76         </fieldset>
77         </form>
78 [% END %]
79
80 [% IF ( delete_confirm ) %]
81     <div class="dialog alert"><h3>Delete road type "[% road_type %]?"</h3>
82 <table> <tr>
83         <th>Road type id: </th>
84                         <td>[% roadtypeid %]</td>
85                 </tr>
86         <tr>    <th>Road type: </th>
87                 <td>[% road_type %]
88                 </td>
89
90         </tr></table><form action="[% script_name %]" method="post">
91                         <input type="hidden" name="op" value="delete_confirmed" />
92             <input type="hidden" name="roadtypeid" value="[% roadtypeid %]" /><input type="submit" class="approve" value="Yes, delete" /></form> <form action="[% script_name %]" method="post">
93             <input type="submit" class="deny" value="No, do not delete" /></form></div>
94 [% END %]
95
96 [% IF ( else ) %]
97
98 <div id="toolbar" class="btn-toolbar">
99     <a class="btn btn-small" id="addroad" href="/cgi-bin/koha/admin/roadtype.pl?op=add_form"><i class="icon-plus"></i> New road type</a>
100 </div>
101
102         <h2>Road type</h2>
103         [% IF ( searchfield ) %]
104                 Search on  [% searchfield %]
105         [% END %]
106
107 [% IF ( loop ) %]       <table>
108                 <tr>
109                         <th>Road type</th>
110                         <th colspan="2">&nbsp;</th>
111                 </tr>
112                 [% FOREACH loo IN loop %]
113                 [% UNLESS ( loop.odd ) %]
114                 <tr class="highlight">
115                 [% ELSE %]
116                 <tr>
117                 [% END %]
118                         <td>[% loo.road_type %]</td>
119                         <td><a href="[% loo.script_name %]?op=add_form&amp;roadtypeid=[% loo.roadtypeid %]">Edit</a></td>
120                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;roadtypeid=[% loo.roadtypeid %]">Delete</a></td>
121                 </tr>
122                 [% END %]
123         </table>[% END %]
124 [% END %]
125
126 </div>
127 </div>
128 <div class="yui-b">
129 [% INCLUDE 'admin-menu.inc' %]
130 </div>
131 </div>
132 [% INCLUDE 'intranet-bottom.inc' %]
133
134