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