MT#5879 Return invoice_email_template into customer creation form.

mr3.3.1
Irina Peshinskaya 11 years ago
parent fc987d18be
commit 576f5e0dea

@ -131,12 +131,18 @@ sub create :Chained('list_customer') :PathPart('create') :Args(0) {
try {
my $schema = $c->model('DB');
$schema->txn_do(sub {
#foreach(qw/contact subscriber_email_template passreset_email_template invoice_email_template/){
# $form->params->{$_.'_id'} = $form->params->{$_}{id} || undef;
# delete $form->params->{$_};
#}
$form->params->{contact_id} = $form->params->{contact}{id};
delete $form->params->{contact};
$form->params->{subscriber_email_template_id} = $form->params->{subscriber_email_template}{id} || undef;
delete $form->params->{subscriber_email_template};
$form->params->{passreset_email_template_id} = $form->params->{passreset_email_template}{id} || undef;
delete $form->params->{passreset_email_template};
$form->params->{invoice_email_template_id} = $form->params->{invoice_email_template}{id} || undef;
delete $form->params->{invoice_email_template};
my $bprof_id = $form->params->{billing_profile}{id};
delete $form->params->{billing_profile};
$form->{create_timestamp} = $form->{modify_timestamp} = NGCP::Panel::Utils::DateTime::current_local;

@ -86,7 +86,8 @@ has_field 'invoice_email_template' => (
element_attr => {
rel => ['tooltip'],
title => ['The email template used to notify users about invoice.']
},);
},
);
has_field 'vat_rate' => (
type => 'Integer',
@ -111,7 +112,6 @@ has_field 'add_vat' => (
);
has_field 'save' => (
type => 'Submit',
value => 'Save',
@ -136,7 +136,7 @@ sub update_fields {
my $c = $self->ctx;
return unless $c;
foreach my $field(qw/subscriber_email_template passreset_email_template/) {
foreach my $field(qw/subscriber_email_template passreset_email_template invoice_email_template/) {
my $email = $self->field($field);
if($email && $c->stash->{contract}) {
$email->field('id')->ajax_src(

Loading…
Cancel
Save