You are here

function forena_report_add_template_submit in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 forena.report.inc \forena_report_add_template_submit()
  2. 7.4 forena.report.inc \forena_report_add_template_submit()
1 string reference to 'forena_report_add_template_submit'
forena_report_data_block_form in ./forena.report.inc
A form to preview and add data blocks to an existing report

File

./forena.report.inc, line 755

Code

function forena_report_add_template_submit($form, &$form_state) {
  extract($form_state['values']);
  $parms = $form_state['storage']['parms'];
  $config = array_merge($form_state['storage']['config'], $config);
  $r = Frx::Editor($report_name);
  $r
    ->setEditorParms($parms);
  Frx::Editor($report_name)
    ->addBlock($block_name, $template_class, $config, $id);
  Frx::Editor()
    ->update();
  $form_state['redirect'] = array(
    "reports/{$report_name}/edit",
    array(
      'query' => Frx::parms(),
    ),
  );
}