socketing for reset page - started on emailer
parent
96a4cbd8d1
commit
0e8c4f35cd
@ -1,24 +1,35 @@
|
|||||||
<h1>Reset Password</h1>
|
<h1>Reset Password</h1>
|
||||||
<div class="well">
|
<div class="well">
|
||||||
<div class="alert alert-success" id="success" style="display:none">
|
<div class="alert alert-success" id="success" style="display:none">
|
||||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
<strong>Password Reset Sent</strong>
|
<strong>Password Reset Sent</strong>
|
||||||
<p>An email has been dispatched to <span id="reset-email"></span> with instructions on setting a new password.</p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="alert" id="error" style="display:none">
|
||||||
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
|
<strong>Invalid Email!</strong>
|
||||||
|
<p>The email you put in (<span id="invalid-email"></span>) is not registered with us. Please try again.</p>
|
||||||
|
</div>
|
||||||
<label>Email Address</label><input type="text" placeholder="Enter Email Address" id="email" /><br />
|
<label>Email Address</label><input type="text" placeholder="Enter Email Address" id="email" /><br />
|
||||||
<button class="btn btn-primary" id="login" type="submit">Reset Password</button>
|
<button class="btn btn-primary" id="reset" type="submit">Reset Password</button>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function() {
|
(function() {
|
||||||
/*socket.on('user.login', function(data) {
|
socket.on('user.send_reset', function(data) {
|
||||||
console.log(data);
|
var inputEl = document.getElementById('email'),
|
||||||
if (data.status === 0) {
|
submitEl = document.getElementById('reset'),
|
||||||
jQuery('#error').show(50);
|
invalidEl = document.getElementById('invalid-email');
|
||||||
jQuery('#error p').html(data.message);
|
|
||||||
|
if (data.status === 'ok') {
|
||||||
|
jQuery('#error').hide();
|
||||||
|
jQuery('#success').show();
|
||||||
|
jQuery('#success p').html('An email has been dispatched to "' + data.email + '" with instructions on setting a new password.');
|
||||||
|
inputEl.value = '';
|
||||||
} else {
|
} else {
|
||||||
alert('success');
|
jQuery('#success').hide();
|
||||||
jQuery('#error').hide(50);
|
jQuery('#error').show();
|
||||||
|
invalidEl.innerHTML = data.email;
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue