From dd9b46272bce5a13b4503422b17c0b5a4e41c8c2 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 27 Jul 2009 20:24:22 +0000 Subject: [PATCH] Fix Commit from the Admin Bar. Only seen when there's no autocommit, and comments are disabled. Added a button/form to the subpanel with CSRF. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Macro/AdminBar.pm | 6 +++--- www/extras/macro/AdminBar/slidePanel.css | 17 ++++++++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 343cfcb53..82a38c645 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - fixed #10698: hard coded root paths in account templates - fixed #10700: Default My Sales template needs i18n - fixed #10702: Product displays empty brochure, warranty, manual fields + - fixed #10704: Commit version tag from AdminBar is not working 7.7.16 - fixed #10590: Session::DateTime->secondsToInterval doesn't allow 7 weeks diff --git a/lib/WebGUI/Macro/AdminBar.pm b/lib/WebGUI/Macro/AdminBar.pm index be3dade40..fec66d35f 100644 --- a/lib/WebGUI/Macro/AdminBar.pm +++ b/lib/WebGUI/Macro/AdminBar.pm @@ -70,9 +70,9 @@ sub process { else { $commitUrl = $url->page("op=commitVersionTag;tagId=".$workingId); } - $out .= q{} - .q{icon } - .$i18n->get("commit my changes").q{}; + $out .= WebGUI::Form::formHeader($session, { action => $commitUrl, }) + . q{} + . WebGUI::Form::formFooter($session); } foreach my $tag (@{$versionTags}) { next unless $user->isInGroup($tag->get("groupToUse")); diff --git a/www/extras/macro/AdminBar/slidePanel.css b/www/extras/macro/AdminBar/slidePanel.css index 3803ace92..9279bd996 100644 --- a/www/extras/macro/AdminBar/slidePanel.css +++ b/www/extras/macro/AdminBar/slidePanel.css @@ -71,7 +71,8 @@ dl.accordion-menu dd.a-m-d { font-weight: normal; } -dl.accordion-menu dd.a-m-d .link { +dl.accordion-menu dd.a-m-d .link, +dl.accordion-menu dd.a-m-d .wgButton { margin: 0; padding: 0; display: block; @@ -92,12 +93,22 @@ dl.accordion-menu dd.a-m-d .link { line-height:12px; } +dl.accordion-menu dd.a-m-d .wgButton { + background-color: transparent; + border: none; + display: inline; + margin-left: 0px; + padding-left: 0px; + width: auto; + -moz-user-select: text; +} + dl.accordion-menu dd.a-m-d .link img { margin-left:-20px; } -dl.accordion-menu dd.a-m-d .link:hover { - +dl.accordion-menu dd.a-m-d .link:hover, +dl.accordion-menu dd.a-m-d button.wgButton:hover span { color: blue; background-color: #F5F5F5; }