Bug 14676: UI/UX improvements to patron card creator
[koha-equinox.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 </head>
39 <body id="pcard_edit-profile" class="tools pcard">
40     [% INCLUDE 'header.inc' %]
41     [% INCLUDE 'cat-search.inc' %]
42     <div id="breadcrumbs">
43         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
44         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
45         <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> &rsaquo;
46         <a href="/cgi-bin/koha/patroncards/manage.pl?label_element=profile">Printer profiles</a> &rsaquo;
47         Edit Printer Profile
48     </div>
49     <div id="doc3" class="yui-t2">
50         <div id="bd">
51         <div id="yui-main">
52             <div class="yui-b">
53                     <div class="yui-g">
54                     [% INCLUDE 'patroncards-toolbar.inc' %]
55                         <div class="yui-u first">
56
57                         </div>
58                     </div>
59                         <div class="yui-g">
60                             <h3>Edit printer profile</h3>
61                                 <div class="yui-g first">
62                                     <form name="input" action="/cgi-bin/koha/patroncards/edit-profile.pl" method="get">
63                                     <fieldset class="rows"><legend>Profile settings</legend>
64                                         <ol>
65                                             <li>
66                                                 [% IF ( profile_id ) %]
67                                                  <span class="label">Printer name:</span>[% printer_name %]
68                                                 <input type="hidden" name="printer_name" value="[% printer_name %]" />
69                                                 [% ELSE %]
70                                                 <label for="printer_name">Printer name:</label><input type="text"  size="20" name="printer_name" id="printer_name" />
71                                                 [% END %]
72                                             </li>
73                                             <li>
74                                                 [% IF ( profile_id ) %]
75                                                 <span class="label">Paper bin:</span> [% paper_bin %]
76                                                 <input type="hidden" name="paper_bin" value="[% paper_bin %]" />
77                                                 [% ELSE %]
78                                                 <label for="paper_bin">Paper bin:</label><input type="text"  size="20" name="paper_bin" id="paper_bin" />
79                                                 [% END %]
80                                             </li>
81                                             <li>
82                                                 [% IF ( label_template ) %]
83                                                  <label for="template_name">Template name:</label> [% label_template %]
84                                                 [% ELSE %]
85                                                  <span class="label">Template name:</span> Profile unassigned
86                                                 [% END %]
87                                             </li>
88                                             <li>
89                                                 <label for="units">Units: </label>
90                                                 <select id="units" name="units">
91                                                     [% FOREACH unit IN units %]
92                                                     [% IF ( unit.selected ) %]
93                                                     <option value="[% unit.type %]" selected="selected">
94                                                     [% ELSE %]
95                                                     <option value="[% unit.type %]">
96                                                     [% END %]
97                                                     [% unit.desc %]
98                                                     </option>
99                                                     [% END %]
100                                                 </select>
101                                             </li>
102                                          </ol>
103                                         </fieldset>
104
105                                         <fieldset class="rows"><legend>Offset:</legend>
106                                         <ol>
107                                             <li>
108                                                 <label for="offset_horz">Horizontal: </label><input type="text"  size="4" name="offset_horz" id="offset_horz" value="[% offset_horz %]" />
109                                             </li>
110                                             <li>
111                                                 <label for="offset_vert">Vertical: </label><input type="text" size="4" name="offset_vert" id="offset_vert" value="[% offset_vert %]" />
112                                             </li>
113                                          </ol>
114                                         </fieldset>
115
116                                         <fieldset class="rows"><legend>Creep:</legend>
117                                         <ol>
118                                             <li>
119                                                 <label for="creep_horz">Horizontal: </label><input type="text"  size="4" name="creep_horz" id="creep_horz" value="[% creep_horz %]" />
120                                             </li>
121                                             <li>
122                                                 <label for="creep_vert">Vertical: </label><input type="text" size="4" name="creep_vert" id="creep_vert" value="[% creep_vert %]" />
123                                             </li>
124                                         </ol>
125                                     </fieldset>
126                                     <fieldset class="action">
127                                         <input type="submit" value="Save" />
128                                         <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile" class="cancel">Cancel</a>
129                                         <input type="hidden" name="op" value="save" />
130                                         <input type="hidden" name="profile_id" value="[% profile_id %]" />
131                                     </fieldset>
132                     </form>
133                                 </div>
134                             </div>
135                         </div>
136                 </div>
137                 <div class="yui-b">
138                     [% INCLUDE 'patroncards-menu.inc' %]
139                 </div>
140             </div>
141             [% INCLUDE 'intranet-bottom.inc' %]