add further checkboxes to form and improve styling
parent
0eef39194f
commit
4cf860d077
|
@ -84,7 +84,9 @@ DefaultContentLanguage = "en"
|
||||||
formEmail = "Email (required)"
|
formEmail = "Email (required)"
|
||||||
formCountry = "Country"
|
formCountry = "Country"
|
||||||
formZip = "ZIP Code"
|
formZip = "ZIP Code"
|
||||||
formPermission1 = "I have read the privacy statement and would like to stay informed about the future of this campaign"
|
formPermissionPriv = "I have read and accepted the [privacy statement](#)"
|
||||||
|
formPermissionNews = "I want to stay informed about the future of PMPC"
|
||||||
|
formPermissionPub = "I want my signature to appear in the [list of signatures](/signatures)"
|
||||||
formSubmit = "Sign"
|
formSubmit = "Sign"
|
||||||
|
|
||||||
# Spread the word section
|
# Spread the word section
|
||||||
|
|
|
@ -20,10 +20,19 @@
|
||||||
<label class="sign-input form-zp">
|
<label class="sign-input form-zp">
|
||||||
<input name="zip" placeholder="{{ .Site.Params.sign.formZip }}" type="text" />
|
<input name="zip" placeholder="{{ .Site.Params.sign.formZip }}" type="text" />
|
||||||
</label>
|
</label>
|
||||||
<br />
|
<p class="form-pe">
|
||||||
<label class="form-pe">
|
<label class="form-pe">
|
||||||
<input name="permission" value="yes" type="checkbox" required /> {{ .Site.Params.sign.formPermission1 }}
|
<input name="permissionPriv" value="yes" type="checkbox" required /> {{ .Site.Params.sign.formPermissionPriv | markdownify }}
|
||||||
</label>
|
</label>
|
||||||
|
<br />
|
||||||
|
<label class="form-pe">
|
||||||
|
<input name="permissionNews" value="yes" type="checkbox" checked="checked" /> {{ .Site.Params.sign.formPermissionNews }}
|
||||||
|
</label>
|
||||||
|
<br />
|
||||||
|
<label class="form-pe">
|
||||||
|
<input name="permissionPub" value="yes" type="checkbox" checked="checked" /> {{ .Site.Params.sign.formPermissionPub | markdownify}}
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
|
||||||
<input id="honey" name="url" value="yes" type="submit" /> <!-- Honeypot for spam -->
|
<input id="honey" name="url" value="yes" type="submit" /> <!-- Honeypot for spam -->
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -16,10 +16,12 @@ if(empty($action)) {
|
||||||
$email = isset($_GET['email']) ? $_GET['email'] : false;
|
$email = isset($_GET['email']) ? $_GET['email'] : false;
|
||||||
$country = isset($_GET['country']) ? $_GET['country'] : false;
|
$country = isset($_GET['country']) ? $_GET['country'] : false;
|
||||||
$zip = isset($_GET['zip']) ? $_GET['zip'] : false;
|
$zip = isset($_GET['zip']) ? $_GET['zip'] : false;
|
||||||
$perm = isset($_GET['permission']) ? $_GET['permission'] : false;
|
$permPriv = isset($_GET['permissionPriv']) ? $_GET['permissionPriv'] : false;
|
||||||
|
$permNews = isset($_GET['permissionNews']) ? $_GET['permissionNews'] : false;
|
||||||
|
$permPub = isset($_GET['permissionPub']) ? $_GET['permissionPub'] : false;
|
||||||
|
|
||||||
// Check for missing required fields
|
// Check for missing required fields
|
||||||
if(empty($name) || empty($email) || empty($perm)) {
|
if(empty($name) || empty($email) || empty($permPriv)) {
|
||||||
echo "At least one required variable is empty.";
|
echo "At least one required variable is empty.";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +75,9 @@ if ($action === "sign") {
|
||||||
"email" => $email,
|
"email" => $email,
|
||||||
"country" => $country,
|
"country" => $country,
|
||||||
"zip" => $zip,
|
"zip" => $zip,
|
||||||
"perm" => $perm,
|
"permPriv" => $permPriv,
|
||||||
|
"permNews" => $permNews,
|
||||||
|
"permPub" => $permPub,
|
||||||
"code" => $code,
|
"code" => $code,
|
||||||
"confirmed" => "no");
|
"confirmed" => "no");
|
||||||
$data[] = $newsig; // newsig is a separated variable for debugging purposes
|
$data[] = $newsig; // newsig is a separated variable for debugging purposes
|
||||||
|
|
|
@ -68,8 +68,14 @@
|
||||||
content: "\f08d";
|
content: "\f08d";
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
}
|
}
|
||||||
.form-pe {
|
p.form-pe {
|
||||||
max-width: 600px;
|
text-align: left;
|
||||||
|
max-width: 530px; /* to not let the checkboxed go far more left than the input boxes above */
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
p.form-pe a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
input#honey {
|
input#honey {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Reference in New Issue