This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
single-intake.php
67 lines (55 loc) · 2.44 KB
/
single-intake.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php get_header();
$course = get_field("parent_course");
if(have_posts()): while(have_posts()): the_post();
?>
<section class="hero hero--with-breadcrumbs" id="main-content">
<div class="container">
<div class="hero__content">
<ul class="breadcrumbs">
<li class="breadcrumbs__crumb"><a href="/">Home</a></li>
<li class="breadcrumbs__crumb"><a href="<?php the_permalink($course); ?>"><?php echo get_the_title($course); ?></a></li>
<li class="breadcrumbs__crumb">Apply</li>
</ul>
<h1 class="hero__title">Apply</h1>
</div>
</div>
</section>
<article class="page-content">
<div class="container with-sidebar">
<main class="panel panel--more-padding" data-course-form>
<!-- React app mounts here -->
<img class="spinner" src="<?php echo get_stylesheet_directory_uri() . "/assets/spinner.svg" ?>" alt="" />
<p class="visually-hidden">Loading...</p>
</main>
<aside class="layout-sidebar-right__sidebar">
<div class="panel">
<h2 class="panel__title">Your chosen course</h2>
<a class="panel__name" href="<?php the_permalink($course); ?>"><?php echo get_the_title($course); ?></a>
<p><?php the_field("intake_code"); ?></p>
<p>
<?php the_field("start_date") ?>
<?php if(get_field("end_date")): ?>
— <?php the_field("end_date") ?>
<?php endif; ?>
</p>
<p><?php the_field("days") ?></p>
<p>
<?php the_field("start_time") ?>
<?php if(get_field("end_time")): ?>
to <?php the_field("end_time") ?>
<?php endif; ?>
</p>
<?php if(get_field("delivery", $course) === "online"): ?>
<p class="panel__important">This course is delivered online using <strong><?php the_field("online_tool", $course); ?></strong>.</p>
<?php else: ?>
<p class="panel__important">This course is at <?php echo get_field('venue')["location"]["address"]; ?>.</p>
<?php endif; ?>
</div>
</aside>
</div>
</article>
<script>
__INTAKE_ID__=<?php echo get_the_ID() ?>
</script>
<?php endwhile; endif;
get_footer(); ?>