From ed0e76c114f53b1b0974f8b1f91d058dfced877a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 10 Sep 2008 21:30:48 +0000 Subject: [PATCH] finish adding the EMS Badge template --- .../packages-7.6.0/default_emsbadge.wgpkg | Bin 1047 -> 1049 bytes docs/upgrades/upgrade_7.5.21-7.6.0.pl | 9 ++ lib/WebGUI/Asset/Sku/EMSBadge.pm | 7 +- .../Help/Asset_EventManagementSystem.pm | 50 ++++++++ .../English/Asset_EventManagementSystem.pm | 108 ++++++++++++++++++ 5 files changed, 171 insertions(+), 3 deletions(-) diff --git a/docs/upgrades/packages-7.6.0/default_emsbadge.wgpkg b/docs/upgrades/packages-7.6.0/default_emsbadge.wgpkg index c4f20cd3b86e7e88471e590beefc8bca2ec81228..46e84a226ddbbbd1400aef68345093b44480c505 100644 GIT binary patch literal 1049 zcmV+!1m^o6iwFP!000001MOFBZ{kJ}=JWju%O9Fnx(1s!3mTmidgMZNIi(lUtNIo# z_6BdUcelIiaHP8b-r2Ds7z{_Mqv{7N1(ThbXWnO))7s%5&+~$IyHHERypIY!QY9yd{Y`(3Qiu||zcCeQJW*d&2|0Ifs%KzyX4dKDS{(b>X=xQSr znNZj1IltNic}iy2xM95~9uEqZA4l&QX$Q zNwUfToo7&|E3?r5sVB!cLy+D^2lrVzjG4^rK?EF+rA1e~&!USenZl0^~a6`nAC zt%MO~F7sHF1t&^mau^LFW>B_Of;ELcB>l$EV*k~d0Tb>Xh;j@w34L`|heIIA6-q>P zsF*ZNaG*;|2BtrT+)%}dJtoQ5C+M^jizK4TVf4KI5@Kp1m<;EI4&|mX4{~={qt$!H(YV>=K$1mN-v^_PI{qs3HV-QkS<; z{i!_{-KMi~%FKB_88#aGLI{{ea9kR9jK@?lbE}dICDLo6VCqy%)DTvWeh1x*v=4Or z=62ZYp(nlGVnmmK6UJ$=|6Dt}%QvDDE0)stG2xRfdk@DhYJQzB5NB|8{gW668v88a&+~!G8#<372$Ld+x06$3{3*zIoB*3Rf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2ee62552..5e07d577e 100644 --- a/docs/upgrades/upgrade_7.5.21-7.6.0.pl +++ b/docs/upgrades/upgrade_7.5.21-7.6.0.pl @@ -30,6 +30,7 @@ my $session = start(); # this line required removeDoNothingOnDelete( $session ); fixIsPublicOnTemplates ( $session ); +addEMSBadgeTemplate ( $session ); finish($session); # this line required @@ -40,6 +41,14 @@ sub fixIsPublicOnTemplates { $session->db->write('UPDATE `assetIndex` SET `isPublic` = 0 WHERE assetId IN (SELECT assetId FROM asset WHERE className IN ("WebGUI::Asset::RichEdit", "WebGUI::Asset::Snippet", "WebGUI::Asset::Template") )'); } +#---------------------------------------------------------------------------- +sub addEMSBadgeTemplate { + my $session = shift; + print "\tAdding EMS Badge Template" unless $quiet; + $session->db->write('ALTER TABLE EMSBadge ADD COLUMN templateId VARCHAR(22) BINARY NOT NULL'); + print "Done.\n" unless $quiet; +} + #---------------------------------------------------------------------------- sub removeDoNothingOnDelete { my $session = shift; diff --git a/lib/WebGUI/Asset/Sku/EMSBadge.pm b/lib/WebGUI/Asset/Sku/EMSBadge.pm index ee56d6f94..dd5441aec 100644 --- a/lib/WebGUI/Asset/Sku/EMSBadge.pm +++ b/lib/WebGUI/Asset/Sku/EMSBadge.pm @@ -341,9 +341,10 @@ sub view { { name => "callback", value => JSON->new->utf8->encode({ url => $self->getUrl}) - } + }) . WebGUI::Form::submit($session, {value => $i18n->get("populate from address book")}) - ); + . WebGUI::Form::formFooter($session) + ; # instanciate address my $address = WebGUI::Shop::AddressBook->newBySession($self->session)->getAddress($form->get("addressId")) if ($form->get("addressId")); @@ -396,7 +397,7 @@ sub view { name => 'email', defaultValue => $form->get('email','email'), }); - $vars{submitAddress} = WebGUI::Form::text($session, {value => $i18n->get('add to cart'),}); + $vars{submitAddress} = WebGUI::Form::submit($session, {value => $i18n->get('add to cart'),}); $vars{title} = $self->getTitle; $vars{description} = $self->get('description'); diff --git a/lib/WebGUI/Help/Asset_EventManagementSystem.pm b/lib/WebGUI/Help/Asset_EventManagementSystem.pm index c9615c60a..eacf27f93 100644 --- a/lib/WebGUI/Help/Asset_EventManagementSystem.pm +++ b/lib/WebGUI/Help/Asset_EventManagementSystem.pm @@ -136,6 +136,56 @@ our $HELP = { related => [], }, + 'ems view badge template' => { + source => 'sub view', + title => 'view badge template', + body => '', + variables => [ + { 'name' => 'error', + 'description' => 'ems view badge error' }, + { 'name' => 'addressBook'}, + { 'name' => 'formHeader', + 'required' => 1 }, + { 'name' => 'formFooter', + 'required' => 1 }, + { 'name' => 'name', + 'description'=> 'ems view badge name' }, + { 'name' => 'organization', + 'description'=> 'ems view badge organization' }, + { 'name' => 'address1', + 'description'=> 'ems view badge address1' }, + { 'name' => 'address2', + 'description'=> 'ems view badge address2' }, + { 'name' => 'address3', + 'description'=> 'ems view badge address3' }, + { 'name' => 'city', + 'description'=> 'ems view badge city' }, + { 'name' => 'state', + 'description'=> 'ems view badge state' }, + { 'name' => 'zipcode', + 'description'=> 'ems view badge zipcode' }, + { 'name' => 'country', + 'description'=> 'ems view badge country' }, + { 'name' => 'phoneNumber', + 'description'=> 'ems view badge phone' }, + { 'name' => 'email', + 'description'=> 'ems view badge email' }, + { 'name' => 'submitAddress', + 'description'=> 'ems view badge submitAddress' }, + { 'name' => 'title', + 'description'=> 'ems view badge title' }, + { 'name' => 'description', + 'description'=> 'ems view badge description' }, + ], + isa => [ + { namespace => "Asset_Template", + tag => "template variables" + }, + ], + fields => [], + related => [], + }, + 'ems print ticket template' => { source => 'sub www_printTicket', title => 'print ticket template', diff --git a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm index aeb4f9fb3..3821d7ac6 100644 --- a/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm +++ b/lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm @@ -104,6 +104,114 @@ our $I18N = { context => q|Edit EMS Badge Template form field hover help|, }, + 'ems view badge error' => { + message => q|Any errors from trying to add this badge to the user's cart.|, + lastUpdated => 0, + context => q|Edit EMS Badge Template form field help|, + }, + + 'addressBook' => { + message => q|A button to fetch an address from the user's address book.|, + lastUpdated => 0, + context => q|Edit EMS Badge Template form field help|, + }, + + 'formHeader' => { + message => q|Form header for the EMS View Badge template.|, + lastUpdated => 0, + context => q|Edit EMS Badge Template form field help|, + }, + + 'formFooter' => { + message => q|Form footer for the EMS View Badge template.|, + lastUpdated => 0, + context => q|Edit EMS Badge Template form field help|, + }, + + 'ems view badge name' => { + message => q|Form for the user's name in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge organization' => { + message => q|Form for the user's organization in the EMS View Badge template|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge address1' => { + message => q|Form for the first address field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge address2' => { + message => q|Form for the second address field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge address3' => { + message => q|Form for the third address field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge city' => { + message => q|Form for the city field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge state' => { + message => q|Form for the state field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge zipcode' => { + message => q|Form for the zipcode field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge country' => { + message => q|Form for the country field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge phone' => { + message => q|Form for the phone field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge email' => { + message => q|Form for the email field in the EMS View Badge template.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge submitAddress' => { + message => q|Button to submit the address data.|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge title' => { + message => q|The title of the EMS Badge|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + + 'ems view badge description' => { + message => q|The description of the EMS Badge|, + lastUpdated => 0, + context => q|View EMS Badge Template form field help|, + }, + 'buy badge' => { message => q|Buy A Badge|, lastUpdated => 0,