Make the Redeem Subscription code template user selectable in the Subscription Asset.
Add Help, i18n for that template.
This commit is contained in:
parent
81c9d117e5
commit
47eb1998dd
5 changed files with 68 additions and 17 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
- fixed #9368: Gallery: All children included into navigation
|
- fixed #9368: Gallery: All children included into navigation
|
||||||
- fixed #9349: CS archival broken after update (Bernd Kalbfuß-Zimmermann)
|
- fixed #9349: CS archival broken after update (Bernd Kalbfuß-Zimmermann)
|
||||||
- fixed Display of Interval form control in Thingy and User profiling did not show units, only seconds.
|
- fixed Display of Interval form control in Thingy and User profiling did not show units, only seconds.
|
||||||
|
- fixed #9374: Subscription Asset: Redeem subscription template not documented, or user selectable
|
||||||
|
|
||||||
7.6.7
|
7.6.7
|
||||||
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
setDefaultItransactCredentialTemplate($session);
|
setDefaultItransactCredentialTemplate($session);
|
||||||
hideGalleryPhotos($session);
|
hideGalleryPhotos($session);
|
||||||
|
addSubscriptionRedeemTemplateSetting($session);
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -58,6 +59,18 @@ sub setDefaultItransactCredentialTemplate {
|
||||||
print "DONE!\n" unless $quiet;
|
print "DONE!\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Describe what our function does
|
||||||
|
sub addSubscriptionRedeemTemplateSetting {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdd a field to the Subscription Asset so the user can select which Redeem Subscription code template to use... " unless $quiet;
|
||||||
|
# and here's our code
|
||||||
|
$session->db->write(<<EOSQL);
|
||||||
|
alter table Subscription add column redeemSubscriptionCodeTemplateId char(22) NOT NULL default ''
|
||||||
|
EOSQL
|
||||||
|
print "DONE!\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Describe what our function does
|
# Describe what our function does
|
||||||
sub hideGalleryPhotos {
|
sub hideGalleryPhotos {
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,14 @@ sub definition {
|
||||||
label => $i18n->get("template"),
|
label => $i18n->get("template"),
|
||||||
hoverHelp => $i18n->get("template help"),
|
hoverHelp => $i18n->get("template help"),
|
||||||
},
|
},
|
||||||
|
redeemSubscriptionCodeTemplateId => {
|
||||||
|
tab => "display",
|
||||||
|
fieldType => "template",
|
||||||
|
namespace => "Operation/RedeemSubscription",
|
||||||
|
defaultValue => 'PBtmpl0000000000000053',
|
||||||
|
label => $i18n->get("redeem subscription code template"),
|
||||||
|
hoverHelp => $i18n->get("redeem subscription code template help"),
|
||||||
|
},
|
||||||
thankYouMessage => {
|
thankYouMessage => {
|
||||||
tab => "properties",
|
tab => "properties",
|
||||||
defaultValue => $i18n->get("default thank you message"),
|
defaultValue => $i18n->get("default thank you message"),
|
||||||
|
|
@ -980,7 +988,7 @@ sub www_redeemSubscriptionCode {
|
||||||
$f->submit;
|
$f->submit;
|
||||||
$var->{ codeForm } = $f->print;
|
$var->{ codeForm } = $f->print;
|
||||||
|
|
||||||
return $self->processStyle($self->processTemplate($var, 'PBtmpl0000000000000053'));
|
return $self->processStyle($self->processTemplate($var, $self->get('redeemSubscriptionCodeTemplateId')));
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ use strict;
|
||||||
|
|
||||||
|
|
||||||
our $HELP = {
|
our $HELP = {
|
||||||
'template' => {
|
|
||||||
|
|
||||||
|
'template' => {
|
||||||
title => 'subscription template',
|
title => 'subscription template',
|
||||||
body => '',
|
body => '',
|
||||||
isa => [
|
isa => [
|
||||||
|
|
@ -32,6 +32,20 @@ our $HELP = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'redeem subscription template' => {
|
||||||
|
title => 'help redeem code template title',
|
||||||
|
body => '',
|
||||||
|
isa => [ ],
|
||||||
|
fields => [ ],
|
||||||
|
variables => [
|
||||||
|
{ name => 'batchDescription' , required=>1},
|
||||||
|
{ name => 'message' , required=>1 },
|
||||||
|
{ name => 'codeForm' , required=>1 },
|
||||||
|
],
|
||||||
|
related => [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -358,20 +358,23 @@ characters long.</p>|,
|
||||||
context => q|Shows up in the selection part of listSubscriptionCodes.|
|
context => q|Shows up in the selection part of listSubscriptionCodes.|
|
||||||
},
|
},
|
||||||
|
|
||||||
'help redeem code template body' => {
|
'batchDescription' => {
|
||||||
message => q|The following template variables are available through this template:<br />
|
message => q|The description of the batch tied to the subscription code.|,
|
||||||
<br />
|
context => q|Template variable in the redeem subscription code template|,
|
||||||
<b>batchDescription</b><br />
|
lastUpdated => 0,
|
||||||
The description of the batch tied to the subscription code.<br />
|
},
|
||||||
<br />
|
|
||||||
<b>message</b><br />
|
'message' => {
|
||||||
The message that gives the result of your action. Depending on what you've done it says that you can enter a code, you've entered the wrong code, or you've successfully redeemed your code.<br />
|
message => q|The message that gives the result of your action. Depending on what you've done it says that you can enter a code, you've entered the wrong code, or you've successfully redeemed your code.|,
|
||||||
<br />
|
context => q|Template variable in the redeem subscription code template|,
|
||||||
<b>codeForm</b><br />
|
lastUpdated => 0,
|
||||||
The form in which the user can enter his subscription code.<br />|,
|
},
|
||||||
lastUpdated => 1215618652,
|
|
||||||
context => q|The body of the help page of the code redemption template.|
|
'codeForm' => {
|
||||||
},
|
message => q|The form in which the user can enter his subscription code.|,
|
||||||
|
context => q|Template variable in the redeem subscription code template|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
},
|
||||||
|
|
||||||
'help redeem code template title' => {
|
'help redeem code template title' => {
|
||||||
message => q|Redeem subscription code template|,
|
message => q|Redeem subscription code template|,
|
||||||
|
|
@ -431,6 +434,18 @@ The form in which the user can enter his subscription code.<br />|,
|
||||||
context => q|Asset property hover help|,
|
context => q|Asset property hover help|,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'redeem subscription code template' => {
|
||||||
|
message => q|Redeem Subscription template|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Asset property|,
|
||||||
|
},
|
||||||
|
|
||||||
|
'redeem subscription code template help' => {
|
||||||
|
message => q|Choose the template that is used to display the screen where users redeem subscription codes.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|Asset property hover help|,
|
||||||
|
},
|
||||||
|
|
||||||
'batch name' => {
|
'batch name' => {
|
||||||
message => q|Batch Name|,
|
message => q|Batch Name|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
@ -508,7 +523,7 @@ The form in which the user can enter his subscription code.<br />|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => q|Label for swith to set subscription to be recurring or not.|
|
context => q|Label for swith to set subscription to be recurring or not.|
|
||||||
},
|
},
|
||||||
|
|
||||||
'recurring subscription description' => {
|
'recurring subscription description' => {
|
||||||
message => q|If set to yes, the customer will be charged after each term for a new one and the subscription
|
message => q|If set to yes, the customer will be charged after each term for a new one and the subscription
|
||||||
will be renewed for an extra term. If set to no, the customer will be charged for the first term only, and after one
|
will be renewed for an extra term. If set to no, the customer will be charged for the first term only, and after one
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue