Merge pull request #2195 from marcosgdf/bug-1714
Fix [ bug #1714 ] Id "sall" is used twice in different HTML tags
This commit is contained in:
commit
41118a174a
@ -85,7 +85,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em
|
||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
||||
{
|
||||
$langs->load("products");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall');
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', '', 'sall'.rand(0,10));
|
||||
$nbofsearch++;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em
|
||||
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
||||
{
|
||||
$langs->load("members");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall');
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'sall'.rand(0,10));
|
||||
$nbofsearch++;
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
* Copyright (C) 2008 Matteli
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1556,7 +1557,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
||||
{
|
||||
$langs->load("products");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P');
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'sall'.rand(0, 10));
|
||||
}
|
||||
|
||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled)
|
||||
@ -1569,7 +1570,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
||||
{
|
||||
$langs->load("members");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M');
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M', 'sall'.rand(0, 10));
|
||||
}
|
||||
|
||||
// Execute hook printSearchForm
|
||||
@ -1806,12 +1807,17 @@ function getHelpParamFor($helppagename,$langs)
|
||||
* @param string $htmlmodesearch Value to set into parameter "mode_search" ('soc','contact','products','member',...)
|
||||
* @param string $htmlinputname Field Name input form
|
||||
* @param string $accesskey Accesskey
|
||||
* @param string $htmlinputid Input ID
|
||||
* @return string
|
||||
*/
|
||||
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='')
|
||||
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='', $htmlinputid = '')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
if (!$htmlinputid) {
|
||||
$htmlinputid = $htmlinputname;
|
||||
}
|
||||
|
||||
$ret='';
|
||||
$ret.='<form action="'.$urlaction.'" method="post">';
|
||||
$ret.='<div class="menu_titre menu_titre_search">';
|
||||
@ -1828,7 +1834,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput
|
||||
$ret.=($accesskey?' accesskey="'.$accesskey.'"':'');
|
||||
if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
||||
else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
||||
$ret.=' name="'.$htmlinputname.'" id="'.$htmlinputname.'" size="10" />';
|
||||
$ret.=' name="'.$htmlinputname.'" id="'.$htmlinputid.'" size="10" />';
|
||||
$ret.='<input type="submit" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px" value="'.$langs->trans("Go").'">';
|
||||
$ret.="</form>\n";
|
||||
return $ret;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user