Commit 57158d23 authored by metzlerd's avatar metzlerd
Browse files

#2044187 Cannot add data block using Internet Explorer

parent 603e76e0
......@@ -289,9 +289,9 @@ class FrxReport {
$o .= $this->teng->replace($text);
}
// Restore link processing.
if (@(string)$frx['invalid_link']) {
$this->link_mode = $old_link_mode;
// Restore link processing.
if (@(string)$frx['invalid_link']) {
$this->link_mode = $old_link_mode;
}
return $o;
......@@ -301,7 +301,7 @@ class FrxReport {
* Render the report
* @return unknown_type
*/
public function render($format) {
public function render($format, $render_form=TRUE) {
if (!$format) $format = 'web';
Frx::Data()->push($this->parms, 'parm');
......@@ -318,7 +318,8 @@ class FrxReport {
$title = check_plain($this->teng->replace($this->frx_title));
if ($title) $title = $this->title = $title;
}
if (!$this->rpt_xml->xpath('//*[@frx:renderer="FrxParameterForm"]') && $format=='web') {
if ($render_form && !$this->rpt_xml->xpath('//*[@frx:renderer="FrxParameterForm"]') && $format=='web') {
$variables = array('collapse' => $this->blocks_loaded);
$form = $this->parametersForm($variables);
$o = drupal_render($form) . $o;
......@@ -329,10 +330,10 @@ class FrxReport {
}
/**
* Convert a relative link to appropriately rendered html
* return html A properly formatted anchor tag
*/
/**
* Convert a relative link to appropriately rendered html
* return html A properly formatted anchor tag
*/
public function link($title, $path, $options=array()) {
// check if we have
$l = '';
......@@ -353,11 +354,11 @@ class FrxReport {
default:
$l = l($title, $path, $options);
}
}
}
else {
$l = l($title, $path, $options);
}
return $l;
return $l;
}
/*
......
......@@ -1569,7 +1569,7 @@ function forena_add_data_block_form($formid, &$form_state, $report_name) {
$body = $template_obj->template();
$rpt_xml = $template_obj->asXML();
$parms = $form_state['storage']['parms'];
$output = forena_render_report($rpt_xml, NULL, $parms);
$output = forena_render_report($rpt_xml, NULL, $parms, NULL, FALSE);
//render the xml
$form_state['storage']['output'] = $output;
$form_state['storage']['template_body'] = $body;
......@@ -1681,7 +1681,6 @@ function forena_data_block_add($form, &$form_state) {
$added_report = forena_clean_xhtml($added_report);
$r->setBody($main_report . "\n" . $added_report);
if (forena_save_report($report_name, $r->asXML(), TRUE) == 1) {
drupal_set_message(t('Your report has been saved'));
$form_state['redirect'] = $values['return'];
......
......@@ -923,7 +923,7 @@ function forena_report_title_callback($report_name, $use_menu_title=TRUE) {
function forena_render_report($report, $format='', $data='', $options= array(), $print = TRUE) {
require_once('forena.common.inc');
$o = forena_report_object($report, $data);
$output = $o->render($format);
$output = $o->render($format, $print);
//If a format was requested render a custom non-drupal document
if ($format && $format != 'web') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment