Use CAPTCHA v2
This commit is contained in:
parent
d43275a0c3
commit
ee77081caf
1 changed files with 9 additions and 23 deletions
|
@ -4,6 +4,7 @@
|
||||||
<title>StudentiUniMi Overleaf registration</title>
|
<title>StudentiUniMi Overleaf registration</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="/register/static/styles/styles.css">
|
<link rel="stylesheet" href="/register/static/styles/styles.css">
|
||||||
|
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -37,26 +38,18 @@
|
||||||
<form async-form="login" name="loginForm" action="/register" method="POST"
|
<form async-form="login" name="loginForm" action="/register" method="POST"
|
||||||
class="ng-pristine ng-valid-email ng-invalid ng-invalid-required"
|
class="ng-pristine ng-valid-email ng-invalid ng-invalid-required"
|
||||||
id="registration-form">
|
id="registration-form">
|
||||||
<form-messages for="loginForm" class="ng-isolate-scope">
|
<div class="form-group">
|
||||||
<div class="alert ng-binding ng-hide alert-success" ng-class="{
|
<input
|
||||||
'alert-danger': form.response.message.type == 'error',
|
|
||||||
'alert-success': form.response.message.type != 'error'
|
|
||||||
}" ng-show="!!form.response.message" ng-bind-html="form.response.message.text"></div>
|
|
||||||
<div ng-transclude=""></div>
|
|
||||||
</form-messages>
|
|
||||||
<div class="form-group"><input
|
|
||||||
class="form-control ng-pristine ng-isolate-scope ng-empty ng-valid-email ng-invalid ng-invalid-required ng-touched"
|
class="form-control ng-pristine ng-isolate-scope ng-empty ng-valid-email ng-invalid ng-invalid-required ng-touched"
|
||||||
type="email" name="email" required="" placeholder="your.email@studenti.unimi.it"
|
type="email" name="email" required="" placeholder="your.email@studenti.unimi.it"
|
||||||
ng-model="email" ng-model-options="{ updateOn: 'blur' }" focus="true"
|
ng-model="email" ng-model-options="{ updateOn: 'blur' }" focus="true"
|
||||||
_mstplaceholder="329745" style="text-align: left;"><span
|
_mstplaceholder="329745" style="text-align: left;" />
|
||||||
class="small text-primary ng-hide"
|
</div>
|
||||||
ng-show="loginForm.email.$invalid && loginForm.email.$dirty"
|
<div class="form-group">
|
||||||
_msthash="2219269" _msttexthash="451906" _msthidden="1">Must be an email
|
<div class="g-recaptcha" data-sitekey="{{ CAPTCHA_CLIENT_KEY }}"></div>
|
||||||
address</span></div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<button class="btn-primary btn g-recaptcha" type="submit" ng-disabled="loginForm.inflight"
|
<button class="btn-primary btn g-recaptcha" type="submit" ng-disabled="loginForm.inflight">
|
||||||
data-sitekey="{{ CAPTCHA_CLIENT_KEY }}" data-callback="onSubmit"
|
|
||||||
data-action="submit">
|
|
||||||
<span ng-show="!loginForm.inflight" _msthash="2371122" _msttexthash="94068">
|
<span ng-show="!loginForm.inflight" _msthash="2371122" _msttexthash="94068">
|
||||||
Register
|
Register
|
||||||
</span>
|
</span>
|
||||||
|
@ -70,13 +63,6 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script src="/register/static/scripts/scripts.js"></script>
|
<script src="/register/static/scripts/scripts.js"></script>
|
||||||
|
|
||||||
<script src="https://www.google.com/recaptcha/api.js"></script>
|
|
||||||
<script>
|
|
||||||
function onSubmit(token) {
|
|
||||||
document.getElementById("registration-form").submit();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue