diff --git a/docs/migration.txt b/docs/migration.txt index 0e7c45a45..eac3e2c2a 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -3,6 +3,14 @@ WebGUI 8 Migration Guide The information contained herein documents the API changes that have occurred in the WebGUI 8 development effort and how to migrate your code to accomodate the new APIs. +WebGUI::Macro::AdminBar +========================== +There is no Admin Bar for normal pages. Only the admin mode can see the admin bar. + +WebGUI::Macro::AdminToggle +========================== +The Admin Toggle can only enter admin mode, it cannot leave it, so there is no "Turn Off" text. The second +parameter is now the template ID. WebGUI::Config diff --git a/lib/WebGUI/Admin.pm b/lib/WebGUI/Admin.pm index 7e0fca3cd..9ef62c5bf 100644 --- a/lib/WebGUI/Admin.pm +++ b/lib/WebGUI/Admin.pm @@ -327,7 +327,7 @@ __DATA__
^International("admin console","AdminConsole");
- + icon diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index e41cec1aa..b7b7cbd67 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1042,7 +1042,7 @@ sub getHelpers { my ( $self ) = @_; my $default = [ - { + { class => 'WebGUI::AssetHelper::EditBranch', label => 'Edit Branch', }, @@ -2059,6 +2059,8 @@ sub processEditForm { my $overrides = $self->session->config->get( "assets/" . $self->get("className") . "/fields" ); foreach my $property ( $self->getProperties ) { + next if $self->meta->find_attribute_by_name( $property )->noFormPost; + my $fieldType = $self->meta->find_attribute_by_name($property)->fieldType; my $fieldOverrides = $overrides->{$property} || {}; my $fieldHash = { @@ -2069,7 +2071,6 @@ sub processEditForm { value => $self->$property, }; - next if ( $fieldHash->{noFormPost} ); # process the form element $data{$property} = $form->process( $property, $fieldType, $fieldHash->{defaultValue}, $fieldHash ); @@ -2084,6 +2085,9 @@ sub processEditForm { $self->updateMetaData( $field, $value ); } } + + $self->session->log->info( Dumper \%data ); + $self->session->db->beginTransaction; $self->update( \%data ); $self->session->db->commit; diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index c73bf1356..9d1e68a30 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -43,7 +43,7 @@ These functions are available from this package: =cut #------------------------------------------------------------------- -my $macro_re = qr{ +our $macro_re = qr{ ( # capture #1 - entire macro call \^ # start with carat ([-a-zA-Z0-9_@#/*]{1,64}) # capture #2 - macro name diff --git a/lib/WebGUI/Macro/AdminToggle.pm b/lib/WebGUI/Macro/AdminToggle.pm index 493799b69..9597b2b75 100644 --- a/lib/WebGUI/Macro/AdminToggle.pm +++ b/lib/WebGUI/Macro/AdminToggle.pm @@ -48,16 +48,15 @@ sub process { my $session = shift; return "" unless $session->user->canUseAdminMode; - my ($turnOn, $turnOff, $templateName) = @_; + my ($turnOn, $templateName) = @_; my $i18n = WebGUI::International->new($session,'Macro_AdminToggle'); my %var; + $var{'toggle.text'} = $turnOn || $i18n->get(516); if ($session->var->isAdminOn) { - $var{'toggle.url'} = $session->url->page('op=switchOffAdmin'); - $var{'toggle.text'} = $turnOff || $i18n->get(517); + $var{'toggle.url'} = '#' } else { - $var{'toggle.url'} = $session->url->page('op=switchOnAdmin'); - $var{'toggle.text'} = $turnOn || $i18n->get(516); + $var{'toggle.url'} = $session->url->page('op=admin'); } my $template = $templateName ? WebGUI::Asset::Template->newByUrl($session, $templateName) : WebGUI::Asset::Template->newById($session, "PBtmpl0000000000000036"); diff --git a/share/upgrades/7.9.8-8.0.0/removeAdminBar.pl b/share/upgrades/7.9.8-8.0.0/removeAdminBar.pl new file mode 100644 index 000000000..d55ca6018 --- /dev/null +++ b/share/upgrades/7.9.8-8.0.0/removeAdminBar.pl @@ -0,0 +1,10 @@ + +use WebGUI::Upgrade::Script; + + +report "\tRemoving Admin Bar... "; + +$session->config->delete( 'macros/AdminBar' ); + + +done;