Revision a9641767
Von Bernd Bleßmann vor 12 Monaten hinzugefügt
js/kivi.CustomerVendor.js | ||
---|---|---|
544 | 544 |
return true; |
545 | 545 |
}; |
546 | 546 |
|
547 |
this.contacts_update_email_fields = function() { |
|
548 |
$('.update_email').each(function(idx, elt) { |
|
549 |
let $link = $('#' + $(elt).attr('id') + '_link'); |
|
550 |
if ($(elt).val() !== '') { |
|
551 |
$link.attr('href', 'mailto:' + $(elt).val()); |
|
552 |
$link.show(); |
|
553 |
} else { |
|
554 |
$link.hide(); |
|
555 |
} |
|
556 |
}); |
|
557 |
}; |
|
558 |
|
|
547 | 559 |
this.open_customervendor_tab = function(id_selector, cv_type) { |
548 | 560 |
const input_element_id = `${id_selector}_name`; |
549 | 561 |
const cv_id = $(id_selector).val(); |
templates/webpages/customer_vendor/tabs/contacts.html | ||
---|---|---|
2 | 2 |
[%- USE HTML %] |
3 | 3 |
[%- USE LxERP %] |
4 | 4 |
[%- USE L %] |
5 |
[%- USE P %] |
|
5 | 6 |
|
6 | 7 |
<div id="contacts"> |
7 | 8 |
<table> |
... | ... | |
18 | 19 |
empty_title = LxERP.t8('New contact'), |
19 | 20 |
value_key = 'cp_id', |
20 | 21 |
title_key = 'full_name', |
21 |
onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){ contactsMapWidget.testInputs(); kivi.reinit_widgets(); }});", |
|
22 |
onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){ contactsMapWidget.testInputs(); |
|
23 |
kivi.CustomerVendor.contacts_update_email_fields(); |
|
24 |
kivi.reinit_widgets(); }});", |
|
22 | 25 |
) |
23 | 26 |
%] |
24 | 27 |
</td> |
... | ... | |
95 | 98 |
<th align="right" nowrap>[% 'E-mail' | $T8 %]</th> |
96 | 99 |
|
97 | 100 |
<td> |
98 |
[% L.input_tag_trim('contact.cp_email', SELF.contact.cp_email, size = 40) %]
|
|
101 |
[% P.input_email_tag('contact.cp_email', SELF.contact.cp_email, class = 'update_email', size = 40) %]
|
|
99 | 102 |
</td> |
100 | 103 |
</tr> |
101 | 104 |
|
... | ... | |
199 | 202 |
<th align="right" nowrap>[% 'Private E-mail' | $T8 %]</th> |
200 | 203 |
|
201 | 204 |
<td> |
202 |
[% L.input_tag_trim('contact.cp_privatemail', SELF.contact.cp_privatemail, size = 40) %]
|
|
205 |
[% P.input_email_tag('contact.cp_privatemail', SELF.contact.cp_privatemail, class = 'update_email', size = 40) %]
|
|
203 | 206 |
</td> |
204 | 207 |
</tr> |
205 | 208 |
|
Auch abrufbar als: Unified diff
Kunden-/Lieferantenstamm: Ansprechpersonen: E-Mail-Felder mit input_mail_tag