Run on registration and alert on new user have been converted to a single workflow.
This commit is contained in:
parent
5956fce2f1
commit
3e60294bb6
33 changed files with 315 additions and 50 deletions
|
|
@ -53,19 +53,23 @@ The identifier for this field. Defaults to "workflowId".
|
|||
|
||||
=head4 type
|
||||
|
||||
The type of workflows to list based upon the object type that will be passed to them "none", "versiontag", etc. If this is omitted, the entire list of workflows will be returned.
|
||||
The type of workflows to list based upon the object type that will be passed to them "none", "WebGUI::VersionTag", etc. If this is omitted, the entire list of workflows will be returned.
|
||||
|
||||
=head4 label
|
||||
|
||||
A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName().
|
||||
|
||||
=head4 none
|
||||
|
||||
If set to 1 then a "None" option will appear in the list of workflows, which will store a null value in the field. Defaults to 0.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $definition = shift || [];
|
||||
my $i18n = WebGUI::International->new($session, 'Workflow_Cron');
|
||||
my $i18n = WebGUI::International->new($session, 'Workflow');
|
||||
push(@{$definition}, {
|
||||
formName=>{
|
||||
defaultValue=>$i18n->get("topicName")
|
||||
|
|
@ -76,9 +80,12 @@ sub definition {
|
|||
name=>{
|
||||
defaultValue=>"workflowId"
|
||||
},
|
||||
namespace=>{
|
||||
type=>{
|
||||
defaultValue=>undef
|
||||
},
|
||||
none=>{
|
||||
defaulValue=>0
|
||||
}
|
||||
});
|
||||
return $class->SUPER::definition($session, $definition);
|
||||
}
|
||||
|
|
@ -94,6 +101,7 @@ Renders a template picker control.
|
|||
sub toHtml {
|
||||
my $self = shift;
|
||||
my $workflowList = WebGUI::Workflow->getList($self->session, $self->get("type"));
|
||||
$workflowList->{""} = "None";
|
||||
$self->set("options", $workflowList);
|
||||
$self->setManageIcons();
|
||||
return $self->SUPER::toHtml();
|
||||
|
|
@ -124,7 +132,7 @@ Adds code to the subtext field of the form so that buttons for managing or editi
|
|||
sub setManageIcons {
|
||||
my $self = shift;
|
||||
my $returnUrl = ";proceed=goBackToPage;returnUrl=".$self->session->url->escape($self->session->asset->getUrl) if $self->session->asset;
|
||||
my $buttons = $self->session->icon->edit("op=editWorkflow".$returnUrl);
|
||||
my $buttons = $self->session->icon->edit("op=editWorkflow;workflowId=".$self->get("workflowId").$returnUrl) if ($self->get("workflowId"));
|
||||
$buttons .= $self->session->icon->manage("op=manageWorkflows".$returnUrl);
|
||||
$self->set("subtext",$buttons . $self->get("subtext"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue