diff options
author | Byron Jones <bjones@mozilla.com> | 2013-09-16 10:56:32 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-09-16 10:56:32 +0200 |
commit | bb123beb8e0371aac40d6e003dc896f1ee9a7643 (patch) | |
tree | baf10c9c9a5182afc6e71c4270c94c9881440f92 /extensions/TrackingFlags | |
parent | 385d1fa06b7800858d62953da4d5a0029a9ac4ad (diff) | |
download | bugzilla-bb123beb8e0371aac40d6e003dc896f1ee9a7643.tar.gz bugzilla-bb123beb8e0371aac40d6e003dc896f1ee9a7643.tar.xz |
Bug 916702: tracking flags 'copy' doesn't copy, it edits
Diffstat (limited to 'extensions/TrackingFlags')
-rw-r--r-- | extensions/TrackingFlags/lib/Admin.pm | 3 | ||||
-rw-r--r-- | extensions/TrackingFlags/template/en/default/pages/tracking_flags_admin_edit.html.tmpl | 2 |
2 files changed, 3 insertions, 2 deletions
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 = [ <div> <input type="submit" name="submit" id="submit" value="[% mode == 'edit' ? 'Save Changes' : 'Add' %]"> - [% IF !flag.bug_count %] + [% IF mode == "edit" && !flag.bug_count %] <input type="hidden" name="delete" id="delete" value=""> <input type="submit" value="Delete Flag [% IF flag.activity_count %] and Activity[% END %]" onclick="return delete_confirm('[% flag.name FILTER js FILTER html %]')"> |