diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index 21bff9791..07ca2c26d 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -54,6 +54,9 @@ msgstr "not set" msgid "pagination.format" msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" +msgid "enrollment.steps" +msgstr "Enrollment Steps" + msgid "ExternalIdentities.source" msgstr "This External Identity was created from {0}." @@ -105,6 +108,9 @@ msgstr "Additional History Records may be available via Petitions and Provisioni msgid "pagination.format" msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" +msgid "petition.information" +msgstr "Petition Information" + msgid "plugin.active" msgstr "Active" diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po index aeb7168d5..66c13048a 100644 --- a/app/resources/locales/en_US/operation.po +++ b/app/resources/locales/en_US/operation.po @@ -282,6 +282,9 @@ msgstr "View {0}" msgid "view.PersonRoles.a" msgstr "View Role {0}" +msgid "view.Petitions.a" +msgstr "View Petition {0}" + msgid "view.ExternalIdentityRoles.a" msgstr "View Role {0}" diff --git a/app/src/Lib/Util/StringUtilities.php b/app/src/Lib/Util/StringUtilities.php index d1d5e644c..d25ba6336 100644 --- a/app/src/Lib/Util/StringUtilities.php +++ b/app/src/Lib/Util/StringUtilities.php @@ -201,7 +201,10 @@ public static function entityAndActionToTitle($entity, $field = $linkTable->getDisplayField(); if(!empty($entity->$field)) { - $title = __d($domain, $msgId, $entity->$field); + $title = __d($domain, $msgIdOverride, $entity->$field); + if($msgIdOverride === $title) { + $title = __d($domain, $msgId, $entity->$field); + } } else { $title = __d($domain, $msgId, __d('controller', $modelsName, [1])); } diff --git a/app/templates/Petitions/fields.inc b/app/templates/Petitions/fields.inc index dba8a6aa7..0012d707c 100644 --- a/app/templates/Petitions/fields.inc +++ b/app/templates/Petitions/fields.inc @@ -28,6 +28,7 @@ declare(strict_types = 1); use \Cake\Utility\Hash; +use Cake\Utility\Inflector; // Petitions are read-only, though they can link to other actions if ($vv_action !== 'view') { @@ -35,12 +36,22 @@ if ($vv_action !== 'view') { } // Start with the petition metadata -print $this->element('form/listItem', [ - 'arguments' => [ - 'fieldName' => 'status', - ] -]); +$statusTitle = __d('enumeration','PetitionStatusEnum.' . $vv_obj->status); +$statusCssClass = 'petition-status-title petition-status-title-' . Inflector::dasherize($statusTitle); +?> +
  • +

    + +

    +
  • +
  • +

    + +

    +
  • + +enrollee_person?->id)) { $enrolleeStatus = $vv_obj->enrollee_person->primary_name->full_name ?? __d('field', 'Petitions.enrollee.new'); @@ -80,30 +91,48 @@ if (!empty($vv_obj?->petitioner_person?->id)) { ]); } +// XXX Keep status available (even though it's presented above) +print $this->element('form/listItem', [ + 'arguments' => [ + 'fieldName' => 'status', + ] +]); ?> +
  • +

    + +

    +
  • + + -
      - enrollment_flow->enrollment_flow_steps as $step): ?> - petition_step_results, "{n}[enrollment_flow_step_id=$step->id]"); +enrollment_flow->enrollment_flow_steps as $step): ?> + petition_step_results, "{n}[enrollment_flow_step_id=$step->id]"); - if(!empty($result)) { - $resultLink = [ - 'controller' => 'petitions', - 'action' => 'result', - $vv_obj->id, - '?' => [ - 'enrollment_flow_step_id' => $step->id - ] - ]; - } - ?> + if(!empty($result)) { + $resultLink = [ + 'controller' => 'petitions', + 'action' => 'result', + $vv_obj->id, + '?' => [ + 'enrollment_flow_step_id' => $step->id + ] + ]; + } + ?> -
    1. description ?>
    2. - - - -
    +
  • +
    +
    +
    + description ?> +
    +
    +
    + Html->link($result[0]->comment, $resultLink) : "" ?> +
    +
    +
  • + diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 3521f9c2d..af8e34f9b 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -1369,6 +1369,15 @@ ul.form-list li { padding: 0; list-style: none; } +ul.fields li.form-list-header { + overflow-x: unset; +} +ul.fields li.form-list-header h2 { + color: var(--cmg-color-txt-inverse); + background-color: var(--cmg-color-btn-bg-001); + font-size: 1.4em; + padding: 1rem; +} ul.form-list li:focus-within { background-color: var(--cmg-color-bg-001); } @@ -1884,6 +1893,21 @@ body.attributecollectors .submit { padding-right: 1em; white-space: nowrap; } +ul.form-list li.petition-status-title { + margin-bottom: 1rem; + border: none; +} +ul.form-list li.petition-status-title h2 { + /* default colors for most status titles */ + background-color: var(--cmg-color-highlight-009); + color: var(--cmg-color-highlight-010); + border: 1px solid var(--cmg-color-highlight-011); +} +ul.form-list li.petition-status-title-finalized h2 { + background-color: var(--cmg-color-highlight-006); + color: var(--cmg-color-highlight-007); + border: 1px solid var(--cmg-color-highlight-008); +} /* GENERAL */ .hidden, .invisible,