[Rt-commit] [svn] r1311 - in rt/branches/3.2-RELEASE/html/Admin:
Elements Global Queues
huberth at pallas.eruditorum.org
huberth at pallas.eruditorum.org
Wed Aug 4 20:44:41 EDT 2004
Author: huberth
Date: Wed Aug 4 20:44:40 2004
New Revision: 1311
Modified:
rt/branches/3.2-RELEASE/html/Admin/Elements/EditCustomField
rt/branches/3.2-RELEASE/html/Admin/Global/CustomField.html
rt/branches/3.2-RELEASE/html/Admin/Queues/CustomField.html
Log:
RT-Ticket: 4234
RT-Status: resolved
* Doubled headers and navbars no longer appear when an unprivileged user
creates a Custom Field. (This happened because Abort was called within
a subcomponent.)
Modified: rt/branches/3.2-RELEASE/html/Admin/Elements/EditCustomField
==============================================================================
--- rt/branches/3.2-RELEASE/html/Admin/Elements/EditCustomField (original)
+++ rt/branches/3.2-RELEASE/html/Admin/Elements/EditCustomField Wed Aug 4 20:44:40 2004
@@ -32,7 +32,8 @@
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
%# community by submitting them to Best Practical Solutions, LLC.)
-%#
+%# http://www.foxnews.com/story/0,2933,127839,00.html
+
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
@@ -103,18 +104,26 @@
Type => $Type,
Description => $Description,
);
- Abort(loc("Could not create CustomField", $msg)) unless ($val);
- push @results, $msg;
- $CustomFieldObj->SetSortOrder($CustomFieldObj->id);
- $title = loc('Created CustomField [_1]', $CustomFieldObj->Name());
+
+ # if there is an error, then abort. But since at this point there's
+ # stuff already printed, clear it out.
+ # (This only works in conjunction with temporarily turning autoflush
+ # off in the files that use this component.)
+ unless ($val) {
+ $m->clear_buffer;
+ Abort(loc("Could not create CustomField: [_1]", $msg));
+ }
+ push @results, $msg;
+ $CustomFieldObj->SetSortOrder($CustomFieldObj->id);
+ $title = loc('Created CustomField [_1]', $CustomFieldObj->Name());
} else {
- $CustomFieldObj->Load($CustomField) || Abort(loc('No CustomField'));
+ $CustomFieldObj->Load($CustomField) || Abort(loc('No CustomField'));
$title = loc('Editing CustomField [_1]', $CustomFieldObj->Name());
my @aresults = ProcessCustomFieldUpdates (
CustomFieldObj => $CustomFieldObj,
ARGSRef => \%ARGS );
- push @results, @aresults;
+ push @results, @aresults;
}
Modified: rt/branches/3.2-RELEASE/html/Admin/Global/CustomField.html
==============================================================================
--- rt/branches/3.2-RELEASE/html/Admin/Global/CustomField.html (original)
+++ rt/branches/3.2-RELEASE/html/Admin/Global/CustomField.html Wed Aug 4 20:44:40 2004
@@ -50,9 +50,10 @@
subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
+<& "/Admin/Elements/EditCustomField", title => $title, %ARGS &>
<%INIT>
+
my ($title, $current_subtab);
my $subtabs = {
@@ -77,7 +78,11 @@
path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"
};
}
+
</%INIT>
<%ARGS>
$CustomField => undef
</%ARGS>
+<%ATTR>
+AutoFlush => 0
+</%ATTR>
\ No newline at end of file
Modified: rt/branches/3.2-RELEASE/html/Admin/Queues/CustomField.html
==============================================================================
--- rt/branches/3.2-RELEASE/html/Admin/Queues/CustomField.html (original)
+++ rt/branches/3.2-RELEASE/html/Admin/Queues/CustomField.html Wed Aug 4 20:44:40 2004
@@ -51,7 +51,7 @@
subtabs => $subtabs,
Title => $title &>
-<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
+<& "/Admin/Elements/EditCustomField", title => $title, %ARGS &>
<%INIT>
my $QueueObj = new RT::Queue($session{'CurrentUser'});
@@ -80,3 +80,6 @@
$CustomField => undef
$Queue => undef
</%ARGS>
+<%ATTR>
+AutoFlush => 0
+</%ATTR>
\ No newline at end of file
More information about the Rt-commit
mailing list