Update admin_extrafields.inc.php
$default_value not initialised new type : sellist
This commit is contained in:
parent
4d0dd0d56c
commit
e0cb09bd65
@ -66,6 +66,13 @@ if ($action == 'add')
|
|||||||
$mesg[]=$langs->trans("ErrorNoValueForSelectType");
|
$mesg[]=$langs->trans("ErrorNoValueForSelectType");
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
if (GETPOST('type')=='sellist' && !GETPOST('param'))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg[]=$langs->trans("ErrorNoValueForSelectListType");
|
||||||
|
$action = 'create';
|
||||||
|
}
|
||||||
if (GETPOST('type')=='checkbox' && !GETPOST('param'))
|
if (GETPOST('type')=='checkbox' && !GETPOST('param'))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
@ -114,6 +121,7 @@ if ($action == 'add')
|
|||||||
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
||||||
{
|
{
|
||||||
// Construct array for parameter (value of select list)
|
// Construct array for parameter (value of select list)
|
||||||
|
$default_value = GETPOST('default_value');
|
||||||
$parameters = GETPOST('param');
|
$parameters = GETPOST('param');
|
||||||
$parameters_array = explode("\r\n",$parameters);
|
$parameters_array = explode("\r\n",$parameters);
|
||||||
foreach($parameters_array as $param_ligne)
|
foreach($parameters_array as $param_ligne)
|
||||||
@ -186,6 +194,13 @@ if ($action == 'update')
|
|||||||
$mesg[]=$langs->trans("ErrorNoValueForSelectType");
|
$mesg[]=$langs->trans("ErrorNoValueForSelectType");
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
}
|
}
|
||||||
|
if (GETPOST('type')=='sellist' && !GETPOST('param'))
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
$langs->load("errors");
|
||||||
|
$mesg[]=$langs->trans("ErrorNoValueForSelectListType");
|
||||||
|
$action = 'edit';
|
||||||
|
}
|
||||||
if (GETPOST('type')=='checkbox' && !GETPOST('param'))
|
if (GETPOST('type')=='checkbox' && !GETPOST('param'))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user