Skip to content

Fix applicant status display #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend-redesign/scss/modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,9 @@
margin-bottom: 1rem;
text-align: center;
opacity: .5;
&.auto-height {
min-height: auto;
}
&.on-hold {
border: 4px solid #fdad00;
background-color: #ffe4b1;
Expand Down
2 changes: 2 additions & 0 deletions themes/cc-commoners-2019/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6618,6 +6618,8 @@ a {
margin-bottom: 1rem;
text-align: center;
opacity: .5; }
.page-template-template-user-status .entry-status.auto-height {
min-height: auto; }
.page-template-template-user-status .entry-status.on-hold {
border: 4px solid #fdad00;
background-color: #ffe4b1;
Expand Down
20 changes: 16 additions & 4 deletions themes/cc-commoners-2019/template-user-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
$level = ccgn_current_user_level();
$logged_in = is_user_logged_in();
$user_id = get_current_user_id();
$user_status = ccgn_registration_user_get_stage_and_date($user_id);
$application_status = ccgn_show_current_application_status($user_id);
$step = array();
$step[1] = ($application_status['step']['step'] == 1) ? $application_status['step']['class'] : '';
$step[2] = ($application_status['step']['step'] == 2) ? $application_status['step']['class'] : '';
$step[3] = ($application_status['step']['step'] == 3) ? $application_status['step']['class'] : '';
$step[1] = ($application_status['step']['step'] == 1) ? $application_status['step']['class'] : 'hide-for-small-only';
$step[2] = ($application_status['step']['step'] == 2) ? $application_status['step']['class'] : 'hide-for-small-only';
$step[3] = ($application_status['step']['step'] == 3) ? $application_status['step']['class'] : 'hide-for-small-only';
?>
<section class="main-content space-top">
<div class="grid-container">
Expand All @@ -22,7 +23,17 @@
<?php the_content(); ?>
<div class="user-status-container">
<?php if ($logged_in): ?>

<?php if ($user_status['stage'] == 'accepted'): ?>
<div class="grid-x grid-padding-x">
<div class="cell">
<div class="entry-status success auto-height">
<span class="icon"><span class="dashicons dashicons-yes-alt"></span></span>
<span class="subtitle">Application Approved</span>
<h4 class="entry-title">You're now a member</h4>
</div>
</div>
</div>
<?php else: ?>
<div class="grid-x grid-padding-x large-up-3 medium-up-3 small-up-1">
<div class="cell">
<article class="entry-status <?php echo $step[1] ?>">
Expand Down Expand Up @@ -85,6 +96,7 @@
</article>
</div>
</div>
<?php endif; ?>
<?php else: ?>
<div class="callout warning">
<h5 class="title">Logged in</h5>
Expand Down