bugfix: la catégorie mère n'était pas récupérée lors de l'édition d'une catégorie fille
This commit is contained in:
parent
840a3d24da
commit
706914c4e9
@ -90,7 +90,6 @@ class Categorie
|
|||||||
{
|
{
|
||||||
$res = $this->db->fetch_array($resql);
|
$res = $this->db->fetch_array($resql);
|
||||||
$this->id_mere = $res['fk_categorie_mere'];
|
$this->id_mere = $res['fk_categorie_mere'];
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -90,54 +91,42 @@ print '<form method="post" action="'.$_SERVER['PHP_SELF'].'">';
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="id" value="'.$categorie->id.'">';
|
print '<input type="hidden" name="id" value="'.$categorie->id.'">';
|
||||||
|
|
||||||
?>
|
print '<table class="border" width="100%">';
|
||||||
<table class="border" width="100%">
|
print '<tr><td>';
|
||||||
<tr>
|
print $langs->trans("Label").' :</td>';
|
||||||
<td><?php print $langs->trans("Label"); ?> :</td>
|
print '<td><input type="text" size="25" id="nom" name ="nom" value="'.$categorie->label.'" />';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
<td><input type='text' size='25' id='nom' name ='nom' value="<?php
|
print '<tr>';
|
||||||
print $categorie->label;
|
print '<td width="25%">'.$langs->trans("Description").':</td>';
|
||||||
?>" />
|
print '<td>';
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
print '<tr>';
|
|
||||||
print '<td width="25%">'.$langs->trans("Description").':</td>';
|
|
||||||
print '<td>';
|
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes');
|
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<textarea name="description" rows="'.ROWS_6.'" cols="50">';
|
print '<textarea name="description" rows="'.ROWS_6.'" cols="50">';
|
||||||
print $categorie->description;
|
print $categorie->description;
|
||||||
print '</textarea>';
|
print '</textarea>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td></tr>';
|
||||||
print '</tr>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr><td><?php print $langs->trans ("AddIn"); ?></td><td>
|
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
|
||||||
<?php print $html->select_all_categories($categorie->id_mere);?>
|
print $html->select_all_categories($categorie->id_mere);
|
||||||
</td></tr>
|
print '</td></tr>';
|
||||||
|
|
||||||
<tr><td><?php print $langs->trans ("ContentsVisibleByAll"); ?></td><td>
|
print '<tr><td>'.$langs->trans("ContentsVisibleByAll").'</td><td>';
|
||||||
<?php print $html->selectyesnonum("visible",$categorie->visible);?>
|
print $html->selectyesnonum("visible",$categorie->visible);
|
||||||
</td></tr>
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center"><input type="submit" class="button" value='<?php print $langs->trans ("Modify"); ?>'></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table></form>';
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
|||||||
@ -1253,7 +1253,7 @@ class Form
|
|||||||
{
|
{
|
||||||
foreach($cate_arbo as $key => $value)
|
foreach($cate_arbo as $key => $value)
|
||||||
{
|
{
|
||||||
if ($cate_arbo[$key]['fulllabel'] == $selected)
|
if ($cate_arbo[$key]['id'] == $selected)
|
||||||
{
|
{
|
||||||
$add = "selected='true' ";
|
$add = "selected='true' ";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user