Bug 26118: Move translatable strings out of tags/review.tt and into tags-review.js
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / edit-profile.tt
1 [% SET footerjs = 1 %]
2     [% INCLUDE 'doc-head-open.inc' %]
3     <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; Profiles &rsaquo; [% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%]</title>
4     [% INCLUDE 'doc-head-close.inc' %]
5 </head>
6
7 <body id="pcard_edit-profile" class="tools pcard">
8     [% INCLUDE 'header.inc' %]
9     [% INCLUDE 'cat-search.inc' %]
10     <div id="breadcrumbs">
11         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
12         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
13         <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> &rsaquo;
14         <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Profiles</a> &rsaquo;
15         [% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%]
16     </div>
17
18     <div class="main container-fluid">
19         <div class="row">
20             <div class="col-sm-10 col-sm-push-2">
21                 <main>
22
23                     [% INCLUDE 'patroncards-toolbar.inc' %]
24
25                             <h3>[% IF (profile_id) %]Edit[% ELSE %]Create[% END%] printer profile[% IF (profile_id) %] ([% profile_id | html %])[% END %]</h3>
26                                     <form name="input" action="/cgi-bin/koha/patroncards/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                                                     [% unit.desc | html %]
62                                                     </option>
63                                                     [% END %]
64                                                 </select>
65                                             </li>
66                                          </ol>
67                                         </fieldset>
68
69                                         <fieldset class="rows"><legend>Offset:</legend>
70                                         <ol>
71                                             <li>
72                                                 <label for="offset_horz">Horizontal: </label><input type="text"  size="4" name="offset_horz" id="offset_horz" value="[% offset_horz | html %]" />
73                                             </li>
74                                             <li>
75                                                 <label for="offset_vert">Vertical: </label><input type="text" size="4" name="offset_vert" id="offset_vert" value="[% offset_vert | html %]" />
76                                             </li>
77                                          </ol>
78                                         </fieldset>
79
80                                         <fieldset class="rows"><legend>Creep:</legend>
81                                         <ol>
82                                             <li>
83                                                 <label for="creep_horz">Horizontal: </label><input type="text"  size="4" name="creep_horz" id="creep_horz" value="[% creep_horz | html %]" />
84                                             </li>
85                                             <li>
86                                                 <label for="creep_vert">Vertical: </label><input type="text" size="4" name="creep_vert" id="creep_vert" value="[% creep_vert | html %]" />
87                                             </li>
88                                         </ol>
89                                     </fieldset>
90                                     <fieldset class="action">
91                                         <input type="submit" value="Save" />
92                                         <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile" class="cancel">Cancel</a>
93                                         <input type="hidden" name="op" value="save" />
94                                         <input type="hidden" name="profile_id" value="[% profile_id | html %]" />
95                                     </fieldset>
96                     </form>
97
98             </main>
99         </div> <!-- /.col-sm-10.col-sm-push-2 -->
100
101         <div class="col-sm-2 col-sm-pull-10">
102             <aside>
103                 [% INCLUDE 'tools-menu.inc' %]
104             </aside>
105         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
106      </div> <!-- /.row -->
107
108 [% MACRO jsinclude BLOCK %]
109     <script>
110         $(document).ready(function(){
111             var selectedUnit = $("#units option:selected").attr("value");
112             var unitfields = $("#offset_horz,#offset_vert,#creep_horz,#creep_vert");
113             $(unitfields).after("<span class=\"unit\">"+getUnit(selectedUnit)+"</span>");
114             $("#units").change(function(){
115                 $(".unit").html(getUnit($(this).val()));
116             });
117             function getUnit(unit){
118                 switch(unit){
119                     case "POINT":
120                         var unit = " pt";
121                         break;
122                     case "AGATE":
123                         var unit = " ag";
124                         break;
125                     case "INCH":
126                         var unit = " in";
127                         break;
128                     case "MM":
129                         var unit = " mm";
130                         break;
131                     case "CM":
132                         var unit = " cm";
133                         break;
134                     default:
135                         var unit = "";
136                 }
137                 return unit;
138             }
139         });
140     </script>
141 [% END %]
142
143 [% INCLUDE 'intranet-bottom.inc' %]