Merge pull request #27199 from cfoellmann/19/PR/respect-disabledraft
QUAL respect DISABLEDRAFT on project edit
This commit is contained in:
commit
12db55d4b6
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2023 Charlene Benke <charlene@patas_monkey.com>
|
||||
* Copyright (C) 2023 Christian Foellmann <christian@foellmann.de>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -977,7 +978,11 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
// Status
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td><td>';
|
||||
print '<select class="flat" name="status" id="status">';
|
||||
foreach ($object->labelStatusShort as $key => $val) {
|
||||
$statuses = $object->labelStatusShort;
|
||||
if (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_PROJECT')) {
|
||||
unset($statuses[$object::STATUS_DRAFT]);
|
||||
}
|
||||
foreach ($statuses as $key => $val) {
|
||||
print '<option value="'.$key.'"'.((GETPOSTISSET('status') ? GETPOST('status') : $object->statut) == $key ? ' selected="selected"' : '').'>'.$langs->trans($val).'</option>';
|
||||
}
|
||||
print '</select>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue