Revision 4f6a2fa1
Von Sven Schöling vor mehr als 12 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
353 | 353 |
$form->{currency} = $form->{curr}; |
354 | 354 |
} |
355 | 355 |
|
356 |
$form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'CT', 'trans_id' => $form->{id}); |
|
356 |
$::form->{CUSTOM_VARIABLES} = { }; |
|
357 |
my %specs = ( CT => { field => 'id', name_prefix => '', }, |
|
358 |
Contacts => { field => 'cp_id', name_prefix => 'cp', }, |
|
359 |
); |
|
357 | 360 |
|
358 |
CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} }); |
|
361 |
for my $module (keys %specs) { |
|
362 |
my $spec = $specs{$module}; |
|
363 |
|
|
364 |
$::form->{CUSTOM_VARIABLES}->{$module} = CVar->get_custom_variables(module => $module, trans_id => $::form->{ $spec->{field} }); |
|
365 |
CVar->render_inputs(variables => $::form->{CUSTOM_VARIABLES}->{$module}, name_prefix => $spec->{name_prefix}) |
|
366 |
if scalar @{ $::form->{CUSTOM_VARIABLES}->{$module} }; |
|
367 |
} |
|
359 | 368 |
|
360 | 369 |
$form->header; |
361 | 370 |
print $form->parse_html_template('ct/form_header'); |
... | ... | |
672 | 681 |
CT->query_titles_and_greetings(\%::myconfig, $::form); |
673 | 682 |
CT->get_contact(\%::myconfig, $::form) if $::form->{cp_id}; |
674 | 683 |
|
684 |
$::form->{CUSTOM_VARIABLES}{Contacts} = CVar->get_custom_variables(module => 'Contacts', trans_id => $::form->{cp_id}); |
|
685 |
CVar->render_inputs(variables => $::form->{CUSTOM_VARIABLES}{Contacts}, name_prefix => 'cp') |
|
686 |
if scalar @{ $::form->{CUSTOM_VARIABLES}->{Contacts} }; |
|
687 |
|
|
675 | 688 |
$::form->{contacts_label} = \&_contacts_label; |
676 | 689 |
|
677 | 690 |
print $::form->ajax_response_header(), $::form->parse_html_template('ct/_contact'); |
Auch abrufbar als: Unified diff
CVars in Ansprechpartnern.