Bug 2780 - Capitalize strings consistently (patron cards)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / edit-profile.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator</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 = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
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=profile",
59                 label: _("Cancel"),
60                 id: "cancel",
61                 container: "cancel",
62             });
63         };
64     </script>
65 </head>
66 <body id="pcard_edit-profile" 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?label_element=profile">Printer profiles</a> &rsaquo;
74         Edit Printer Profile
75     </div>
76     <div id="doc3" class="yui-t2">
77         <div id="bd">
78         <div id="yui-main">
79             <div class="yui-b">
80                         <div class="yui-g">
81                             <h3>Edit printer profile</h3>
82                                 <div class="yui-g first">
83                                     <form name="input" action="/cgi-bin/koha/patroncards/edit-profile.pl" method="get">
84                                     <fieldset class="rows"><legend>Profile settings</legend>
85                                         <ol>
86                                             <li>
87                                                 [% IF ( profile_id ) %]
88                                                  <span class="label">Printer name:</span>[% printer_name %]
89                                                 <input type="hidden" name="printer_name" value="[% printer_name %]" />
90                                                 [% ELSE %]
91                                                 <label for="printer_name">Printer name:</label><input type="text"  size="20" name="printer_name" id="printer_name" />
92                                                 [% END %]
93                                             </li>
94                                             <li>
95                                                 [% IF ( profile_id ) %]
96                                                 <span class="label">Paper bin:</span> [% paper_bin %]
97                                                 <input type="hidden" name="paper_bin" value="[% paper_bin %]" />
98                                                 [% ELSE %]
99                                                 <label for="paper_bin">Paper bin:</label><input type="text"  size="20" name="paper_bin" id="paper_bin" />
100                                                 [% END %]
101                                             </li>
102                                             <li>
103                                                 [% IF ( label_template ) %]
104                                                  <label for="template_name">Template name:</label> [% label_template %]
105                                                 [% ELSE %]
106                                                  <span class="label">Template name:</span> Profile unassigned
107                                                 [% END %]
108                                             </li>
109                                             <li>
110                                                 <label for="units">Units: </label>
111                                                 <select id="units" name="units">
112                                                     [% FOREACH unit IN units %]
113                                                     [% IF ( unit.selected ) %]
114                                                     <option value="[% unit.type %]" selected="selected">
115                                                     [% ELSE %]
116                                                     <option value="[% unit.type %]">
117                                                     [% END %]
118                                                     [% unit.desc %]
119                                                     </option>
120                                                     [% END %]
121                                                 </select>
122                                             </li>
123                                          </ol>
124                                         </fieldset>
125
126                                         <fieldset class="rows"><legend>Offset:</legend>
127                                         <ol>
128                                             <li>
129                                                 <label for="offset_horz">Horizontal: </label><input type="text"  size="4" name="offset_horz" id="offset_horz" value="[% offset_horz %]" />
130                                             </li>
131                                             <li>
132                                                 <label for="offset_vert">Vertical: </label><input type="text" size="4" name="offset_vert" id="offset_vert" value="[% offset_vert %]" />
133                                             </li>
134                                          </ol>
135                                         </fieldset>
136
137                                         <fieldset class="rows"><legend>Creep:</legend>
138                                         <ol>
139                                             <li>
140                                                 <label for="creep_horz">Horizontal: </label><input type="text"  size="4" name="creep_horz" id="creep_horz" value="[% creep_horz %]" />
141                                             </li>
142                                             <li>
143                                                 <label for="creep_vert">Vertical: </label><input type="text" size="4" name="creep_vert" id="creep_vert" value="[% creep_vert %]" />
144                                             </li>
145                                         </ol>
146                                     </fieldset>
147                                     <fieldset class="action">
148                                         <span id="save"><input type="submit" value="Save" /></span>
149                                         <span id ="cancel"><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile" class="cancel">Cancel</a></span>
150                                         <input type="hidden" name="op" value="save" />
151                                         <input type="hidden" name="profile_id" value="[% profile_id %]" />
152                                     </fieldset>
153                     </form>
154                                 </div>
155                             </div>
156                         </div>
157                 </div>
158                 <div class="yui-b">
159                     [% INCLUDE 'patroncards-menu.inc' %]
160                 </div>
161             </div>
162             [% INCLUDE 'intranet-bottom.inc' %]