WIP reorganization

This commit is contained in:
Erik Ziegler committed 2018-12-12 09:10:39 +01:00
1 parent 6706dfe634
commit 054e37dfb7
266 files changed
+98 -620

No files matched your search

@@ -0,0 +1,4 @@
exports.command = function () {
this
.verify.elementPresent("#forgotPassword"); return this;
};
@@ -0,0 +1,30 @@
<template name="forgotPassword">
<div id="forgotPassword" class="page entryPage" style="{{getOpacityWithCorner}}">
<div class="content-scrollable">
<div class="wrapper-auth">
<div class="entryLogo" style="background-image: url('{{getLogoUrl}}')"></div>
<h1 id="signInPageTitle" class="title-auth">Forgot Password</h1>
<div id="signInPageMessage" class="subtitle-auth" >Improve your clinical practice with checklists.</div>
<p id="signInPageMessage" class="subtitle-auth" style="{{getForgotPasswordMessageColor}}">{{{getForgotPasswordMessage}}}</p>
<form>
<div class="input-symbol">
<input id="signInPageEmailInput" type="email" name="email" placeholder="Your Email" style="{{getForgotPasswordStyle}}" />
<i class="fa fa-envelope-o" title="Your Email"></i>
</div>
<br><br>
<button id="sendReminderButton" type="submit" class="btn-gray btn-main btn-large" style="{{getButtonColor}}">Send Reminder</button><br><br>
{{#if forgotPasswordNotification}}
<div class="alert alert-success">
{{{forgotPasswordNotification}}}
</div>
{{/if}}
</form>
</div>
</div>
</div>
</template>
@@ -0,0 +1,36 @@
//==========================================
Router.route('/forgotPassword', {
name: "forgotPassword",
template: "forgotPassword"
});
Template.forgotPassword.helpers({
getForgotPasswordMessageColor: function (){
if (ActiveEntry.errorMessages.get('forgotPassword')) {
return "color: #a94442; background-color: #f2dede; border-color: #ebccd1;"
} else {
return "color: black;"
}
},
getForgotPasswordMessage: function (){
return ActiveEntry.errorMessages.get('forgotPassword');
},
getForgotPasswordStyle: function (){
return "border: 1px solid gray";
},
forgotPasswordNotification: function() {
return ActiveEntry.successMessages.get("forgotPassword");
}
});
Template.forgotPassword.events({
"submit": function (event, template) {
event.preventDefault();
console.log('send reminder!');
ActiveEntry.successMessages.set("forgotPassword", "Your password reset email is sending...");
var emailAddress = $('#signInPageEmailInput').val();
ActiveEntry.forgotPassword(emailAddress);
}
});
@@ -0,0 +1,5 @@
#forgotPassword{
input{
padding-left: 40px;
}
}