*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/**
* \file htdocs/core/class/html.formpropal.class.php
* \ingroup core
* \brief File of class with all html predefined components
*/
/**
* Class to manage generation of HTML components for proposal management
*/
class FormPropal
{
var $db;
var $error;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
$this->db = $db;
}
/**
* Return combo list of differents status of a proposal
* Values are id of table c_propalst
*
* @param string $selected Preselected value
* @param int $short Use short labels
* @return void
*/
function selectProposalStatus($selected='',$short=0)
{
global $langs;
$sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst";
$sql .= " WHERE active = 1";
dol_syslog(get_class($this)."::selectProposalStatus sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
print '';
}
else
{
dol_print_error($this->db);
}
}
}