Compare commits

...
Author SHA1 Message Date
bence 1a4d928143 Merged in bugfix/MAPG-149-fix-cover (pull request #120)
MAPG-149 fix z-indexes
2020-06-18 14:38:03 +00:00
bence b35668c2fb MAPG-149 fix z-indexes 2020-06-18 16:37:32 +02:00
bence 5814620b4f Merged in bugfix/MAPG-149-fix-new-client-side-bugs (pull request #119)
Bugfix/MAPG-149 fix new client side bugs
2020-06-18 14:28:44 +00:00
bence 64b6197bd4 MAPG-149 omit focusing/selecting input elements after processing 2020-06-18 16:28:01 +02:00
bence 1be51b3e07 MAPG-149 make current password the first input element 2020-06-18 16:23:30 +02:00
bence 43775c8f4f Merged in bugfix/MAPG-148-fix-xmlhttp-responsetype-error (pull request #118)
MAPG-148 set xhr responseType after xhr open() because it is accepted by all browsers
2020-06-18 14:21:30 +00:00
bence 95eb956403 Merged in bugfix/MAPG-152-save-user-to-session-after-modi (pull request #117)
MAPG-152 save modified user to session
2020-06-18 14:21:23 +00:00
bence ce96e15911 MAPG-148 set xhr responseType after xhr open() because it is accepted by all browsers 2020-06-18 16:20:45 +02:00
bence 3726573f4c MAPG-152 save modified user to session 2020-06-18 16:18:41 +02:00
bence a8913b0d44 Merged in bugfix/MAPG-151-check-email-address-validity-on (pull request #116)
Bugfix/MAPG-151 check email address validity on
2020-06-18 14:16:32 +00:00
bence e014bf9dc1 MAPG-151 add some client side input checks 2020-06-18 16:15:03 +02:00
bence 50c7e3972c MAPG-151 check email address validity on server side 2020-06-18 16:12:40 +02:00
bence efccb2dcc5 Merged in feature/MAPG-145-css-selection (pull request #115)
MAPG-145 add CSS ::selection attribute
2020-06-14 20:11:37 +00:00
bence a38268c751 MAPG-145 add CSS ::selection attribute 2020-06-14 22:08:01 +02:00
10 changed files with 29 additions and 21 deletions

No files matched your search

+8 -3
View File
@@ -17,6 +17,11 @@ button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
}
::selection {
background-color: #28a745;
color: #ffffff;
}
p, h1, h2, input, textarea, select, button, a {
font-family: 'Roboto', sans-serif;
}
@@ -246,7 +251,7 @@ div.modal {
border-radius: 3px;
padding: 20px;
box-sizing: border-box;
z-index: 3;
z-index: 6;
visibility: hidden;
}
@@ -258,7 +263,7 @@ div.modal {
right: 0;
background-color: #000000;
opacity: 0.5;
z-index: 2;
z-index: 5;
visibility: hidden;
}
@@ -324,7 +329,7 @@ div.buttonContainer>button {
left: 50%;
margin-top: -32px;
margin-left: -32px;
z-index: 5;
z-index: 7;
visibility: hidden;
}
-2
View File
@@ -29,8 +29,6 @@
loginFormError.style.display = 'block';
loginFormError.innerHTML = errorText;
form.elements.email.select();
return;
}
+2 -1
View File
@@ -2,11 +2,12 @@ var MapGuesser = {
httpRequest: function (method, url, callback, data) {
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.onload = callback;
xhr.open(method, url, true);
xhr.responseType = 'json';
if (method === 'POST') {
if (typeof data === 'undefined') {
data = new FormData();
-3
View File
@@ -37,15 +37,12 @@
profileFormError.style.display = 'block';
profileFormError.innerHTML = errorText;
form.elements.password_new.select();
return;
}
document.getElementById('profileFormError').style.display = 'none';
form.reset();
form.elements.save.disabled = true;
form.elements.password_new.focus();
}, formData);
};
})();
+3 -3
View File
@@ -14,6 +14,9 @@
if (this.response.error) {
var errorText;
switch (this.response.error) {
case 'email_not_valid':
errorText = 'The given email address is not valid.'
break;
case 'passwords_too_short':
errorText = 'The given password is too short. Please choose a password that is at least 6 characters long!'
break;
@@ -32,14 +35,11 @@
signupFormError.style.display = 'block';
signupFormError.innerHTML = errorText;
form.elements.email.select();
return;
}
document.getElementById('signupFormError').style.display = 'none';
form.reset();
form.elements.email.focus();
MapGuesser.showModalWithContent('Sign up successful', 'Sign up was successful. Please check your email and click on the activation link to activate your account!');
}, formData);
+5
View File
@@ -43,6 +43,11 @@ class SignupController
return new JsonContent($data);
}
if (filter_var($this->request->post('email'), FILTER_VALIDATE_EMAIL) === false) {
$data = ['error' => 'email_not_valid'];
return new JsonContent($data);
}
$select = new Select(\Container::$dbConnection, 'users');
$select->columns(User::getFields());
$select->where('email', '=', $this->request->post('email'));
+2
View File
@@ -58,6 +58,8 @@ class UserController implements ISecured
$modify->fill($user->toArray());
$modify->save();
$this->request->session()->set('user', $user);
$data = ['success' => true];
return new JsonContent($data);
}
+2 -2
View File
@@ -9,8 +9,8 @@ $jsFiles = [
<h2>Login</h2>
<div class="box">
<form id="loginForm" action="/login" method="post">
<input class="big fullWidth" type="email" name="email" placeholder="Email address" autofocus>
<input class="big fullWidth marginTop" type="password" name="password" placeholder="Password">
<input class="big fullWidth" type="email" name="email" placeholder="Email address" required autofocus>
<input class="big fullWidth marginTop" type="password" name="password" placeholder="Password" required minlength="6">
<p id="loginFormError" class="formError justify marginTop"></p>
<div class="right marginTop">
<button type="submit">Login</button>
+4 -4
View File
@@ -9,12 +9,12 @@ $jsFiles = [
<h2>Profile</h2>
<div class="box">
<form id="profileForm" action="/profile" method="post">
<input class="big fullWidth" type="password" name="password" placeholder="Current password" autofocus>
<hr>
<?php /* TODO: disabled for the time being, email modification should be implemented */ ?>
<input class="big fullWidth" type="email" name="email" placeholder="Email address" value="<?= $user['email'] ?>" disabled>
<input class="big fullWidth marginTop" type="password" name="password_new" placeholder="New password" autofocus>
<input class="big fullWidth marginTop" type="password" name="password_new_confirm" placeholder="New password confirmation">
<hr>
<input class="big fullWidth" type="password" name="password" placeholder="Current password">
<input class="big fullWidth marginTop" type="password" name="password_new" placeholder="New password" minlength="6">
<input class="big fullWidth marginTop" type="password" name="password_new_confirm" placeholder="New password confirmation" minlength="6">
<p id="profileFormError" class="formError justify marginTop"></p>
<div class="right marginTop">
<button type="submit" name="save" disabled>Save</button>
+3 -3
View File
@@ -9,9 +9,9 @@ $jsFiles = [
<h2>Sign up</h2>
<div class="box">
<form id="signupForm" action="/signup" method="post">
<input class="big fullWidth" type="email" name="email" placeholder="Email address" autofocus>
<input class="big fullWidth marginTop" type="password" name="password" placeholder="Password">
<input class="big fullWidth marginTop" type="password" name="password_confirm" placeholder="Password confirmation">
<input class="big fullWidth" type="email" name="email" placeholder="Email address" required autofocus>
<input class="big fullWidth marginTop" type="password" name="password" placeholder="Password" required minlength="6">
<input class="big fullWidth marginTop" type="password" name="password_confirm" placeholder="Password confirmation" required minlength="6">
<p id="signupFormError" class="formError justify marginTop"></p>
<div class="right marginTop">
<button type="submit">Sign up</button>