Revision 43816cb7
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Letter.pm | ||
---|---|---|
620 | 620 |
sub setup_display_action_bar { |
621 | 621 |
my ($self, %params) = @_; |
622 | 622 |
|
623 |
my $vc = $self->is_sales ? 'customer' : 'vendor'; # needed for show_email_dialog |
|
624 |
|
|
623 | 625 |
for my $bar ($::request->layout->get('actionbar')) { |
624 | 626 |
$bar->add( |
625 | 627 |
action => [ |
... | ... | |
655 | 657 |
], |
656 | 658 |
action => [ |
657 | 659 |
t8('E-mail'), |
658 |
call => [ 'kivi.SalesPurchase.show_email_dialog', 'Letter/send_email' ], |
|
660 |
call => [ 'kivi.SalesPurchase.show_email_dialog', 'Letter/send_email', $vc, '#letter_' . $vc . '_id' ],
|
|
659 | 661 |
disabled => !$self->letter->id ? t8('The object has not been saved yet.') : undef, |
660 | 662 |
], |
661 | 663 |
], |
js/kivi.SalesPurchase.js | ||
---|---|---|
274 | 274 |
return true; |
275 | 275 |
}; |
276 | 276 |
|
277 |
this.show_email_dialog = function(send_action) { |
|
277 |
this.show_email_dialog = function(send_action, vc, vc_id_selector) {
|
|
278 | 278 |
$('#form').data('send-email-action', send_action || 'send_sales_purchase_email'); |
279 | 279 |
|
280 |
var vc = $('#vc').val(); |
|
280 |
vc = vc || $('#vc').val(); |
|
281 |
vc_id_selector = vc_id_selector || '#' + vc + '_id'; |
|
282 |
var vc_id = $(vc_id_selector).val(); |
|
283 |
|
|
281 | 284 |
var data = { |
282 | 285 |
action: 'show_sales_purchase_email_dialog', |
283 | 286 |
cp_id: $('#cp_id').val(), |
... | ... | |
295 | 298 |
quonumber: $('#quonumber').val(), |
296 | 299 |
type: $('#type').val(), |
297 | 300 |
vc: vc, |
298 |
vc_id: $('#' + vc + '_id').val(),
|
|
301 |
vc_id: vc_id,
|
|
299 | 302 |
project_id: $('#globalproject_id').val(), |
300 | 303 |
}; |
301 | 304 |
|
Auch abrufbar als: Unified diff
Letter: "alle" E-Mail-Adressen per Anhaken als Empfänger