You are here

function forena_admin_params_form_submit in Forena Reports 7

Same name and namespace in other branches
  1. 6.2 forena.admin.inc \forena_admin_params_form_submit()
  2. 6 forena.admin.inc \forena_admin_params_form_submit()
  3. 7.2 forena.admin.inc \forena_admin_params_form_submit()
  4. 7.3 forena.admin.inc \forena_admin_params_form_submit()

File

./forena.admin.inc, line 1414

Code

function forena_admin_params_form_submit($form, &$form_state) {
  $values = $form_state['values'];
  $name = $values['rpt_name'];
  $params = $values['params'];
  $r = forena_get_report_editor($name);

  //add the new parms
  $r
    ->setParameters($params);

  //Remove paramters to delete
  foreach ($params as $parm) {
    if ($parm['delete_ind']) {
      $r
        ->removeParm($parm['id']);
    }
  }
  $new_report = $r
    ->asXML();
  if (forena_save_report($name, $new_report, TRUE) == 1) {
    drupal_set_message(t('Your report has been saved'));
  }
}