Esempio n. 1
0
 /**
  * @brief return a html string with the search_form
  * \return a HTML string with the FORM
  * \see build_search_sql
  * \see search_form
  * \see list_operation
  */
 function display_search_form()
 {
     $r = '';
     $type = $this->type;
     if ($type == "") {
         $type = 'ALL';
     }
     $r .= '<div id="search_form" style="display:none">';
     $r .= HtmlInput::anchor_hide('&#10761;', '$(\'search_form\').style.display=\'none\';');
     $r .= h2('Recherche', 'class="title"');
     $r .= '<FORM METHOD="GET">';
     $r .= $this->search_form($type);
     $r .= HtmlInput::submit('search', _('Rechercher'));
     $r .= HtmlInput::hidden('ac', $_REQUEST['ac']);
     /*  when called from commercial.php some hidden values are needed */
     if (isset($_REQUEST['sa'])) {
         $r .= HtmlInput::hidden("sa", $_REQUEST['sa']);
     }
     if (isset($_REQUEST['sb'])) {
         $r .= HtmlInput::hidden("sb", $_REQUEST['sb']);
     }
     if (isset($_REQUEST['sc'])) {
         $r .= HtmlInput::hidden("sc", $_REQUEST['sc']);
     }
     if (isset($_REQUEST['f_id'])) {
         $r .= HtmlInput::hidden("f_id", $_REQUEST['f_id']);
     }
     $r .= '</FORM>';
     $r .= '</div>';
     $button = new IButton('tfs');
     $button->label = _("Filtrer");
     $button->javascript = "toggleHideShow('search_form','tfs');";
     $r .= $button->input();
     return $r;
 }
Esempio n. 2
0
 /**
  * Title for boxes, you can customize the symbol thanks symbol with
  * the mode "custom"
  * @param type $name Title
  * @param type $div element id, except for mode none or custom
  * @param type $mod hide , close , zoom , custom or none, with
  * custom , the $name contains all the code
  * @param type $p_js contains the javascript with "custom" contains button + code 
  * @return type
  */
 static function title_box($name, $div, $mod = "close", $p_js = "")
 {
     if ($mod == 'close') {
         $r = HtmlInput::anchor_close($div, $p_js);
     } else {
         if ($mod == 'hide') {
             $r = HtmlInput::anchor_hide("&#10761;", "\$('{$div}').hide();{$p_js}");
         } else {
             if ($mod == 'zoom') {
                 $r = '<span  id="span_' . $div . '" style="float:right;margin-right:5px">' . HtmlInput::anchor("&#11036;", "", $p_js, ' name="small' . $div . '" id="close_div" class="input_text"  ') . '</span>';
             } else {
                 if ($mod == 'custom') {
                     $r = '<span  id="span_' . $div . '" style="float:right;margin-right:5px">' . $p_js . "</span>";
                 } else {
                     if ($mod == 'none') {
                         $r = "";
                     } else {
                         die(__FILE__ . ":" . __LINE__ . _('Paramètre invaide'));
                     }
                 }
             }
         }
     }
     $r .= h2($name, ' class="title" ');
     return $r;
 }
Esempio n. 3
0
/**
 * @file
 * @brief display the form for searching action
 *
 */
if (!$inner) {
    ?>
<div id="search_action" class="op_detail_frame" style="position:absolute;display:none;margin-left:120px;width:70%;clear:both;z-index:2;height:auto;border:1px #000080 solid">
	<?php 
    echo HtmlInput::anchor_hide('&#10761;', "\$('search_action').style.display='none';");
}
if ($inner) {
    ?>
<div id="search_action" class="">
	<?php 
    echo HtmlInput::anchor_hide('&#10761;', "removeDiv('search_action_div');");
    ?>

	<?php 
}
?>
	<h2 class="title">
		<?php 
echo _('Recherche avancée');
?>
	</h2>
<?php 
if (!$inner) {
    ?>
	<form method="get" action="do.php" style="padding:10px">
<?php