From: Moritz Bunkus Date: Fri, 2 Aug 2013 09:53:19 +0000 (+0200) Subject: Pflichtenhefte Angebote/Aufträge: "Artikel allen Abschnitten zuweisen" fixen X-Git-Tag: release-3.2.0beta~467^2~87 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2c92b5acfbbc7486730ec7feec509abbdcbc7ebc;p=kivitendo-erp.git Pflichtenhefte Angebote/Aufträge: "Artikel allen Abschnitten zuweisen" fixen --- diff --git a/js/requirement_spec.js b/js/requirement_spec.js index e059e8400..00e4319a0 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -408,10 +408,18 @@ ns.disable_create_quotation_order_commands = function(key, opt) { }; ns.assign_order_part_id_to_all = function() { - var order_part_id = $('#quoations_and_orders_order_id').val(); - $('#quotations_and_orders_form SELECT[name="sections[].order_part_id"]').each(function(idx, elt) { + var order_part_id = $('#quotations_and_orders_order_id').val(); + var order_part_name = $('#quotations_and_orders_order_id_name').val(); + + $('#quotations_and_orders_form INPUT[name="sections[].order_part_id"]').each(function(idx, elt) { $(elt).val(order_part_id); }); + + $('#quotations_and_orders_form [id^=quotations_and_orders_sections_order_pard_id_]').filter(function() { + return $(this).attr('id') && $(this).attr('id').match("^quotations_and_orders_sections_order_pard_id_[0-9]+_name$"); + }).each(function(idx, elt) { + $(elt).val(order_part_name); + }); }; // ------------------------------------------------------------------------- diff --git a/templates/webpages/requirement_spec_order/_assignment_form.html b/templates/webpages/requirement_spec_order/_assignment_form.html index 69d3379ed..28cc667ab 100644 --- a/templates/webpages/requirement_spec_order/_assignment_form.html +++ b/templates/webpages/requirement_spec_order/_assignment_form.html @@ -18,7 +18,7 @@ [% LxERP.t8("Assign the following article to all sections") %]: - [% P.part_picker('quotations_and_orders_dummy', INSTANCE_CONF.get_requirement_spec_section_order_part_id, convertible_unit=SELF.h_unit_name, id='quoations_and_orders_order_id', style=style) %] + [% P.part_picker('quotations_and_orders_dummy', INSTANCE_CONF.get_requirement_spec_section_order_part_id, convertible_unit=SELF.h_unit_name, id='quotations_and_orders_order_id', style=style) %] [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %] @@ -41,7 +41,7 @@ [% HTML.escape(section.fb_number) %] [% HTML.escape(section.title) %] [% HTML.escape(P.truncate(section.description)) %] - [% P.part_picker('sections[].order_part_id', section.order_part_id, convertible_unit=SELF.h_unit_name, id='quoations_and_orders_sections_order_pard_id_' _ loop.count, style=style) %] + [% P.part_picker('sections[].order_part_id', section.order_part_id, convertible_unit=SELF.h_unit_name, id='quotations_and_orders_sections_order_pard_id_' _ loop.count, style=style) %] [% END %]