$template->substitute_variables;
# Clean the current $::form before rebuilding it from the template.
+ my $form_defaults = delete $::form->{form_defaults};
delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } };
# Fill $::form from the template.
$::form->{"project_id_${row}"} = $item->project_id;
}
+ $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} };
+
flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name));
update(
$template->substitute_variables;
# Clean the current $::form before rebuilding it from the template.
+ my $form_defaults = delete $::form->{form_defaults};
delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } };
# Fill $::form from the template.
$::form->{"project_id_${row}"} = $item->project_id;
}
+ $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} };
+
flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name));
update(
$template->substitute_variables;
# Clean the current $::form before rebuilding it from the template.
+ my $form_defaults = delete $::form->{form_defaults};
delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } };
my $dummy_form = {};
$::form->{"${_}_${row}"} = $item->$_ for qw(source memo project_id);
}
+ $::form->{$_} = $form_defaults->{$_} for keys %{ $form_defaults // {} };
+
flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name));
update(