Skip to content

Commit

Permalink
Merge branch 'aspangaro-1680' into 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 22, 2014
2 parents 3430635 + 86a3a4f commit b686789
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions htdocs/comm/propal/list.php
Expand Up @@ -56,6 +56,8 @@
$search_montant_ht=GETPOST('search_montant_ht','alpha');
$search_author=GETPOST('search_author','alpha');
$search_town=GETPOST('search_town','alpha');
$viewstatut=$db->escape(GETPOST('viewstatut'));
$object_statut=$db->escape(GETPOST('propal_statut'));

$sall=GETPOST("sall");
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
Expand All @@ -78,6 +80,26 @@
}
$result = restrictedArea($user, $module, $objectid, $dbtable);

if (GETPOST("button_removefilter") || GETPOST("button_removefilter_x")) // Both tests are required to be compatible with all browsers
{
$search_categ='';
$search_user='';
$search_sale='';
$search_ref='';
$search_refcustomer='';
$search_societe='';
$search_montant_ht='';
$search_author='';
$search_town='';
$year='';
$month='';
$viewstatut='';
$object_statut='';
}

if($object_statut != '')
$viewstatut=$object_statut;


// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('propallist'));
Expand All @@ -93,21 +115,6 @@
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

// Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x"))
{
$search_categ='';
$search_user='';
$search_sale='';
$search_ref='';
$search_refcustomer='';
$search_societe='';
$search_montant_ht='';
$search_author='';
$search_town='';
$year='';
$month='';
}


/*
Expand All @@ -132,11 +139,6 @@
$pageprev = $page - 1;
$pagenext = $page + 1;

$viewstatut=$db->escape(GETPOST('viewstatut'));
$object_statut = $db->escape(GETPOST('propal_statut'));
if($object_statut != '')
$viewstatut=$object_statut;

if (! $sortfield) $sortfield='p.datep';
if (! $sortorder) $sortorder='DESC';
$limit = $conf->liste_limit;
Expand Down Expand Up @@ -322,10 +324,12 @@
print '<td class="liste_titre" align="right">';
$formpropal->selectProposalStatus($viewstatut,1);
print '</td>';

print '<td class="liste_titre" align="right">';
print '<input type="image" name="button_search" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '<input type="image" name="button_removefilter" class="liste_titre" src="'.img_picto($langs->trans("RemoveFilter"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';

print "</tr>\n";

$var=true;
Expand Down

0 comments on commit b686789

Please sign in to comment.