Skip to content
Snippets Groups Projects
Commit fe6af7d8 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX Description of tags was mandatory in edit mode but not in create

mode. Should not be mandatory.
parent f2e2edbc
Branches
Tags
No related merge requests found
......@@ -82,20 +82,16 @@ if ($action == 'update' && $user->rights->categorie->creer)
if (empty($categorie->label))
{
$action = 'create';
$error++;
$action = 'edit';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
}
if (empty($categorie->description))
{
$action = 'create';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")), 'errors');
}
if (empty($categorie->error))
{
$ret = $extrafields->setOptionalsFromPost($extralabels,$categorie);
if ($ret < 0) $error++;
if ($categorie->update($user) > 0)
if (! $error && $categorie->update($user) > 0)
{
header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type);
exit;
......@@ -138,14 +134,14 @@ dol_fiche_head('');
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired">';
print '<tr><td class="fieldrequired" width="25%">';
print $langs->trans("Ref").'</td>';
print '<td><input type="text" size="25" id="label" name ="label" value="'.$object->label.'" />';
print '</tr>';
// Description
print '<tr>';
print '<td class="fieldrequired" width="25%">'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td >';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment