<%args> $crr => undef $cert_identifier => undef

<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_TITLE') %>

<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_DESC') %>

% # ERRORS % if (defined $crr && scalar $crr->get_errors()) {

<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_ERRORS_TITLE') %>

% }

<& /service/open_form.mhtml, 'action' => $context->{menu}->get_root()."/service/create_crr/index.html" &> $crr, name => 'workflow_type' &>> $crr, name => 'revocation_reason' &>> $crr, name => 'invalidity_date' &>>
<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_WORKFLOW_TYPE') %> <& /lib/html/select.mhtml, 'name' => "workflow_type", 'default' => [ $workflow_type ], 'values' => [ @wf_types ] &>
<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_REVOCATION_REASON') %> <& /lib/html/select.mhtml, 'name' => "revocation_reason", 'default' => [ $revocation_reason ], 'values' => [ @revoc_reasons ] &>
<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_COMMENT') %> <& /lib/html/input.mhtml, 'type' => 'textarea', 'name' => "comment", 'value' => $comment, &>
<% i18nGettext('I18N_OPENXPKI_CLIENT_HTML_MASON_SERVICE_CREATE_CRR_INVALIDITY_DATE') %> <& /lib/html/select_date.mhtml, 'prefix' => 'invalidity_', 'now_default' => 1, &>
<& /service/send_form.mhtml &> <& /service/close_form.mhtml &>

<%init> ## define the available workflow types use OpenXPKI::Client::HTML::Mason::CRR; my @wf_types = OpenXPKI::Client::HTML::Mason::CRR->get_possible_wf_types(); my @revoc_reasons = OpenXPKI::Client::HTML::Mason::CRR->get_possible_revocation_reasons(); my $workflow_type; my $revocation_reason; my $comment; if (defined $crr) { # set the default values $workflow_type = $crr->get_workflow_type(); $revocation_reason = $crr->get_revocation_reason(); $comment = $crr->get_comment(); }