diff options
| -rw-r--r-- | extensions/Mageia/Extension.pm | 11 | ||||
| -rw-r--r-- | extensions/Mageia/template/en/default/hook/global/setting-descs-settings.none.tmpl | 7 |
2 files changed, 14 insertions, 4 deletions
diff --git a/extensions/Mageia/Extension.pm b/extensions/Mageia/Extension.pm index e8addda10..5e0e305f9 100644 --- a/extensions/Mageia/Extension.pm +++ b/extensions/Mageia/Extension.pm @@ -31,6 +31,7 @@ use constant SYSADMIN_USER_ID => 175; use constant MGA_SETTINGS => { mga_inline_history => { options => ['on', 'off'], default => 'on' }, + mga_new_bug_form => { options => ['expert', 'guided'], default => 'guided' } }; sub bug_check_can_change_field { @@ -129,10 +130,14 @@ sub bug_format_comment { sub enter_bug_entrydefaultvars { my ($self, $vars) = @_; my $cgi = Bugzilla->cgi; + my $user = Bugzilla->user; - # By default, users should get the guided form when reporting a new bug. - # Pass &normal=1 to the URL to get the official bug form. - my $format = $cgi->param('normal') ? '' : 'guided'; + # By default, users get the guided form when reporting a new bug, unless + # specified otherwise in user preferences or in the URL ( &normal=1 ). + my $format = 'guided'; + if ($cgi->param('normal') || $user->setting('mga_new_bug_form') eq 'expert') { + $format = ''; + } $cgi->param('format', $format); } diff --git a/extensions/Mageia/template/en/default/hook/global/setting-descs-settings.none.tmpl b/extensions/Mageia/template/en/default/hook/global/setting-descs-settings.none.tmpl index 5b1da08aa..c3b30fa12 100644 --- a/extensions/Mageia/template/en/default/hook/global/setting-descs-settings.none.tmpl +++ b/extensions/Mageia/template/en/default/hook/global/setting-descs-settings.none.tmpl @@ -6,4 +6,9 @@ # defined by the Mozilla Public License, v. 2.0. #%] -[% setting_descs.mga_inline_history = "Display inline history in $terms.bug reports" %] +[% setting_descs.import({ + "expert" => "Expert", + "guided" => "Guided", + "mga_inline_history" => "Display inline history in $terms.bug reports", + "mga_new_bug_form" => "Form to use for new $terms.bugs" +}) %] |
