Bug 2780 - Capitalize strings consistently (patron cards)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / edit-template.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; Templates</title>
3     [% INCLUDE 'doc-head-close.inc' %]
4     <script type="text/javascript">
5         //<![CDATA[
6         $(document).ready(function(){
7         var selectedUnit = $("#units option:selected").attr("value");
8         var unitfields = $("#page_height,#page_width,#card_width,#card_height,#top_margin,#left_margin,#col_gap,#row_gap");
9         $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
10         $("#units").change(function(){
11             $(".unit").html(getUnit($(this).val()));
12         });
13         function getUnit(unit){
14             switch(unit){
15                 case "POINT":
16                     var unit = " pt";
17                     break;
18                 case "AGATE":
19                     var unit = " ag";
20                     break;
21                 case "INCH":
22                     var unit = " in";
23                     break;
24                 case "MM":
25                     var unit = " mm";
26                     break;
27                 case "CM":
28                     var unit = " cm";
29                     break;
30                 default:
31                     var unit = "";
32             }
33             return unit;
34         }
35         });
36         //]]>
37     </script>
38    <script type="text/javascript">
39         //<![CDATA[
40         $(document).ready(function() {
41             $("#save").empty();
42             $("#cancel").empty();
43             buildButtons();
44          });
45         function submitForm() {
46             document.input.submit();
47         };
48         function buildButtons() {
49             var saveButton = new YAHOO.widget.Button({
50                 type: "link",
51                 onclick: {fn: submitForm},
52                 label: _("Save"),
53                 id: "save",
54                 container: "save"
55             });
56             var cancelButton = new YAHOO.widget.Button({
57                 type: "link",
58                 href: "/cgi-bin/koha/patroncards/manage.pl?card_element=template",
59                 label: _("Cancel"),
60                 id: "cancel",
61                 container: "cancel",
62             });
63         };
64     </script>
65 </head>
66 <body id="pcard_edit-template" class="tools pcard">
67     [% INCLUDE 'header.inc' %]
68     [% INCLUDE 'cat-search.inc' %]
69     <div id="breadcrumbs">
70         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
71         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
72         <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> &rsaquo;
73         <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Patron card templates</a> &rsaquo;
74         Edit patron card template
75     </div>
76     <div id="doc3" class="yui-t2">
77         <div id="bd">
78             <div id="yui-main">
79                 <div class="yui-b">
80                     <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
81                     <div class="yui-g">
82                         <h3>Edit patron card template</h3>
83                         <div class="yui-u first">
84                             <fieldset class="rows">
85                                 <ol>
86                                     <li>
87                                         <span class="label">Template ID:</span>[% IF ( template_id ) %][% template_id %][% ELSE %]N/A[% END %]
88                                     </li>
89                                     <li>
90                                         <label for="template_code">Template code:</label>
91                                         <input type="text" size="30" maxlength="43" name="template_code" id="template_code" value="[% template_code %]" />
92                                     </li>
93                                     <li>
94                                         <label for="template_desc">Template description:</label>
95                                         <textarea cols="30" rows="3" id="template_desc" name="template_desc">[% template_desc %]</textarea>
96                                     </li>
97                                      <li>
98                                  <label for="units">Units:</label>
99                                  <select id="units" name="units">
100                                  [% FOREACH unit IN units %]
101
102                                     [% IF ( unit.selected ) %]
103                                     <option value="[% unit.type %]" selected="selected">
104                                     [% ELSE %]
105                                     <option value="[% unit.type %]">
106                                     [% END %]
107
108                                  [% unit.desc %]
109                                  </option>
110                                  [% END %]
111                                  </select>
112                              </li>
113                                     <li>
114                                         <label for="page_height">Page height:</label>
115                                         <input type="text" size="4" name="page_height" id="page_height" value="[% page_height %]" />
116                                     </li>
117                                     <li>
118                                         <label for="page_width">Page width:</label>
119                                         <input type="text" size="4" name="page_width" id="page_width" value="[% page_width %]" />
120                                     </li>
121                                     <li>
122                                         <label for="card_width">Card width:</label>
123                                         <input type="text" size="4" name="card_width" id="card_width" value="[% card_width %]" />
124                                     </li>
125                                     <li>
126                                         <label for="card_height">Card height:</label>
127                                         <input type="text" size="4" name="card_height" id="card_height" value="[% card_height %]" />
128                                     </li>
129
130                                 </ol>
131                             </fieldset>
132                         </div>
133                         <div class="yui-u">
134                             <fieldset class="rows">
135                                 <ol><li>
136                                     <label for="top_margin">Top page margin:</label>
137                                     <input type="text" size="4" name="top_margin" id="top_margin" value="[% top_margin %]" />
138                                 </li>
139                                 <li>
140                                     <label for="left_margin">Left page margin:</label>
141                                     <input type="text" size="4" name="left_margin" id="left_margin" value="[% left_margin %]" />
142                                 </li>
143                                     <li>
144                                         <label for="cols">Number of columns:</label>
145                                         <input type="text" size="4" name="cols" id="cols" value="[% cols %]" />
146                                     </li>
147                                     <li>
148                                         <label for="rows">Number of rows:</label>
149                                         <input type="text" size="4" name="rows" id="rows" value="[% rows %]" />
150                                     </li>
151                                     <li>
152                                         <label for="col_gap">Gap between columns:</label>
153                                         <input type="text" size="4" name="col_gap" id="col_gap" value="[% col_gap %]" />
154                                     </li>
155                                     <li>
156                                         <label for="row_gap">Gap between rows:</label>
157                                         <input type="text" size="4" name="row_gap" id="row_gap" value="[% row_gap %]" />
158                                     </li>
159
160                                     <li>
161                                         <label for="profile_id">Profile:</label>
162                                         [% IF ( profile_list ) %]
163                                         <select id="profile_id" name="profile_id">
164                                         [% FOREACH profile_lis IN profile_list %]
165                                         [% IF ( profile_lis.selected ) %]
166                                         <option value="[% profile_lis.profile_id %]" selected="selected">
167                                         [% ELSE %]
168                                         <option value="[% profile_lis.profile_id %]">
169                                         [% END %]
170                                         [% profile_lis.printer_name %]/[% profile_lis.paper_bin %]
171                                         </option>
172                                         [% END %]
173                                         </select>
174                                         [% ELSE %]
175                                         <a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Click here to define a printer profile.</a>
176                                         [% END %]
177                                     </li>
178                                 </ol>
179                             </fieldset>
180                         </div>
181                     </div>
182                     <div class="yui-g">
183                         <fieldset class="action">
184                             <span id="save"><input type="submit" class="submit" value="Save" /></span>
185                             <span id="cancel"><a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Cancel</a></span>
186                             <input type="hidden" name="op" value="save" />
187                             [% IF ( template_id ) %]
188                             <input type="hidden" name="template_id" value="[% template_id %]" />
189                             [% END %]
190                         </fieldset>
191                     </div>
192                 </form>
193             </div>
194         </div>
195         <div class="yui-b">
196             [% INCLUDE 'patroncards-menu.inc' %]
197         </div>
198     </div>
199     [% INCLUDE 'intranet-bottom.inc' %]