X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=templates%2Fwebpages%2Fletter%2Fedit.html;h=cbd331e1a7756f2910e528e578a9c728c6fe3c46;hb=9c785acd332352877abd90cd0c79a2fa1ef214a1;hp=390efcc17b7a4556f51bfb84aa9858cc76716dd1;hpb=7196276bca4a155d1bcc3947859bc7d4ec1edcd6;p=kivitendo-erp.git diff --git a/templates/webpages/letter/edit.html b/templates/webpages/letter/edit.html index 390efcc17..cbd331e1a 100644 --- a/templates/webpages/letter/edit.html +++ b/templates/webpages/letter/edit.html @@ -10,6 +10,7 @@ + [% L.hidden_tag('is_sales', SELF.is_sales) %] [%- INCLUDE 'common/flash.html' %] @@ -31,17 +32,20 @@
[% 'Customer' | $T8 %]: | -[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %] -[%- IF letter.customer_id %] - -[%- END %] - | +[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %] | +
---|---|---|
[% 'Vendor' | $T8 %]: | +[% P.customer_vendor_picker('letter.vendor_id', letter.vendor_id, type='vendor') %] | |
[% 'Contact Person' | $T8 %] | -[% L.select_tag('letter.cp_id', letter.customer_id ? letter.customer.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %] | +[% L.select_tag('letter.cp_id', letter.customer_vendor_id ? letter.customer_vendor.contacts : [], value_key='cp_id', title_key='full_name', default=letter.cp_id) %] |
[% 'Your Reference' | $T8 %]: | @@ -167,6 +171,11 @@ var data = $('form').serializeArray(); data.push({ name: 'action_update_contacts', value: 1 }); $.post('controller.pl', data, kivi.eval_json_result); + }); + $('#letter_vendor_id').change(function(){ + var data = $('form').serializeArray(); + data.push({ name: 'action_update_contacts', value: 1 }); + $.post('controller.pl', data, kivi.eval_json_result); }) })