From cba10bbd4d17e704345b0743c1d6818d4837f42d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 21 Dec 2020 15:18:55 +0100 Subject: [PATCH 1/3] FIX: create form variant https://github.com/Dolibarr/dolibarr/issues/15759 --- htdocs/variants/create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/create.php b/htdocs/variants/create.php index 84530e01cb5..ff1ed1be127 100644 --- a/htdocs/variants/create.php +++ b/htdocs/variants/create.php @@ -70,7 +70,7 @@ print dol_get_fiche_head(); print '
'; print ''; -print ''; +print ''; print ''; ?> From 94cf393f7f4a68acf676d44fb620d600f942f055 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 21 Dec 2020 15:43:45 +0100 Subject: [PATCH 2/3] Update combinations.php --- htdocs/variants/combinations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 3a2936d0df5..24da596f3c2 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -227,7 +227,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $db->commit(); setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } -} elseif ($valueid > 0) { +} elseif ($action === 'update' && $valueid > 0) { if ($prodcomb->fetch($valueid) < 0) { dol_print_error($db, $langs->trans('ErrorRecordNotFound')); exit(); From 48dfc90c8b6620b01427112a76eb42a5ed0b9d36 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Dec 2020 18:06:02 +0100 Subject: [PATCH 3/3] Update create.php --- htdocs/variants/create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/variants/create.php b/htdocs/variants/create.php index ff1ed1be127..e37548f39f3 100644 --- a/htdocs/variants/create.php +++ b/htdocs/variants/create.php @@ -29,7 +29,7 @@ $action = GETPOST('action', 'alpha'); * Actions */ -if ($action == 'create') { +if ($action == 'add') { if (empty($ref) || empty($label)) { setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors'); } else { @@ -70,7 +70,7 @@ print dol_get_fiche_head(); print ''; print ''; -print ''; +print ''; print ''; ?>