Skip to content

Commit ba13211

Browse files
authored
Merge pull request creativecommons#410 from creativecommons/fix-user-status
Fix applicant status display
2 parents 1edefa1 + 2e7f2f0 commit ba13211

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

frontend-redesign/scss/modules.scss

+3
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@
661661
margin-bottom: 1rem;
662662
text-align: center;
663663
opacity: .5;
664+
&.auto-height {
665+
min-height: auto;
666+
}
664667
&.on-hold {
665668
border: 4px solid #fdad00;
666669
background-color: #ffe4b1;

themes/cc-commoners-2019/assets/css/style.css

+2
Original file line numberDiff line numberDiff line change
@@ -6618,6 +6618,8 @@ a {
66186618
margin-bottom: 1rem;
66196619
text-align: center;
66206620
opacity: .5; }
6621+
.page-template-template-user-status .entry-status.auto-height {
6622+
min-height: auto; }
66216623
.page-template-template-user-status .entry-status.on-hold {
66226624
border: 4px solid #fdad00;
66236625
background-color: #ffe4b1;

themes/cc-commoners-2019/template-user-status.php

+16-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
$level = ccgn_current_user_level();
66
$logged_in = is_user_logged_in();
77
$user_id = get_current_user_id();
8+
$user_status = ccgn_registration_user_get_stage_and_date($user_id);
89
$application_status = ccgn_show_current_application_status($user_id);
910
$step = array();
10-
$step[1] = ($application_status['step']['step'] == 1) ? $application_status['step']['class'] : '';
11-
$step[2] = ($application_status['step']['step'] == 2) ? $application_status['step']['class'] : '';
12-
$step[3] = ($application_status['step']['step'] == 3) ? $application_status['step']['class'] : '';
11+
$step[1] = ($application_status['step']['step'] == 1) ? $application_status['step']['class'] : 'hide-for-small-only';
12+
$step[2] = ($application_status['step']['step'] == 2) ? $application_status['step']['class'] : 'hide-for-small-only';
13+
$step[3] = ($application_status['step']['step'] == 3) ? $application_status['step']['class'] : 'hide-for-small-only';
1314
?>
1415
<section class="main-content space-top">
1516
<div class="grid-container">
@@ -22,7 +23,17 @@
2223
<?php the_content(); ?>
2324
<div class="user-status-container">
2425
<?php if ($logged_in): ?>
25-
26+
<?php if ($user_status['stage'] == 'accepted'): ?>
27+
<div class="grid-x grid-padding-x">
28+
<div class="cell">
29+
<div class="entry-status success auto-height">
30+
<span class="icon"><span class="dashicons dashicons-yes-alt"></span></span>
31+
<span class="subtitle">Application Approved</span>
32+
<h4 class="entry-title">You're now a member</h4>
33+
</div>
34+
</div>
35+
</div>
36+
<?php else: ?>
2637
<div class="grid-x grid-padding-x large-up-3 medium-up-3 small-up-1">
2738
<div class="cell">
2839
<article class="entry-status <?php echo $step[1] ?>">
@@ -85,6 +96,7 @@
8596
</article>
8697
</div>
8798
</div>
99+
<?php endif; ?>
88100
<?php else: ?>
89101
<div class="callout warning">
90102
<h5 class="title">Logged in</h5>

0 commit comments

Comments
 (0)