From 0cb1583688c917fe5925343f3f6569f78868ac46 Mon Sep 17 00:00:00 2001 From: acognet Date: Tue, 5 Oct 2021 11:36:08 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B01731=20-=20Allow=20Transitions=20without?= =?UTF-8?q?=20unnecessary=20confirmation=20-=20add=20force=5Ftransition=5F?= =?UTF-8?q?confirmation=20param?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 2 +- core/config.class.inc.php | 92 ++++++++++++++------------ 2 files changed, 51 insertions(+), 43 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index d484cba04..650bef264 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3299,7 +3299,7 @@ EOF } } - if ($bExistFieldToDisplay) { + if ($bExistFieldToDisplay || MetaModel::GetConfig()->Get('force_transition_confirmation')) { $oPage->set_title($sActionLabel); $oPage->add(<< diff --git a/core/config.class.inc.php b/core/config.class.inc.php index 9255366a8..b98f877b9 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -1070,72 +1070,80 @@ class Config 'show_in_conf_sample' => false, ], 'transactions_gc_threshold' => [ - 'type' => 'integer', - 'description' => 'probability in percent for the garbage collector to be triggered (100 mean always)', - 'default' => 10, // added in itop 2.7.4, before the GC was always called - 'value' => '', - 'source_of_value' => '', + 'type' => 'integer', + 'description' => 'probability in percent for the garbage collector to be triggered (100 mean always)', + 'default' => 10, // added in itop 2.7.4, before the GC was always called + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'log_transactions' => [ - 'type' => 'bool', - 'description' => 'Whether or not to enable the debug log for the transactions.', - 'default' => false, - 'value' => '', - 'source_of_value' => '', + 'type' => 'bool', + 'description' => 'Whether or not to enable the debug log for the transactions.', + 'default' => false, + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'concurrent_lock_enabled' => [ - 'type' => 'bool', - 'description' => 'Whether or not to activate the locking mechanism in order to prevent concurrent edition of the same object.', - 'default' => false, - 'value' => '', - 'source_of_value' => '', + 'type' => 'bool', + 'description' => 'Whether or not to activate the locking mechanism in order to prevent concurrent edition of the same object.', + 'default' => false, + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'concurrent_lock_expiration_delay' => [ - 'type' => 'integer', - 'description' => 'Delay (in seconds) for a concurrent lock to expire', - 'default' => 120, - 'value' => '', - 'source_of_value' => '', + 'type' => 'integer', + 'description' => 'Delay (in seconds) for a concurrent lock to expire', + 'default' => 120, + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'concurrent_lock_override_profiles' => [ - 'type' => 'array', - 'description' => 'The list of profiles allowed to "kill" a lock', - 'default' => ['Administrator'], - 'value' => '', - 'source_of_value' => '', + 'type' => 'array', + 'description' => 'The list of profiles allowed to "kill" a lock', + 'default' => ['Administrator'], + 'value' => '', + 'source_of_value' => '', + 'show_in_conf_sample' => false, + ], + 'force_transition_confirmation' => [ + 'type' => 'bool', + 'description' => 'If set to true force confirmation in all transition even if there is no field to complete', + 'default' => false, + 'value' => false, + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'html_sanitizer' => [ - 'type' => 'string', - 'description' => 'The class to use for HTML sanitization: HTMLDOMSanitizer, HTMLPurifierSanitizer or HTMLNullSanitizer', - 'default' => 'HTMLDOMSanitizer', - 'value' => '', - 'source_of_value' => '', + 'type' => 'string', + 'description' => 'The class to use for HTML sanitization: HTMLDOMSanitizer, HTMLPurifierSanitizer or HTMLNullSanitizer', + 'default' => 'HTMLDOMSanitizer', + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => false, ], 'inline_image_max_display_width' => [ - 'type' => 'integer', - 'description' => 'The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width.', - 'default' => '250', - 'value' => '', - 'source_of_value' => '', + 'type' => 'integer', + 'description' => 'The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width.', + 'default' => '250', + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => true, ], 'inline_image_max_storage_width' => [ - 'type' => 'integer', - 'description' => 'The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database.', - 'default' => '1600', - 'value' => '', - 'source_of_value' => '', + 'type' => 'integer', + 'description' => 'The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database.', + 'default' => '1600', + 'value' => '', + 'source_of_value' => '', 'show_in_conf_sample' => true, ], 'draft_attachments_lifetime' => [ - 'type' => 'integer', - 'description' => 'Lifetime (in seconds) of drafts\' attachments and inline images: after this duration, the garbage collector will delete them.', + 'type' => 'integer', + 'description' => 'Lifetime (in seconds) of drafts\' attachments and inline images: after this duration, the garbage collector will delete them.', 'default' => 86400, 'value' => '', 'source_of_value' => '',