Finalize Implementing Decline tracking #15
@@ -19,6 +19,7 @@ $language = array(
|
|||||||
"DECLINE" => "Ablehnen",
|
"DECLINE" => "Ablehnen",
|
||||||
"DECLINE_REASON" => "Grund für die Ablehnung",
|
"DECLINE_REASON" => "Grund für die Ablehnung",
|
||||||
"SUBMIT" => "Abschicken",
|
"SUBMIT" => "Abschicken",
|
||||||
|
"MAKE_A_SELECTION" => "Treffe eine Auswahl",
|
||||||
"SUCCESS" => "Erfolgreich",
|
"SUCCESS" => "Erfolgreich",
|
||||||
"FIRST_NAME" => "Vorname",
|
"FIRST_NAME" => "Vorname",
|
||||||
"LAST_NAME" => "Nachname",
|
"LAST_NAME" => "Nachname",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ $language = array(
|
|||||||
"DECLINE" => "Decline",
|
"DECLINE" => "Decline",
|
||||||
"DECLINE_REASON" => "Reason for declining",
|
"DECLINE_REASON" => "Reason for declining",
|
||||||
"SUBMIT" => "Submit",
|
"SUBMIT" => "Submit",
|
||||||
|
"MAKE_A_SELECTION" => "Make a selection",
|
||||||
"SUCCESS" => "Success",
|
"SUCCESS" => "Success",
|
||||||
"FIRST_NAME" => "First name",
|
"FIRST_NAME" => "First name",
|
||||||
"LAST_NAME" => "Last name",
|
"LAST_NAME" => "Last name",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ try {
|
|||||||
$action = RegisterState::RegistrationAccepted;
|
$action = RegisterState::RegistrationAccepted;
|
||||||
} elseif ($param_action == "deny") {
|
} elseif ($param_action == "deny") {
|
||||||
$action = RegisterState::RegistrationDeclined;
|
$action = RegisterState::RegistrationDeclined;
|
||||||
$decline_reason = filter_input(INPUT_GET, "reason", FILTER_SANITIZE_STRING);
|
$decline_reason = filter_input(INPUT_GET, "decline_reason", FILTER_SANITIZE_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $mx_db->getUserForApproval($token);
|
$user = $mx_db->getUserForApproval($token);
|
||||||
@@ -163,7 +163,7 @@ try {
|
|||||||
<h3 class="panel-title"><?php echo $language["ADMIN_VERIFY_SITE_TITLE"]; ?></h3>
|
<h3 class="panel-title"><?php echo $language["ADMIN_VERIFY_SITE_TITLE"]; ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form name="appForm" role="form" action="verify_admin.php" method="GET">
|
<form name="appForm" role="form" onsubmit="return submitForm()" action="verify_admin.php" method="GET">
|
||||||
<?php
|
<?php
|
||||||
if (isset($config["operationMode"]) && $config["operationMode"] === "local") {
|
if (isset($config["operationMode"]) && $config["operationMode"] === "local") {
|
||||||
// this values will not be used when using the register operation type
|
// this values will not be used when using the register operation type
|
||||||
@@ -192,15 +192,15 @@ try {
|
|||||||
value="<?php echo $username; ?>" disabled=true>
|
value="<?php echo $username; ?>" disabled=true>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="text" id="decline_reason" class="form-control input-sm"
|
<input type="hidden" name="decline_reason" class="form-control input-sm"
|
||||||
placeholder="<?php echo $language["DECLINE_REASON"]; ?>">
|
placeholder="<?php echo $language["DECLINE_REASON"]; ?>">
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="t" id="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="t" id="token" value="<?php echo $token; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="radio" name="d" onchange="changeSelection(true)" value="allow"><?php echo $language["ACCEPT"]; ?>
|
<input type="radio" name="d" value="allow"><?php echo $language["ACCEPT"]; ?>
|
||||||
<input type="radio" name="d" onchange="changeSelection(false)" value="deny"><?php echo $language["DECLINE"]; ?>
|
<input type="radio" name="d" value="deny"><?php echo $language["DECLINE"]; ?>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" value="SEND<?php echo $language["ACCEPT"]; ?>" class="btn btn-info btn-block">
|
<input type="submit" value="<?php echo $language["SUBMIT"]; ?>" class="btn btn-info btn-block">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -209,6 +209,19 @@ try {
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var rad = document.appForm.d;
|
var rad = document.appForm.d;
|
||||||
|
function isSelected() {
|
||||||
|
for (var i=0; i<rad.length; i++)
|
||||||
|
if (rad[i].checked)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function submitForm() {
|
||||||
|
if (isSelected()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
alert("<?php echo $language["MAKE_A_SELECTION"];?>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
for(var i = 0; i < rad.length; i++) {
|
for(var i = 0; i < rad.length; i++) {
|
||||||
rad[i].onclick = function() {
|
rad[i].onclick = function() {
|
||||||
if (this.value === "deny") {
|
if (this.value === "deny") {
|
||||||
@@ -216,7 +229,7 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
document.appForm.decline_reason.type = "hidden";
|
document.appForm.decline_reason.type = "hidden";
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user