0a37257d7dbe9a29cc5b8a58a7bfd93175828eba
[kivitendo-erp.git] / templates / webpages / generic / new_item.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- IF is_wrong_pclass == NOTFORSALE %]
4 <h4 class="error">[% 'searched part not for sale' | $T8 %]</h4>
5 [%- ELSE %]
6 [%- IF is_wrong_pclass == NOTFORPURCHASE %]
7 <h4 class="error">[% 'searched part not for purchase' | $T8 %]</h4>
8 [%- ELSE %]
9 <h4 class="error">[% 'Item does not exists in the database' | $T8 %]
10 [% IF INSTANCE_CONF.get_create_part_if_not_found %]
11     <p>[% 'What type of item is this?' | $T8 %]</h4>
12
13     <form method="post" action="controller.pl">
14
15       <p>
16
17       <input class="radio" type="radio" name="part.part_type" value="part" checked>&nbsp;[% 'Part'       | $T8 %]<br>
18       <input class="radio" type="radio" name="part.part_type" value="assembly">    &nbsp;[% 'Assembly'   | $T8 %]<br>
19       <input class="radio" type="radio" name="part.part_type" value="service">     &nbsp;[% 'Service'    | $T8 %]<br>
20       <input class="radio" type="radio" name="part.part_type" value="assortment">  &nbsp;[% 'Assortment' | $T8 %]
21       <p>
22
23       [%- FOREACH var = HIDDENS %]
24       <input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]">
25       [%- END %]
26     </p>
27
28       <input type="hidden" name="action" value="Part/dispatch">
29       <input class="submit" type="submit" name="action_add_from_record" value="[% 'Continue' | $T8 %]">
30 [%- ELSE %]
31 </h4>
32 [%- END %]
33 [%- END %]
34 [%- END %]
35       <input id='back_button' type='button' class="submit" value="[% 'Back' | $T8 %]">
36     </p>
37   </form>
38 <script type='text/javascript'>
39   $(function(){ $('#back_button').click(function(){ window.history.back(-1) }) })
40 </script>