From: Sven Schöling Date: Fri, 18 Nov 2011 14:39:56 +0000 (+0100) Subject: set_duedate ajax auf jquery umgestellt X-Git-Tag: release-2.7.0beta1~174 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=48c18721966f6d5cc8c022e624bad8b1e46bf1da;p=kivitendo-erp.git set_duedate ajax auf jquery umgestellt --- diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index 3ebc298e4..77133a805 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -172,7 +172,7 @@ [% 'Credit Note Date' | $T8 %] - [% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL') %] + [% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate()') %] [%- ELSE %] @@ -181,7 +181,7 @@ [% 'Invoice Date' | $T8 %] - [% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL') %] + [% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate()') %] [% 'Due Date' | $T8 %] @@ -253,6 +253,17 @@ setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]'); setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]'); }); + function set_duedate() { + $.ajax({ + url: 'is.pl?action=set_duedate', + data: { + invdate: $('#invdate').val(), + payment_id: $('#payment_id').val(), + }, + dataType: 'text', + success: function (data) { $('#duedate').val(data); } + }) + } //-->