Bug 15766: Adding descriptions to patron card batches
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-profile.tt
1 [% USE raw %]
2 [% SET footerjs = 1 %]
3     [% INCLUDE 'doc-head-open.inc' %]
4     <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Profiles &rsaquo; [% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%]</title>
5     [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7
8 <body id="labels_label-edit-profile" class="tools labels">
9     [% INCLUDE 'header.inc' %]
10     [% INCLUDE 'cat-search.inc' %]
11     <div id="breadcrumbs">
12         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
13         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
14         <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
15         <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> &rsaquo;
16         [% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%]
17     </div>
18
19     <div class="main container-fluid">
20         <div class="row">
21             <div class="col-sm-10 col-sm-push-2">
22                 <main>
23
24                     [% INCLUDE 'labels-toolbar.inc' %]
25                             <h3>Edit printer profile</h3>
26                     <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
27                                     <fieldset class="rows"><legend>Profile settings</legend>
28                                         <ol>
29                                             <li>
30                                                 [% IF ( profile_id ) %]
31                                                  <span class="label">Printer name:</span>[% printer_name | html %]
32                                                 <input type="hidden" name="printer_name" value="[% printer_name | html %]" />
33                                                 [% ELSE %]
34                                                 <label for="printer_name">Printer name:</label><input type="text"  size="20" name="printer_name" id="printer_name" />
35                                                 [% END %]
36                                             </li>
37                                             <li>
38                                                 [% IF ( profile_id ) %]
39                                                                                                 <span class="label">Paper bin:</span> [% paper_bin | html %]
40                                                 <input type="hidden" name="paper_bin" value="[% paper_bin | html %]" />
41                                                 [% ELSE %]
42                                                 <label for="paper_bin">Paper bin:</label><input type="text"  size="20" name="paper_bin" id="paper_bin" />
43                                                 [% END %]
44                                             </li>
45                                             <li>
46                                                 [% IF ( label_template ) %]
47                                                  <label for="template_name">Template name:</label> [% label_template | html %]
48                                                 [% ELSE %]
49                                                  <span class="label">Template name:</span> Profile unassigned
50                                                 [% END %]
51                                             </li>
52                                             <li>
53                                                 <label for="units">Units: </label>
54                                                 <select id="units" name="units">
55                                                     [% FOREACH unit IN units %]
56                                                     [% IF ( unit.selected ) %]
57                                                     <option value="[% unit.type | html %]" selected="selected">
58                                                     [% ELSE %]
59                                                     <option value="[% unit.type | html %]">
60                                                     [% END %]
61                                                     [% SWITCH unit.type %]
62                                                     [%   CASE 'POINT' %]
63                                                     PostScript Points
64                                                     [%   CASE 'AGATE' %]
65                                                     Adobe Agates
66                                                     [%   CASE 'INCH' %]
67                                                     US Inches
68                                                     [%   CASE 'MM' %]
69                                                     SI Millimeters
70                                                     [%   CASE 'CM' %]
71                                                     SI Centimeters
72                                                     [% END %]
73                                                     </option>
74                                                     [% END %]
75                                                 </select>
76                                             </li>
77                                          </ol>
78                                                                                 </fieldset>
79
80                                                                                 <fieldset class="rows"><legend>Offset:</legend>
81                                                                                 <ol>
82                                             <li>
83                                                 <label for="offset_horz">Horizontal: </label><input type="text"  size="4" name="offset_horz" id="offset_horz" value="[% offset_horz | html %]" />
84                                             </li>
85                                             <li>
86                                                 <label for="offset_vert">Vertical: </label><input type="text" size="4" name="offset_vert" id="offset_vert" value="[% offset_vert | html %]" />
87                                             </li>
88                                          </ol>
89                                                                                 </fieldset>
90
91                                                                                 <fieldset class="rows"><legend>Creep:</legend>
92                                                                                 <ol>
93                                             <li>
94                                                 <label for="creep_horz">Horizontal: </label><input type="text"  size="4" name="creep_horz" id="creep_horz" value="[% creep_horz | html %]" />
95                                             </li>
96                                             <li>
97                                                 <label for="creep_vert">Vertical: </label><input type="text" size="4" name="creep_vert" id="creep_vert" value="[% creep_vert | html %]" />
98                                             </li>
99                                         </ol>
100                                     </fieldset>
101                                     <fieldset class="action">
102                                         <input type="submit" value="Save" />
103                                         <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile" class="cancel">Cancel</a>
104                                         <input type="hidden" name="op" value="save" />
105                                         <input type="hidden" name="profile_id" value="[% profile_id | html %]" />
106                                     </fieldset>
107                     </form>
108
109             </main>
110         </div> <!-- /.col-sm-10.col-sm-push-2 -->
111
112         <div class="col-sm-2 col-sm-pull-10">
113             <aside>
114                 [% INCLUDE 'tools-menu.inc' %]
115             </aside>
116         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
117      </div> <!-- /.row -->
118
119 [% MACRO jsinclude BLOCK %]
120     [% Asset.js("js/tools-menu.js") | $raw %]
121     <script>
122         $(document).ready(function(){
123             var selectedUnit = $("#units option:selected").attr("value");
124             var unitfields = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
125             $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
126             $("#units").change(function(){
127                 $(".unit").html(getUnit($(this).val()));
128             });
129         });
130         function getUnit(unit){
131             switch(unit){
132                 case "POINT":
133                     var unit = " pt";
134                     break;
135                 case "AGATE":
136                     var unit = " ag";
137                     break;
138                 case "INCH":
139                     var unit = " in";
140                     break;
141                 case "MM":
142                     var unit = " mm";
143                     break;
144                 case "CM":
145                     var unit = " cm";
146                     break;
147                 default:
148                     var unit = "";
149             }
150             return unit;
151         }
152     </script>
153 [% END %]
154
155 [% INCLUDE 'intranet-bottom.inc' %]