Gestion de la liste de formats de livre
This commit is contained in:
parent
74b9edbd09
commit
9e3dd487c0
@ -52,8 +52,11 @@
|
||||
</td>
|
||||
<td>Format</td>
|
||||
<td>
|
||||
<input name="format" size="8" maxlength="7" value="{$prod_format}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
|
||||
<select class="flat" name="format">
|
||||
{html_options values=$livre_available_formats output=$livre_available_formats selected="$prod_format"}
|
||||
</select>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -58,8 +58,9 @@
|
||||
</td>
|
||||
<td>Format</td>
|
||||
<td>
|
||||
<input name="format" size="8" maxlength="7" value="{$prod_format}"
|
||||
class="normal" onfocus="this.className='focus';" onblur="this.className='normal';">
|
||||
<select class="flat" name="format">
|
||||
{html_options values=$livre_available_formats output=$livre_available_formats selected="$prod_format"}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -431,6 +431,10 @@ class ProductLivre extends Product
|
||||
$smarty->assign('prod_statuts_id', array(1,0) );
|
||||
$smarty->assign('prod_statuts_value', array('En vente', 'Hors vente') );
|
||||
|
||||
$this->GetAvailableFormat();
|
||||
|
||||
$smarty->assign('livre_available_formats', $this->available_formats);
|
||||
|
||||
if ($this->status==1)
|
||||
{
|
||||
$smarty->assign('prod_statut', 'En vente');
|
||||
@ -527,5 +531,26 @@ class ProductLivre extends Product
|
||||
print $sql;
|
||||
}
|
||||
}
|
||||
|
||||
function GetAvailableFormat()
|
||||
{
|
||||
$this->available_formats = array();
|
||||
|
||||
$sql = "SELECT rowid,value FROM ".MAIN_DB_PREFIX."const ";
|
||||
$sql.=" WHERE name LIKE 'EDITEUR_LIVRE_FORMAT_%';";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql) )
|
||||
{
|
||||
$this->available_formats[$obj->rowid] = stripslashes($obj->value);
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user