Merge branch 'hendrik-testing' into 'master'
add name field check in settings See merge request !188
This commit was merged in pull request #192.
This commit is contained in:
@@ -18,7 +18,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
try {
|
||||
switch ($_POST["form"]) {
|
||||
case "profile":
|
||||
updateSettings();
|
||||
checkUpdateSettings();
|
||||
break;
|
||||
case "password":
|
||||
changePassword();
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
background-color: firebrick;
|
||||
}
|
||||
|
||||
.alerttext {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.user-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,15 @@ function getPasswordHash() {
|
||||
return $stmt->fetch();
|
||||
}
|
||||
|
||||
function checkUpdateSettings() {
|
||||
if (empty(test_input($_POST['fname'])) || empty(test_input($_POST['lname']))) {
|
||||
throw new AngryAlert("Geen voornaam of achternaam.");
|
||||
return;
|
||||
}
|
||||
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the setting from post.
|
||||
* @throws HappyAlert
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<tr>
|
||||
<th><input class="table-checkbox" type="checkbox" id="checkall" name="checkall" onchange="checkAll(this)"></th>
|
||||
<th class="table-username">Gebruikersnaam</th>
|
||||
<th class="table-username">Groepsnaam</th>
|
||||
<th class="table-status">Status</th>
|
||||
<th class="table-comment">Aantekening</th>
|
||||
<th class="table-comment">Beschrijving</th>
|
||||
<th class="table-action">Actie</th>
|
||||
</tr>
|
||||
|
||||
@@ -33,9 +33,9 @@ while ($group = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||
<form class='admin-groupaction'
|
||||
onsubmit=\"adminUpdate(this); return false;\">
|
||||
<select class='action' name='actions'>
|
||||
<option value='hidden'>Hidden</option>
|
||||
<option value='public'>Public</option>
|
||||
<option value='membersonly'>Members</option>
|
||||
<option value='hidden'>Verborgen</option>
|
||||
<option value='public'>Publiek</option>
|
||||
<option value='membersonly'>Alleen Leden</option>
|
||||
</select>
|
||||
<input type='hidden' name='groupID' value='$groupID'>
|
||||
<input type='submit' value='Confirm'>
|
||||
|
||||
@@ -55,7 +55,8 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||
OR $user['role'] == 'owner'))) {
|
||||
echo "<option value='frozen'>Bevries</option>
|
||||
<option value='banned'>Ban</option>
|
||||
<option value='user'>Activeer</option>";
|
||||
<option value='user'>Activeer</option>
|
||||
<option value='unconfirmed'>Ongevalideerd</option>";
|
||||
|
||||
if ($userinfo == 'owner') {
|
||||
echo "<option value='admin'>Admin</option>
|
||||
|
||||
@@ -67,13 +67,13 @@ if (isset($_GET["groupstatus"])) {
|
||||
id="frozen"
|
||||
value="frozen"
|
||||
<?php if (in_array("frozen", $status)) echo "checked";?>>
|
||||
<label for="frozen">Gefrozen</label><br>
|
||||
<label for="frozen">Bevroren</label><br>
|
||||
<input type="checkbox"
|
||||
name="status[]"
|
||||
id="banned"
|
||||
value="banned"
|
||||
<?php if (in_array("banned", $status)) echo "checked";?>>
|
||||
<label for="banned">Gebant</label><br>
|
||||
<label for="banned">Verbannen</label><br>
|
||||
<input type="checkbox"
|
||||
name="status[]"
|
||||
id="admin"
|
||||
@@ -91,7 +91,7 @@ if (isset($_GET["groupstatus"])) {
|
||||
id="owner"
|
||||
value="owner"
|
||||
<?php if (in_array("owner", $status)) echo "checked";?>>
|
||||
<label for="owner">Owner</label>
|
||||
<label for="owner">Eigenaar</label>
|
||||
</div>
|
||||
|
||||
<div id="admin-groupfilter">
|
||||
@@ -122,6 +122,7 @@ if (isset($_GET["groupstatus"])) {
|
||||
<button type="submit" name="batchactions" id="freeze" value="frozen">Bevries</button>
|
||||
<button type="submit" name="batchactions" id="ban" value="banned">Ban</button>
|
||||
<button type="submit" name="batchactions" id="restore" value="user">Activeer</button>
|
||||
<button type="submit" name="batchactions" id="unconfirm" value="unconfirmed">Maak Ongevalideerd</button>
|
||||
<?php
|
||||
if ($userinfo == 'owner') {
|
||||
echo "<button type=\"submit\"
|
||||
@@ -131,7 +132,7 @@ if (isset($_GET["groupstatus"])) {
|
||||
<button type=\"submit\"
|
||||
name=\"batchactions\"
|
||||
id=\"owner\"
|
||||
value=\"owner\">Maak Owner</button>";
|
||||
value=\"owner\">Maak Eigenaar</button>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
@@ -139,9 +140,9 @@ if (isset($_GET["groupstatus"])) {
|
||||
onsubmit="adminUpdate(this); return false;">
|
||||
|
||||
<input type="hidden" name="groupbatchactions" id="groupbatchinput">
|
||||
<button type="submit" name="batchactions" id="hide" value="hidden">Hide</button>
|
||||
<button type="submit" name="batchactions" id="ban" value="public">Public</button>
|
||||
<button type="submit" name="batchactions" id="members" value="membersonly">Members</button>
|
||||
<button type="submit" name="batchactions" id="hide" value="hidden">Verborgen</button>
|
||||
<button type="submit" name="batchactions" id="ban" value="public">Publiek</button>
|
||||
<button type="submit" name="batchactions" id="members" value="membersonly">Alleen Leden</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="content">
|
||||
<div class='platform alertbox' id="alertbox">
|
||||
<span id="alerttext"></span>
|
||||
<span class="alerttext" id="alerttext"></span>
|
||||
</div>
|
||||
|
||||
<div class="user-box">
|
||||
|
||||
Reference in New Issue
Block a user