[Rt-commit] rt branch, 3.9-merge-rtfm, updated. rt-3.9.6-1100-g5c0a860
Alex Vandiver
alexmv at bestpractical.com
Wed Dec 8 16:37:49 EST 2010
The branch, 3.9-merge-rtfm has been updated
via 5c0a860e6f0b92cb3d84e02b84f8e6c0bf7b5a64 (commit)
via cc9ff177b95d660d02d0bf0082b70e62c30106f8 (commit)
from 03aaa945097628b97a3fc7dcd4f98b927f195fed (commit)
Summary of changes:
share/html/Admin/Articles/Classes/Modify.html | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit cc9ff177b95d660d02d0bf0082b70e62c30106f8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Dec 8 16:14:30 2010 -0500
Remove old tab logic
diff --git a/share/html/Admin/Articles/Classes/Modify.html b/share/html/Admin/Articles/Classes/Modify.html
index 9cda843..594277e 100644
--- a/share/html/Admin/Articles/Classes/Modify.html
+++ b/share/html/Admin/Articles/Classes/Modify.html
@@ -152,13 +152,6 @@ $include{$_} = $include{$_} ? " CHECKED" : "" for keys %include;
my $EnabledChecked = ($Create ? $Disabled : $ClassObj->Disabled()) ? "" : "CHECKED";
my $HotListChecked = $ClassObj->HotList ? "CHECKED" : "";
-
-my $current_subtab;
-if ($Create && $Create == 1) {
- $current_subtab = "Admin/Articles/Classes/Modify.html?Create=1";
-} else {
- $current_subtab = "Admin/Articles/Classes/Modify.html?id=$id";
-}
</%INIT>
commit 5c0a860e6f0b92cb3d84e02b84f8e6c0bf7b5a64
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Dec 8 16:18:51 2010 -0500
Redirect after creation or update, so the URL has the right ID in it (which the nav uses)
diff --git a/share/html/Admin/Articles/Classes/Modify.html b/share/html/Admin/Articles/Classes/Modify.html
index 594277e..0d0716d 100644
--- a/share/html/Admin/Articles/Classes/Modify.html
+++ b/share/html/Admin/Articles/Classes/Modify.html
@@ -116,11 +116,20 @@ if ($Create) {
if ($ClassObj->Id()) {
$ARGS{HotList} ||= 0 if $Submitted;
my @attribs= qw(Description Name HotList);
- @results = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $ClassObj,
- ARGSRef => \%ARGS);
+ push @results, UpdateRecordObject( AttributesRef => \@attribs,
+ Object => $ClassObj,
+ ARGSRef => \%ARGS);
}
+# This code does automatic redirection if any updates happen.
+$m->comp(
+ '/Elements/MaybeRedirectForResults',
+ Actions => \@results,
+ Path => '/Admin/Articles/Classes/Modify.html',
+ id => $ClassObj->Id,
+ ARGSRef => \%ARGS
+);
+
#we're asking about enabled on the web page but really care about disabled.
if ((defined $Enabled && $Enabled == 1) or (not defined $Enabled and $Create)) {
$Disabled = 0;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list