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