[-] MO : fixed disappearing form in sekeyword #PSCFV-9743

This commit is contained in:
Damien Metzger
2013-07-12 15:56:54 +02:00
parent f82e748fc8
commit 38b32f7e1a

View File

@@ -105,8 +105,14 @@ class SEKeywords extends ModuleGraph
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query.ModuleGraph::getDateBetween().$this->_query2);
$total = count($result);
$this->html = '<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>
<p>'.
($total == 1 ? sprintf($this->l('%d keyword matches your query.'), $total) : sprintf($this->l('%d keywords match your query.'), $total)).'</p>';
<p>'.($total == 1 ? sprintf($this->l('%d keyword matches your query.'), $total) : sprintf($this->l('%d keywords match your query.'), $total)).'</p>';
$form = '<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
'.$this->l('Filter by keyword').' <input type="text" name="SEK_FILTER_KW" value="'.Tools::htmlentitiesUTF8(Configuration::get('SEK_FILTER_KW')).'" />
'.$this->l('And min occurrences').' <input type="text" name="SEK_MIN_OCCURENCES" value="'.(int)Configuration::get('SEK_MIN_OCCURENCES').'" />
<input type="submit" class="button" name="submitSEK" value="'.$this->l('Apply ').'" />
</form>';
if ($result && $total)
{
$table = '
@@ -125,16 +131,11 @@ class SEKeywords extends ModuleGraph
$table .= '</tbody></table></div>';
$this->html .= '<div>'.$this->engine(array('type' => 'pie')).'</div>
<br/>
<p><a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=language"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a></p><br/>
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
'.$this->l('Filter by keyword').' <input type="text" name="SEK_FILTER_KW" value="'.Tools::htmlentitiesUTF8(Configuration::get('SEK_FILTER_KW')).'" />
'.$this->l('And min occurrences').' <input type="text" name="SEK_MIN_OCCURENCES" value="'.(int)Configuration::get('SEK_MIN_OCCURENCES').'" />
<input type="submit" class="button" name="submitSEK" value="'.$this->l('Apply ').'" />
</form>
<br/>'.$table;
<p><a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=language"><img src="../img/admin/asterisk.gif" /> '.$this->l('CSV Export').'</a></p><br/>
'.$form.'<br/>'.$table;
}
else
$this->html .= '<p><strong>'.$this->l('No keywords').'</strong></p>';
$this->html .= '<p>'.$form.'<strong>'.$this->l('No keywords').'</strong></p>';
$this->html .= '</div><br/>
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</h2>