Fix doubled widget ID in export dialog

This commit is contained in:
Nathan Gray 2014-07-14 11:29:55 +00:00
parent a0d2956bb6
commit 141033ca66
3 changed files with 6 additions and 3 deletions

View File

@ -224,6 +224,8 @@ class importexport_export_ui {
$content['filter'][$field] = importexport_helper_functions::date_rel2abs($content['filter'][$field]); $content['filter'][$field] = importexport_helper_functions::date_rel2abs($content['filter'][$field]);
} }
} }
// Filter is used twice in template, but can't have the same ID
$content['filter_html'] = $content['filter_tpl'] = $content['filter'];
} }
} }
@ -286,6 +288,7 @@ class importexport_export_ui {
// Set filter // Set filter
// Note that because not all dates are DB dates, the plugin has to handle them // Note that because not all dates are DB dates, the plugin has to handle them
$filter = array(); $filter = array();
$_content['filter'] = $_content['filter_html'] ? $_content['filter_html'] : $_content['filter_tpl'];
if(is_array($_content['filter'])) if(is_array($_content['filter']))
{ {
foreach($_content['filter'] as $key => $value) foreach($_content['filter'] as $key => $value)

View File

@ -54,7 +54,7 @@ class importexport_widget_filter extends etemplate_widget_transformer
error_log("$this has no fields"); error_log("$this has no fields");
self::$transformation = array( self::$transformation = array(
'type' => 'label', 'type' => 'label',
'label' => 'No fields' 'value' => 'No fields'
); );
return parent::beforeSendToClient($cname); return parent::beforeSendToClient($cname);
} }

View File

@ -65,7 +65,7 @@
<row valign="top" disabled="@plugin_selectors_template"> <row valign="top" disabled="@plugin_selectors_template">
<html id="plugin_selectors_html" no_lang="1"/> <html id="plugin_selectors_html" no_lang="1"/>
<box class="filters"> <box class="filters">
<filter id="filter"/> <filter id="filter_html"/>
</box> </box>
</row> </row>
<row class="th" height="20" disabled="!@plugin_selectors_template"> <row class="th" height="20" disabled="!@plugin_selectors_template">
@ -75,7 +75,7 @@
<row valign="top" disabled="!@plugin_selectors_template"> <row valign="top" disabled="!@plugin_selectors_template">
<template id="@plugin_selectors_template"/> <template id="@plugin_selectors_template"/>
<box onclick="jQuery('input[value=\'filter\']').not(':checked').attr('checked',true).parent().effect('highlight',{},2000);" class="filters"> <box onclick="jQuery('input[value=\'filter\']').not(':checked').attr('checked',true).parent().effect('highlight',{},2000);" class="filters">
<filter id="filter"/> <filter id="filter_tpl"/>
</box> </box>
</row> </row>
</rows> </rows>