From 48c18721966f6d5cc8c022e624bad8b1e46bf1da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 18 Nov 2011 15:39:56 +0100 Subject: [PATCH] set_duedate ajax auf jquery umgestellt --- templates/webpages/is/form_header.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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); } + }) + } //--> -- 2.20.1