b542682be94fa2d0592b0d20cbc29c9f2071fba7
[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 isDate(f) {
26                 var t = Date.parse(f.value);
27                 if (isNaN(t)) {
28                         return false;
29                 }
30         }
31         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
32         function Check(f) {
33                 var ok=1;
34                 var _alertString="";
35                 var alertString2;
36                 if (f.road_type.value.length == 0  ) {
37                         _alertString += "\n- " + _("Road type");
38                         alert(_alertString);    
39                 }
40                 else{
41                 document.Aform.submit();
42                 }
43         }
44 //]]>
45 </script>
46 </head>
47 <body id="admin_roadtype" class="admin">
48 [% INCLUDE 'header.inc' %]
49 [% INCLUDE 'roadtype-admin-search.inc' %]
50 <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>
51
52 <div id="doc3" class="yui-t2">
53    
54    <div id="bd">
55         <div id="yui-main">
56         <div class="yui-b">
57
58 [% IF ( add_form ) %]
59         [% IF ( roadtypeid ) %]
60                 <h1>Modify road type</h1>
61         [% ELSE %]
62                 <h1>New road type</h1>
63         [% END %]
64
65         <form action="[% script_name %]" name="Aform" method="post">
66         <input type="hidden" name="op" value="add_validate" />
67         <input type="hidden" name="checked" value="0" />
68         <input type="hidden" name="roadtypeid" value="[% roadtypeid %]" />
69
70 <fieldset class="rows"><ol>
71 [% IF ( roadtypeid ) %]
72 <li>
73         <span class="label">Road type: </span>[% roadtypeid %]
74         </li>
75 [% END %]
76         <li>                    
77                 <label for="road_type">Road type: </label>
78         <input  type="text" name="road_type" id="road_type" size="80" maxlength="100" value="[% road_type |html %]" />
79         </li></ol></fieldset>
80         
81         <fieldset class="action">                                         
82         <input class="button" type="button" onclick="Check(this.form)" value="Submit" />        <a class="cancel" href="/cgi-bin/koha/admin/roadtype.pl">Cancel</a>
83         </fieldset>
84         </form>
85 [% END %]
86
87 [% IF ( delete_confirm ) %]
88     <div class="dialog alert"><h3>Delete road type "[% road_type %]?"</h3>
89 <table> <tr>
90         <th>Road type id: </th>
91                         <td>[% roadtypeid %]</td>
92                 </tr>
93         <tr>    <th>Road type: </th>
94                 <td>[% road_type %]
95                 </td>
96
97         </tr></table><form action="[% script_name %]" method="post">
98                         <input type="hidden" name="op" value="delete_confirmed" />
99             <input type="hidden" name="roadtypeid" value="[% roadtypeid %]" /><input type="submit" class="approve" value="Yes, delete" /></form> <form action="[% script_name %]" method="post">
100             <input type="submit" class="deny" value="No, do not delete" /></form></div>
101 [% END %]
102
103 [% IF ( else ) %]
104
105 <div id="toolbar" class="btn-toolbar">
106     <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>
107 </div>
108
109         <h2>Road type</h2>
110         [% IF ( searchfield ) %]
111                 Search on  [% searchfield %]
112         [% END %]
113
114 [% IF ( loop ) %]       <table>
115                 <tr>
116                         <th>Road type</th>
117                         <th colspan="2">&nbsp;</th>
118                 </tr>
119                 [% FOREACH loo IN loop %]
120                 [% UNLESS ( loop.odd ) %]
121                 <tr class="highlight">
122                 [% ELSE %]
123                 <tr>
124                 [% END %]
125                         <td>[% loo.road_type %]</td>
126                         <td><a href="[% loo.script_name %]?op=add_form&amp;roadtypeid=[% loo.roadtypeid %]">Edit</a></td>
127                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;roadtypeid=[% loo.roadtypeid %]">Delete</a></td>
128                 </tr>
129                 [% END %]
130         </table>[% END %]
131 [% END %]
132
133 </div>
134 </div>
135 <div class="yui-b">
136 [% INCLUDE 'admin-menu.inc' %]
137 </div>
138 </div>
139 [% INCLUDE 'intranet-bottom.inc' %]
140
141