TT#26454 fix form creation for advanced callforwards

build_options on a field of type HTML::FormHandler::Field::Select is
always run on instantiation time. Since this is dynamic and dependent on
the external db values for destinationsets, timesets and sourcesets, the
form has to be re-instantiated every time

Change-Id: I724ea782c11b8208738731165cfe9d1a54b274f6
(cherry picked from commit 993d9458f9)
changes/44/17344/1
Gerhard Jungwirth 8 years ago
parent 735fbcd2db
commit 7c07eb1625

@ -1090,9 +1090,9 @@ sub preferences_callforward_advanced :Chained('base') :PathPart('preferences/cal
my $cf_form;
if($cf_type eq "cft") {
$cf_form = NGCP::Panel::Form::get("NGCP::Panel::Form::SubscriberCFTAdvanced", $c);
$cf_form = NGCP::Panel::Form::get("NGCP::Panel::Form::SubscriberCFTAdvanced", $c, 1);
} else {
$cf_form = NGCP::Panel::Form::get("NGCP::Panel::Form::SubscriberCFAdvanced", $c);
$cf_form = NGCP::Panel::Form::get("NGCP::Panel::Form::SubscriberCFAdvanced", $c, 1);
}
my @maps = ();

@ -4,9 +4,9 @@ use Module::Load::Conditional qw/can_load/;
my %forms = ();
sub get {
my ($name, $c) = @_;
my ($name, $c, $create_new) = @_;
my $form;
if(exists $forms{$name}) {
if(exists $forms{$name} && !$create_new) {
$form = $forms{$name};
$form->clear();
$form->ctx($c);

Loading…
Cancel
Save