Redirect after editing custom fields
parent
6b9ff9189b
commit
083796d775
|
@ -67,10 +67,10 @@ elsif ($action eq 'new')
|
|||
|
||||
delete_token($token);
|
||||
|
||||
$vars->{message} = 'custom_field_created';
|
||||
|
||||
$template->process('admin/custom_fields/list.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
Bugzilla->add_result_message({ message => 'custom_field_created', field => { name => $field->name } });
|
||||
Bugzilla->save_session_data;
|
||||
print Bugzilla->cgi->redirect('editfields.cgi');
|
||||
exit;
|
||||
}
|
||||
elsif ($action eq 'edit')
|
||||
{
|
||||
|
@ -156,10 +156,10 @@ elsif ($action eq 'update')
|
|||
|
||||
delete_token($token);
|
||||
|
||||
$vars->{message} = 'custom_field_updated';
|
||||
|
||||
$template->process('admin/custom_fields/list.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
Bugzilla->add_result_message({ message => 'custom_field_updated', field => { name => $field->name } });
|
||||
Bugzilla->save_session_data;
|
||||
print Bugzilla->cgi->redirect('editfields.cgi');
|
||||
exit;
|
||||
}
|
||||
elsif ($action eq 'del')
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ elsif ($action eq 'del')
|
|||
$vars->{token} = issue_session_token('delete_field');
|
||||
|
||||
$template->process('admin/custom_fields/confirm-delete.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
|| ThrowTemplateError($template->error());
|
||||
}
|
||||
elsif ($action eq 'delete')
|
||||
{
|
||||
|
@ -186,13 +186,12 @@ elsif ($action eq 'delete')
|
|||
# If the field cannot be deleted, it will throw an error.
|
||||
$field->remove_from_db();
|
||||
|
||||
$vars->{field} = $field;
|
||||
$vars->{message} = 'custom_field_deleted';
|
||||
|
||||
delete_token($token);
|
||||
|
||||
$template->process('admin/custom_fields/list.html.tmpl', $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
Bugzilla->add_result_message({ message => 'custom_field_deleted', field => { name => $field->name } });
|
||||
Bugzilla->save_session_data;
|
||||
print Bugzilla->cgi->redirect('editfields.cgi');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@ var constants = {
|
|||
</tr></table>
|
||||
[% END %]
|
||||
|
||||
<form id="edit_field" action="editfields.cgi" method="GET">
|
||||
<form id="edit_field" action="editfields.cgi" method="POST">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td>
|
||||
|
|
|
@ -131,6 +131,30 @@
|
|||
</p>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_created %]
|
||||
[% title = "Custom Field Created" %]
|
||||
<div class="message">
|
||||
The new custom field '[% field.name | html %]' has been
|
||||
successfully created.
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_deleted %]
|
||||
[% title = "Custom Field Deleted" %]
|
||||
<div class="message">
|
||||
The custom field '[% field.name | html %]' has been
|
||||
successfully deleted.
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_updated %]
|
||||
[% title = "Custom Field Updated" %]
|
||||
<div class="message">
|
||||
Properties of the '[% field.name | html %]' field have been
|
||||
successfully updated.
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[%# This is a list of all the possible messages. Please keep them in
|
||||
# alphabetical order by message tag, and leave a blank line between messages.
|
||||
#%]
|
||||
|
@ -364,24 +388,6 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_created %]
|
||||
[% title = "Custom Field Created" %]
|
||||
The new custom field '[% field.name | html %]' has been
|
||||
successfully created.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_deleted %]
|
||||
[% title = "Custom Field Deleted" %]
|
||||
The custom field '[% field.name | html %]' has been
|
||||
successfully deleted.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_custom_field_updated %]
|
||||
[% title = "Custom Field Updated" %]
|
||||
Properties of the '[% field.name | html %]' field have been
|
||||
successfully updated.
|
||||
[% END %]
|
||||
|
||||
[% BLOCK msg_emailold_change_canceled %]
|
||||
[% title = "Cancel Request to Change Email Address" %]
|
||||
The request to change the email address for your account to
|
||||
|
|
Loading…
Reference in New Issue