537953200387c14e12926ddcd89c2c22ab4b8b94
[kivitendo-erp.git] / templates / webpages / shop_part / edit.html
1 [%- USE HTML %]
2 [%- USE T8 %]
3 [%- USE L -%]
4 [%- USE P -%]
5 [%- USE LxERP -%]
6
7 <p>
8 [% LxERP.t8("Part") %]: [% HTML.escape(SELF.shop_part.part.displayable_name) %]<br>
9 [% LxERP.t8("Shop") %]: [% HTML.escape(SELF.shop_part.shop.description) %]
10 <p>
11 <form action="controller.pl" method="post">
12   <div>
13     [% IF SELF.shop_part.id %]
14     [%- L.hidden_tag("shop_part.id", SELF.shop_part.id) %]
15     [%- L.hidden_tag("shop_part.shop_id", SELF.shop_part.shop_id) %]
16     [% ELSE %]
17     [%- L.hidden_tag("shop_part.shop_id", FORM.shop_id) %]
18     [%- L.hidden_tag("shop_part.part_id", FORM.part_id) %]
19     [% END %]
20
21   [% # L.dump(SELF.shop_part.shop) %]
22     <table>
23     <tr>
24      <td>[% LxERP.t8("Description") %]</td>
25      <td colspan="3">
26        [% IF SELF.shop_part.shop.use_part_longdescription %]
27          [% L.textarea_tag('notes', SELF.shop_part.part.notes, wrap="soft", readonly="readonly", style="width: 350px; height: 150px", class="texteditor") %]
28        [% ELSE %]
29          [% L.textarea_tag('shop_part.shop_description', SELF.shop_part.shop_description, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
30        [% END %]
31      </td>
32     </tr>
33     <tr>
34      <td>[% LxERP.t8("Active") %]</td>
35      <td>[% L.yes_no_tag("shop_part.active", SELF.shop_part.active, default = "yes") %]</td>
36      <td>[% LxERP.t8("Date") %]</td>
37      <td>[% L.date_tag("shop_part.show_date", SELF.shop_part.show_date) %]</td>
38     </tr>
39     <tr>
40       <td>[% 'Price Source' | $T8 %]</th>
41       [% IF SELF.shop_part.active_price_source %]
42         [% SET price_source = SELF.shop_part.active_price_source %]
43       [% ELSE %]
44         [% SET price_source = SELF.shop_part.shop.price_source %]
45       [% END %]
46       <td>[% L.select_tag('shop_part.active_price_source', SELF.price_sources, value_key = 'id', title_key = 'name', with_empty = 0, default = price_source, default_value_key='id' ) %]</td>
47      <td>[% LxERP.t8("Front page") %]</td>
48      <td>[% L.yes_no_tag('shop_part.front_page', SELF.shop_part.front_page) %]</td>
49     </tr>
50     <tr>
51      <td>[% LxERP.t8("Sort order") %]</td>
52      <td>[% L.input_tag("shop_part.sortorder", SELF.shop_part.sortorder, size=2) %]</td>
53      <td>[% LxERP.t8("Meta tag title") %]</td>
54      <td>[% L.input_tag("shop_part.metatag_title", SELF.shop_part.metatag_title, size=12) %]</td>
55     </tr>
56     <tr>
57      <td>[% LxERP.t8("Meta tag keywords") %]</td>
58      <td>[% L.input_tag("shop_part.metatag_keywords", SELF.shop_part.metatag_keywords, size=22) %]</td>
59      <td>[% LxERP.t8("Meta tag description") %]</td>
60      <td>[% L.textarea_tag("shop_part.metatag_description", SELF.shop_part.metatag_description, rows=4) %]</td>
61     </tr>
62     </table>
63     [% IF SELF.shop_part.id %]
64       [% L.button_tag("kivi.ShopPart.save_shop_part(" _ SELF.shop_part.id _ ")", LxERP.t8("Save"))  %]</td>
65     [% ELSE %]
66       [% L.button_tag("kivi.ShopPart.add_shop_part()", LxERP.t8("Save"))  %]</td>
67     [% END %]
68   </div>
69 </form>
70
71 [%- IF SELF.shop_part.part.image && INSTANCE_CONF.get_parts_show_image %]
72          <a href="[% SELF.shop_part.part.image | html %]" target="_blank"><img style="[% INSTANCE_CONF.get_parts_image_css %]" src="[% SELF.shop_part.part.image | html %]"/></a>
73 [%- END %]