Skip to content

Commit

Permalink
Improve accept/decline layout in InvitationAccepters plugin (CFM-428) (
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen authored Dec 19, 2024
1 parent d27c81a commit 7933b3d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function processReply(int $petitionId, int $enrollmentFlowStepId, bool $a
$expires = $acceptance->created->addSeconds($ia->invitation_validity);

if($expires->isPast()) {
throw new \RuntimeException('error.PetitionAcceptances.expired');
throw new \RuntimeException(__d('core_enroller','error.PetitionAcceptances.expired'));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ declare(strict_types = 1);

// This view is intended to work with dispatch
if($vv_action == 'dispatch') {
print $vv_config->welcome_message . "\n";
if(!empty($vv_config->welcome_message)) {
print '<li class="dispatch-welcome">' . $vv_config->welcome_message . "</li>\n";
}

// Make the Form fields editable
$this->Field->enableFormEditMode();
Expand All @@ -45,7 +47,8 @@ if($vv_action == 'dispatch') {
['value' => '0', 'text' => 'Decline'],
],
'empty' => false,
'required' => true
'required' => true,
'class' => 'crazything'
]
]]);
}
39 changes: 39 additions & 0 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,16 @@ ul.form-list li.info-title {
.form-control {
font-size: 1em; /* bootstrap override */
}
.field .radio {
display: flex;
gap: 1em;
}
.field .radio input {
margin-right: 0.25em;
}
.field .radio.required {
color: var(--cmg-color-body-txt);
}
/* DATE and TIME PICKERS */
.cm-datetime-picker {
display: flex;
Expand Down Expand Up @@ -1919,6 +1929,35 @@ body.start .submit {
#dispatch-list-container textarea {
padding: 0.5rem;
}
#dispatch-list-container li.dispatch-welcome {
margin: 1em 1em 2em;
font-size: 1.1em;
}
#dispatch-list-container ul.fields li.fields-accepted .field {
background-color: var(--cmg-color-bg-001);
border: 1px solid var(--cmg-color-bg-006);
padding: 1em 1.5em 1.5em;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
#dispatch-list-container ul.fields li.fields-accepted .field-info label {
display: flex;
align-items: center;
padding: 0.5em 1.5em 0.5em 1.25em;
background-color: var(--cmg-color-highlight-006);
border: 1px solid var(--cmg-color-highlight-008);
border-radius: 3px;
box-shadow: 0 1px 1px 0 rgba(0,0,0,.14),0 3px 1px -3px rgba(0,0,0,.2),0 1px 3px 0 rgba(0,0,0,.12);
}
#dispatch-list-container ul.fields li.fields-accepted .field-info label:last-child {
background-color: var(--cmg-color-bg-005);
border: 1px solid var(--cmg-color-bg-006);
}
#dispatch-list-container ul.fields li.fields-accepted .field .radio {
gap: 0.5em;
}
/* DIALOG BOX */
#dialog .modal-header {
background-color: var(--cmg-color-bg-004);
Expand Down
8 changes: 8 additions & 0 deletions app/webroot/css/co-responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
.duet-date__dialog {
left: -20em;
}
/* DISPATCH */
#dispatch-list-container ul.fields li.fields-accepted .field {
justify-content: space-between;
padding: 1em 1em 1em 1.25em;
}
#dispatch-list-container ul.fields li.fields-accepted .field-info {
padding: 0;
}
/* DENSITY SETTINGS (from User Settings Menu; Medium is default) */
/* Density "small" */
html.density-small h1 {
Expand Down

0 comments on commit 7933b3d

Please sign in to comment.