Add membership form (TODO: child entry)

master
Skylar Ittner 6 years ago
parent 930ad222e1
commit 326daca881

Binary file not shown.

@ -0,0 +1,9 @@
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var_export($_POST);

@ -1,9 +1,31 @@
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
require_once __DIR__ . "/../lib/requiredpublic.php";
require_once __DIR__ . "/../lib/requiredpublic.php";
$page = "signup.php";
if (!empty($_GET['page'])) {
switch ($_GET['page']) {
case "pay":
$page = "pay.php";
}
}
?>
<!DOCTYPE html>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo SITE_TITLE; ?></title>
<link rel="icon" href="static/logo.svg">
<link href="static/bootstrap.min.css" rel="stylesheet">
<script src="static/jquery-3.3.1.min.js"></script>
<script src="static/fontawesome-all.min.js"></script>
<script src="static/bootstrap.bundle.min.js"></script>
<?php
include_once __DIR__ . "/parts/$page";
?>

@ -0,0 +1,10 @@
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
?>
<div class="container">
</div>

@ -0,0 +1,10 @@
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
?>
<div class="container">
</div>

@ -0,0 +1,251 @@
<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
?>
<div class="container mt-4">
<form class="card" action="actions/submitmembership.php" method="post">
<div class="card-body">
<div class="d-flex flex-wrap justify-content-around mb-4">
<img class="img-fluid" style="max-height: 100px; min-width: 100px;" src="static/hachelogo.svg" alt="HACHE: Helena Area Christian Home Educators"/>
<div class="ml-auto mr-auto pl-4 align-self-center text-center">
<h1>Membership Application</h1>
</div>
</div>
<div class="row">
<?php
$textboxes = [
[
"label" => "Family Name (Last Name)",
"icon" => "fas fa-users",
"name" => "familyname",
"maxlength" => 100
],
[
"label" => "Father's Name",
"icon" => "fas fa-male",
"name" => "fathername",
"maxlength" => 255
],
[
"label" => "Mother's Name",
"icon" => "fas fa-female",
"name" => "mothername",
"maxlength" => 255
],
[
"label" => "Street Address",
"icon" => "fas fa-home",
"name" => "streetaddress",
"maxlength" => 500
],
[
"label" => "City",
"icon" => "fas fa-city",
"name" => "city",
"maxlength" => 255,
"width" => 3
],
[
"label" => "State",
"icon" => "fas fa-flag",
"name" => "state",
"maxlength" => 2,
"value" => "MT",
"width" => 2
],
[
"label" => "ZIP/Postal Code",
"icon" => "fas fa-mail-bulk",
"name" => "zip",
"maxlength" => 20,
"width" => 3
],
[
"label" => "Phone Number",
"icon" => "fas fa-phone",
"name" => "phone",
"maxlength" => 20
],
[
"label" => "Email",
"icon" => "fas fa-at",
"name" => "email",
"maxlength" => 255,
"type" => "email",
],
[
"label" => "Newsletter Preference",
"icon" => "fas fa-newspaper",
"name" => "newsletter_method",
"type" => "select",
"options" => [
"1" => "Email ($25)",
"2" => "Snail Mail ($35)",
"3" => "Email and Snail Mail ($35)"
]
]
];
foreach ($textboxes as $item) {
?>
<div class="col-12 col-md-<?php echo (empty($item['width']) ? "4" : $item['width']); ?>">
<div class="form-group mb-3">
<label class="mb-0"><?php echo $item['label']; ?>:</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="<?php echo $item['icon']; ?>"></i></span>
</div>
<?php if (empty($item['type']) || $item['type'] != "select") { ?>
<input type="<?php echo (empty($item['type']) ? "text" : $item['type']); ?>"
name="<?php echo $item['name']; ?>"
class="form-control"
placeholder=""
aria-label="<?php echo $item['label']; ?>"
maxlength="<?php echo $item['maxlength']; ?>"
<?php
if (!empty($item['value'])) {
echo "value=\"$item[value]\" ";
}
?>required />
<?php } else if ($item['type'] == "select") { ?>
<select class="form-control"
name="<?php echo $item['name']; ?>"
aria-label="<?php echo $item['label']; ?>"
required>
<?php
foreach ($item['options'] as $value => $label) {
echo "<option value=\"$value\">$label</option>";
}
?>
</select>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
<div class="card-text">
<p>
These membership fees cover costs of the following:
phone; website; postage; distribution of newsletters and
directories; publication of materials; library; and other
HACHE related activities. Dues are reduced as of March 1st.
HACHE will not restrict membership based on inability to
pay. HACHE does not mandate curriculum choices or the
manner in which curriculum is administered. We do encourage
all members to follow and adhere to MT laws governing home
schooling.
<p class="mb-0">HACHE members occasionally take pictures of students during
home school functions and activities. These photos may be
used in HACHE displays, brochures, website, etc.
<p>I give permission for my photos to be included in such displays:
<span class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="photo_permission" id="photo_permission" value="1" required>
<label class="form-check-label" for="photo_permission">Yes</label>
</span>
<span class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="photo_permission" id="photo_permission" value="0" required>
<label class="form-check-label" for="photo_permission">No</label>
</span>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" name="agree_terms" id="agree_terms" required>
<label class="form-check-label" for="agree_terms">
I/We have read and understand this application and agree to abide by HACHEs policy of common courtesy and respect for one another.
</label>
</div>
</div>
<hr />
<div class="card-text">
<p>HACHE is an all-volunteer organization. Listed below are events
and activities that may occur throughout the year. If you are
interested in helping with one or more of these events please
select any and all events of interest so we can get you in touch
with the member in charge of said event. Please feel free to
contact Steering Committee members or the newsletter editor with
ideas for field trips and or other activities that may be
enjoyed by all. (Not all of these events are specifically
HACHE events, but rather events HACHE supported events our
members have participated in and enjoyed in past years.)
</div>
<?php
$events = $database->select('events', ['eventid (id)', 'event (name)']);
$eventcount = count($events);
$cola = [];
$colb = [];
for ($i = 0; $i < $eventcount; $i++) {
if ($i % 2 === 0) {
$cola[] = $events[$i];
} else {
$colb[] = $events[$i];
}
}
?>
<div class="row">
<div class="col-12 col-md-6">
<ul class="list-group">
<?php
foreach ($cola as $ev) {
?>
<li class="list-group-item">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="events_<?php echo $ev['id']; ?>" value="<?php echo $ev['id']; ?>" name="events[]">
<label class="form-check-label" for="events_<?php echo $ev['id']; ?>"><?php echo $ev['name']; ?></label>
</div>
</li>
<?php
}
?>
</ul>
</div>
<div class="col-12 col-md-6">
<ul class="list-group">
<?php
foreach ($colb as $ev) {
?>
<li class="list-group-item">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="events_<?php echo $ev['id']; ?>" value="<?php echo $ev['id']; ?>" name="events[]">
<label class="form-check-label" for="events_<?php echo $ev['id']; ?>"><?php echo $ev['name']; ?></label>
</div>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<div class="card-footer">
<button type="submit" class="btn btn-primary">Submit Application</button>
</div>
</form>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 65 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 38 KiB

@ -11,9 +11,9 @@ define("DEBUG", false);
// Database connection settings
// See http://medoo.in/api/new for info
define("DB_TYPE", "mysql");
define("DB_NAME", "app");
define("DB_NAME", "hachemembers");
define("DB_SERVER", "localhost");
define("DB_USER", "app");
define("DB_USER", "root");
define("DB_PASS", "");
define("DB_CHARSET", "utf8");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Loading…
Cancel
Save