Merge pull request 'add autocomplete values for username and password fields' (!64) from feature/add-autocompletes-for-usernames-and-passwords into develop
Reviewed-on: #64
This commit is contained in:
		
						commit
						39e40b96c6
					
				@ -9,12 +9,12 @@
 | 
			
		||||
            <?php if ($user['password'] !== null && $user['google_sub'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with your password or with Google to modify your account.</p>
 | 
			
		||||
                <div class="inputWithButton">
 | 
			
		||||
                    <input type="password" class="text name="password" placeholder="Current password" required minlength="6" autofocus><!--
 | 
			
		||||
                    <input type="password" class="text name="password" placeholder="Current password" autocomplete="current-password" required minlength="6" autofocus><!--
 | 
			
		||||
                 --><button id="authenticateWithGoogleButton" class="yellow" type="button">Google</button>
 | 
			
		||||
                </div>
 | 
			
		||||
            <?php elseif ($user['password'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with your password to modify your account.</p>
 | 
			
		||||
                <input type="password" class="text big fullWidth" name="password" placeholder="Current password" required minlength="6" autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth" name="password" placeholder="Current password" autocomplete="current-password" required minlength="6" autofocus>
 | 
			
		||||
            <?php elseif ($user['google_sub'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with Google to modify your account.</p>
 | 
			
		||||
                <div class="inputWithButton">
 | 
			
		||||
@ -24,9 +24,9 @@
 | 
			
		||||
            <?php endif; ?>
 | 
			
		||||
            <hr>
 | 
			
		||||
            <?php /* TODO: disabled for the time being, email modification should be implemented */ ?>
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" value="<?= $user['email'] ?>" disabled>
 | 
			
		||||
            <input type="password" class="text big fullWidth marginTop" name="password_new" placeholder="New password" minlength="6">
 | 
			
		||||
            <input type="password" class="text big fullWidth marginTop" name="password_new_confirm" placeholder="New password confirmation" minlength="6">
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" autocomplete="username" value="<?= $user['email'] ?>" disabled>
 | 
			
		||||
            <input type="password" class="text big fullWidth marginTop" name="password_new" placeholder="New password" autocomplete="new-password" minlength="6">
 | 
			
		||||
            <input type="password" class="text big fullWidth marginTop" name="password_new_confirm" placeholder="New password confirmation" autocomplete="new-password" minlength="6">
 | 
			
		||||
            <p id="accountFormError" class="formError justify marginTop"></p>
 | 
			
		||||
            <div class="right marginTop">
 | 
			
		||||
                <button type="submit" name="submit" disabled>Save</button>
 | 
			
		||||
 | 
			
		||||
@ -7,15 +7,16 @@
 | 
			
		||||
    <div class="box">
 | 
			
		||||
        <form id="deleteAccountForm" action="/account/delete" method="post" data-redirect-on-success="/">
 | 
			
		||||
            <p class="justify marginBottom">Are you sure you want to delete your account? This cannot be undone!</p>
 | 
			
		||||
            <input type="email" style="display: none;" name="email" autocomplete="username" value="<?= $user['email'] ?>">
 | 
			
		||||
            <?php if ($user['password'] !== null && $user['google_sub'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with your password or with Google to delete your account.</p>
 | 
			
		||||
                <div class="inputWithButton">
 | 
			
		||||
                    <input type="password" class="text" name="password" placeholder="Current password" required minlength="6" autofocus><!--
 | 
			
		||||
                    <input type="password" class="text" name="password" placeholder="Current password" autocomplete="current-password" required minlength="6" autofocus><!--
 | 
			
		||||
                 --><button id="authenticateWithGoogleButton" class="yellow" type="button">Google</button>
 | 
			
		||||
                </div>
 | 
			
		||||
            <?php elseif ($user['password'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with your password to delete your account.</p>
 | 
			
		||||
                <input type="password" class="text big fullWidth" name="password" placeholder="Current password" required minlength="6" autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth" name="password" placeholder="Current password" autocomplete="current-password" required minlength="6" autofocus>
 | 
			
		||||
            <?php elseif ($user['google_sub'] !== null): ?>
 | 
			
		||||
                <p class="justify small">Please confirm your identity with Google to delete your account.</p>
 | 
			
		||||
                <div class="inputWithButton">
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,8 @@
 | 
			
		||||
    <h2>Login</h2>
 | 
			
		||||
    <div class="box">
 | 
			
		||||
        <form id="loginForm" action="/login" method="post" data-redirect-on-success="<?= $redirectUrl ?>">
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" required autofocus>
 | 
			
		||||
            <input type="password"  class="text big fullWidth marginTop" name="password" placeholder="Password" required minlength="6">
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" autocomplete="username" required autofocus>
 | 
			
		||||
            <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password autocomplete="current-password"" required minlength="6">
 | 
			
		||||
            <p id="loginFormError" class="formError justify marginTop"></p>
 | 
			
		||||
            <div class="right marginTop">
 | 
			
		||||
                <button type="submit">Login</button>
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
    <h2>Request password reset</h2>
 | 
			
		||||
    <div class="box">
 | 
			
		||||
        <form id="passwordResetForm" action="/password/requestReset" method="post" data-redirect-on-success="/password/requestReset/success">
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" value="<?= isset($email) ? $email : '' ?>" required autofocus>
 | 
			
		||||
            <input type="email" class="text big fullWidth" name="email" placeholder="Email address" autocomplete="username" value="<?= isset($email) ? $email : '' ?>" required autofocus>
 | 
			
		||||
            <?php if (!empty($_ENV['RECAPTCHA_SITEKEY'])): ?>
 | 
			
		||||
                <div class="marginTop">
 | 
			
		||||
                    <div class="g-recaptcha" data-sitekey="<?= $_ENV['RECAPTCHA_SITEKEY'] ?>"></div>
 | 
			
		||||
 | 
			
		||||
@ -5,9 +5,9 @@
 | 
			
		||||
    <div class="box">
 | 
			
		||||
        <?php if ($success) : ?>
 | 
			
		||||
            <form id="resetPasswordForm" action="/password/reset/<?= $token ?>" method="post" data-redirect-on-success="<?= $redirectUrl ?>">
 | 
			
		||||
                <input type="email" class="text big fullWidth" name="email" placeholder="Email address" value="<?= $email ?>" disabled>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password" required minlength="6" autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password_confirm" placeholder="Password confirmation" required minlength="6">
 | 
			
		||||
                <input type="email" class="text big fullWidth" name="email" placeholder="Email address" autocomplete="username" value="<?= $email ?>" disabled>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password" autocomplete="new-password" required minlength="6" autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password_confirm" placeholder="Password confirmation" autocomplete="new-password" required minlength="6">
 | 
			
		||||
                <p id="resetPasswordFormError" class="formError justify marginTop"></p>
 | 
			
		||||
                <div class="right">
 | 
			
		||||
                    <button class="marginTop" type="submit">Reset password</button>
 | 
			
		||||
 | 
			
		||||
@ -9,12 +9,12 @@
 | 
			
		||||
        <form id="signupForm" action="/signup" method="post" data-redirect-on-success="/signup/success">
 | 
			
		||||
            <?php if (isset($email)): ?>
 | 
			
		||||
                <p class="justify">No user found with the given email address. Sign up with one click!</p>
 | 
			
		||||
                <input type="email" class="text big fullWidth marginTop" name="email" placeholder="Email address" value="<?= $email ?>" required>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password confirmation" required minlength="6" autofocus>
 | 
			
		||||
                <input type="email" class="text big fullWidth marginTop" name="email" placeholder="Email address" autocomplete="username" value="<?= $email ?>" required>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password confirmation" autocomplete="new-password" required minlength="6" autofocus>
 | 
			
		||||
            <?php else: ?>
 | 
			
		||||
                <input type="email" class="text big fullWidth" name="email" placeholder="Email address" required autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password" required minlength="6">
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password_confirm" placeholder="Password confirmation" minlength="6">
 | 
			
		||||
                <input type="email" class="text big fullWidth" name="email" placeholder="Email address" autocomplete="username" required autofocus>
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password" placeholder="Password" autocomplete="new-password" required minlength="6">
 | 
			
		||||
                <input type="password" class="text big fullWidth marginTop" name="password_confirm" placeholder="Password confirmation" autocomplete="new-password" minlength="6">
 | 
			
		||||
            <?php endif; ?>
 | 
			
		||||
            <?php if (!empty($_ENV['RECAPTCHA_SITEKEY'])): ?>
 | 
			
		||||
                <div class="marginTop">
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user