%args>
$type => undef
%args>
<& /service/open_form.mhtml &>
<% i18nGettext ('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_TITLE') %>
<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_WORKFLOW_CREATE_INSTANCE_DESCRIPTION') %>
% my $msg = $context->{client}->send_receive_command_msg ("list_workflow_titles");
% ## I expect the following:
% ## SERVICE_MSG => "COMMAND",
% ## COMMAND => $cmd,
% ## PARAMS => {$name => {description => $desc}, ... }
%
<& /service/send_form.mhtml &>
<& /service/close_form.mhtml &>
%
% foreach my $type (keys %{$msg->{PARAMS}})
% {
-
<% i18nGettext($type) %>
- <% i18nGettext($msg->{PARAMS}->{$type}->{description}) %>
% }
<%init>
if (defined $type)
{
my $msg = $context->{client}->send_receive_command_msg
(
"create_workflow_instance",
{"WORKFLOW" => $type}
);
if (exists $msg->{SERVICE_MSG} and
$msg->{SERVICE_MSG} eq "ERROR")
{
my $errors = [ $m->comp ('/lib/get_deep_error.mhtml', 'msg' => $msg) ];
return $m->comp ('/service/create_csr/print_errors.mhtml', 'errors' => $errors);
} else {
return $m->comp ('/service/workflow/list_instances.html', 'type' => $type)
}
}
%init>