From bb123beb8e0371aac40d6e003dc896f1ee9a7643 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 16 Sep 2013 16:56:32 +0800 Subject: Bug 916702: tracking flags 'copy' doesn't copy, it edits --- extensions/TrackingFlags/lib/Admin.pm | 3 ++- .../template/en/default/pages/tracking_flags_admin_edit.html.tmpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/TrackingFlags/lib/Admin.pm b/extensions/TrackingFlags/lib/Admin.pm index 5af593f08..ef7672eaa 100644 --- a/extensions/TrackingFlags/lib/Admin.pm +++ b/extensions/TrackingFlags/lib/Admin.pm @@ -81,6 +81,7 @@ sub admin_edit { } else { $vars->{message} = 'tracking_flag_updated'; } + $vars->{mode} = 'edit'; } else { # initial load @@ -145,7 +146,7 @@ sub _load_from_input { # flag my $flag = { - id => $input->{flag_id} || 0, + id => ($input->{mode} eq 'edit' ? $input->{flag_id} : 0), name => trim($input->{flag_name} || ''), description => trim($input->{flag_desc} || ''), sortkey => $input->{flag_sort} || 0, diff --git a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl index 17b64d41e..12c8d2c3b 100644 --- a/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl +++ b/extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl @@ -180,7 +180,7 @@ var selected_components = [
- [% IF !flag.bug_count %] + [% IF mode == "edit" && !flag.bug_count %] -- cgit v1.2.3-24-g4f1b