X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Frequirement_spec_text_block%2F_form.html;h=425a5842cbb8ba4dc69aa8e9f9fdb5197dc97b25;hb=578b62c5b00b467f43c528ad2f7e0880bf08c18d;hp=5637b2f9771355c2bd9efb6e754433ee1206ab25;hpb=f10e650c26ed930ce04f4ca1bd3f21d0036e5ba4;p=kivitendo-erp.git diff --git a/templates/webpages/requirement_spec_text_block/_form.html b/templates/webpages/requirement_spec_text_block/_form.html index 5637b2f97..425a5842c 100644 --- a/templates/webpages/requirement_spec_text_block/_form.html +++ b/templates/webpages/requirement_spec_text_block/_form.html @@ -10,7 +10,8 @@ [%- END %] - [% L.hidden_tag(id_base _ '_id', SELF.text_block.id) %] + [% L.hidden_tag('form_prefix', id_base, id=id_base _ '_form_prefix') %] + [% L.hidden_tag('id', SELF.text_block.id, id=id_base _ '_id') %] [% L.hidden_tag(id_base _ '.requirement_spec_id', SELF.text_block.requirement_spec_id) %] [% L.hidden_tag(id_base _ '.output_position', SELF.text_block.output_position) %] [% IF insert_after %] @@ -40,8 +41,8 @@

- [% L.button_tag('submit_edit_text_block_form("' _ id_base _ '")', LxERP.t8('Save')) %] - [%- LxERP.t8("Cancel") %] + [%- L.ajax_submit_tag('controller.pl?action=RequirementSpecTextBlock/ajax_' _ (SELF.text_block.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save')) %] + [%- LxERP.t8("Cancel") %]

[%- IF SELF.predefined_texts.size %] @@ -66,9 +67,9 @@ function insert_selected_predefined_text() { var title_ctrl = $('#[% id_base %]_title'); - if ( ((title_ctrl.val() || '') != '') - && ((pt.title || '') != '') - && confirm('[%- LxERP.t8("Do you want to overwrite your current title?") %]')) + if ( ((pt.title || '') != '') + && ( ((title_ctrl.val() || '') == '') + || confirm('[%- LxERP.t8("Do you want to overwrite your current title?") %]'))) title_ctrl.val(pt.title); if ((pt.text || '') != '') {