add email posting without subscription

This commit is contained in:
JT Smith 2006-05-17 20:04:33 +00:00
parent 612f08b37c
commit d089539ddd
7 changed files with 76 additions and 8 deletions

View file

@ -22,6 +22,16 @@ use WebGUI::Utility;
our @ISA = qw(WebGUI::Asset::Post);
#-------------------------------------------------------------------
sub addRevision {
my $self = shift;
my $newSelf = $self->SUPER::addRevision(@_);
if ($newSelf->get("subscriptionGroupId") eq "") {
$newSelf->createSubscriptionGroup;
}
return $newSelf;
}
#-------------------------------------------------------------------
sub archive {
my $self = shift;
@ -514,9 +524,6 @@ sub prepareView {
sub processPropertiesFromFormPost {
my $self = shift;
$self->SUPER::processPropertiesFromFormPost;
if ($self->get("subscriptionGroupId") eq "") {
$self->createSubscriptionGroup;
}
if ($self->session->form->process("assetId") eq "new") {
$self->getParent->incrementThreads($self->get("dateUpdated"),$self->getId) unless ($self->isReply);
}
@ -527,6 +534,7 @@ sub processPropertiesFromFormPost {
}
}
#-------------------------------------------------------------------
sub purge {
my $self = shift;

View file

@ -304,6 +304,14 @@ sub definition {
label => $i18n->get("visitor cache timeout"),
hoverHelp => $i18n->get("visitor cache timeout help")
},
autoSubscribeToThread => {
fieldType=>"yesNo",
defaultValue=>1
},
requireSubscriptionForEmailPosting => {
fieldType=>"yesNo",
defaultValue=>1
},
approvalWorkflow =>{
fieldType=>"workflow",
defaultValue=>"pbworkflow000000000003"
@ -542,7 +550,19 @@ sub getEditForm {
label=>$i18n->get("mail prefix"),
hoverHelp=>$i18n->get("mail prefix help"),
);
$tabform->getTab("display")->interval(
$tabform->getTab("mail")->yesNo(
name=>"autoSubscribeToThread",
value=>$self->getValue("autoSubscribeToThread"),
label=>$i18n->get("auto subscribe to thread"),
hoverHelp=>$i18n->get("auto subscribe to thread help"),
);
$tabform->getTab("mail")->yesNo(
name=>"requireSubscriptionForEmailPosting",
value=>$self->getValue("requireSubscriptionForEmailPosting"),
label=>$i18n->get("require subscription for email posting"),
hoverHelp=>$i18n->get("require subscription for email posting help"),
);
$tabform->getTab("display")->interval(
-name=>"visitorCacheTimeout",
-label=>$i18n->get('visitor cache timeout'),
-hoverHelp=>$i18n->get('visitor cache timeout help'),