diff --git a/LesionTracker/.meteor/packages b/LesionTracker/.meteor/packages
index 298479847..63fce995c 100644
--- a/LesionTracker/.meteor/packages
+++ b/LesionTracker/.meteor/packages
@@ -49,3 +49,4 @@ clinical:hipaa-logger
anti:gagarin@=0.4.11
check
aldeed:template-extension@4.0.0
+zuuk:stale-session
diff --git a/LesionTracker/.meteor/versions b/LesionTracker/.meteor/versions
index 752136502..dd2fc3354 100644
--- a/LesionTracker/.meteor/versions
+++ b/LesionTracker/.meteor/versions
@@ -17,10 +17,10 @@ caching-compiler@1.0.0
caching-html-compiler@1.0.2
callback-hook@1.0.4
check@1.1.0
-clinical:active-entry@1.5.14
+clinical:active-entry@1.5.16
clinical:auto-resizing@0.1.2
clinical:error-pages@0.1.1
-clinical:extended-api@2.2.1
+clinical:extended-api@2.2.2
clinical:fonts@1.0.0
clinical:hipaa-audit-log@2.4.2
clinical:hipaa-logger@1.0.1
@@ -28,7 +28,7 @@ clinical:router@2.0.17
clinical:router-location@2.0.14
clinical:router-middleware-stack@2.0.13
clinical:router-url@2.0.15
-clinical:theming@0.3.1
+clinical:theming@0.4.7
coffeescript@1.0.11
cornerstone@0.0.1
ddp@1.2.2
@@ -46,7 +46,7 @@ ejson@1.0.7
email@1.0.8
es5-shim@4.1.14
fastclick@1.0.7
-fortawesome:fontawesome@4.4.0
+fortawesome:fontawesome@4.5.0
geojson-utils@1.0.4
grove:less@0.1.1
hangingprotocols@0.0.1
@@ -54,7 +54,7 @@ hot-code-push@1.0.0
html-tools@1.0.5
htmljs@1.0.5
http@1.1.1
-ian:accounts-ui-bootstrap-3@1.2.83
+ian:accounts-ui-bootstrap-3@1.2.89
id-map@1.0.4
insecure@1.0.4
iron:controller@1.0.12
@@ -74,7 +74,7 @@ minifiers@1.1.7
minimongo@1.0.10
mobile-experience@1.0.1
mobile-status-bar@1.0.6
-momentjs:moment@2.10.6
+momentjs:moment@2.11.2
mongo@1.1.3
mongo-id@1.0.1
mrt:moment@2.8.1
@@ -82,8 +82,8 @@ npm-bcrypt@0.7.8_2
npm-mongo@1.4.39_1
observe-sequence@1.0.7
ordered-dict@1.0.4
-practicalmeteor:chai@1.9.2_3
-practicalmeteor:loglevel@1.1.0_3
+practicalmeteor:chai@2.1.0_1
+practicalmeteor:loglevel@1.2.0_2
promise@0.5.1
random@1.0.5
rate-limit@1.0.0
@@ -105,7 +105,7 @@ stylus@2.511.1
templating@1.1.5
templating-tools@1.0.0
tracker@1.0.9
-twbs:bootstrap@3.3.5
+twbs:bootstrap@3.3.6
ui@1.0.8
underscore@1.0.4
url@1.0.5
@@ -113,3 +113,4 @@ viewerbase@0.0.1
webapp@1.2.3
webapp-hashing@1.0.5
worklist@0.0.1
+zuuk:stale-session@1.0.8
diff --git a/LesionTracker/activeEntry.js b/LesionTracker/activeEntry.js
index a1413b8c8..cdde9557d 100644
--- a/LesionTracker/activeEntry.js
+++ b/LesionTracker/activeEntry.js
@@ -12,8 +12,16 @@ if (Meteor.isClient){
destination: '/worklist'
},
themeColors: {
- primary: 'black'
+ primary: ""
+ },
+ passwordOptions: {
+ showPasswordStrengthIndicator: false,
+ requireRegexValidation: true,
+ //requireStrongPasswords: false
+ passwordHistoryCount: 6,
+ failedAttemptsLimit: 5
}
+
});
}
diff --git a/LesionTracker/client/routes.js b/LesionTracker/client/routes.js
index 70986b89a..69e0e9e74 100644
--- a/LesionTracker/client/routes.js
+++ b/LesionTracker/client/routes.js
@@ -30,11 +30,21 @@ var routerOptions = {
};
Router.route('/', function() {
- this.render('worklist', routerOptions);
+ // Check user is logged in
+ if (!Meteor.user() || !Meteor.userId()) {
+ this.render('entrySignIn', routerOptions);
+ } else{
+ this.render('worklist', routerOptions);
+ }
});
Router.route('/worklist', function() {
- this.render('worklist', routerOptions);
+ // Check user is logged in
+ if (!Meteor.user() || !Meteor.userId()) {
+ this.render('entrySignIn', routerOptions);
+ } else{
+ this.render('worklist', routerOptions);
+ }
});
Router.route('/viewer/timepoints/:_id', {
diff --git a/Packages/active-entry/Contributing.md b/Packages/active-entry/Contributing.md
index bcfbe714a..aa34713b2 100644
--- a/Packages/active-entry/Contributing.md
+++ b/Packages/active-entry/Contributing.md
@@ -1,5 +1,10 @@
## Contributing
+**Submit your Pull Request on a Feature Branch**
+
+- To ensure your pull-request has the greatest chance of getting merged in, please submit it on a feature branch rather than directly to master.
+- Please see [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/) for more details.
+
**Quality Assurance**
- Pull Requests will be generally accepted as long as the QA tests pass on [Circle CI](https://circleci.com/gh/clinical-meteor/clinical-active-entry).
- Begin a Pull Request by logging an Issue for discussion.
diff --git a/Packages/active-entry/README.md b/Packages/active-entry/README.md
index e55460600..5fe15f346 100755
--- a/Packages/active-entry/README.md
+++ b/Packages/active-entry/README.md
@@ -2,7 +2,7 @@
This package provides the SignIn, SignUp, and ForgotPassword pages.
-[](https://circleci.com/gh/clinical-meteor/clinical-active-entry/tree/master)
+[](https://circleci.com/gh/clinical-meteor/active-entry/tree/master)
===============================
#### Installation
@@ -16,7 +16,7 @@ meteor add clinical:active-entry
The following diagram represents the entry workflow that is being implemented in this package. This package is under active development, and is about half completed. Pull requests which help implement the following workflow will be fast-tracked and accepted into the package.
-
+
@@ -111,6 +111,9 @@ npm install -g starrynight
# verification testing (a.k.a. package-level unit/integration testing)
starrynight run-tests --type package-verification
+#to run validation tests, you'll need an ``.initializeUsers()`` function
+meteor add clinical:accounts-housemd
+
#validation testing (a.k.a. application acceptance/end-to-end testing)
starrynight autoscan
starrynight run-tests --type validation
diff --git a/Packages/active-entry/circle.yml b/Packages/active-entry/circle.yml
index 16a78dee3..f4a45a711 100644
--- a/Packages/active-entry/circle.yml
+++ b/Packages/active-entry/circle.yml
@@ -1,5 +1,7 @@
## Customize the test machine
machine:
+ node:
+ version: 0.10.33
# Timezone
timezone:
@@ -25,27 +27,48 @@ checkout:
## Customize dependencies
dependencies:
cache_directories:
- - "~/.meteor" # relative to the user's home directory
+ - ~/.meteor # relative to the user's home directory
+ - ~/nvm/v0.10.33/lib/node_modules/starrynight
+ - ~/nvm/v0.10.33/bin/starrynight
+
+ pre:
+ # Install Starrynight unless it is cached
+ - if [ ! -e ~/nvm/v0.10.33/bin/starrynight ]; then npm install -g starrynight; else echo "Starrynight seems to be cached"; fi;
+ # Install Meteor
+ - mkdir -p ${HOME}/.meteor
+ # If Meteor is already cached, do not need to build it again.
+ - if [ ! -e ${HOME}/.meteor/meteor ]; then curl https://install.meteor.com | /bin/sh; else echo "Meteor seems to be cached"; fi;
+ # Link the meteor executable into /usr/bin
+ - sudo ln -s $HOME/.meteor/meteor /usr/bin/meteor
+ # Check if the helloworld directory already exists, if it doesn't, create the helloworld app
+ # The following doesn't work, because it should be checking ${HOME}/active-entry/helloworld
+ # - if [ ! -e ${HOME}/helloworld ]; then meteor create --release METEOR@1.1.0.3 helloworld; else echo "helloworld app seems to be cached"; fi;
override:
- - meteor || curl https://install.meteor.com | /bin/sh
- - npm install starrynight -g
- - meteor create --release METEOR@1.1.0.3 helloworld
- - cd helloworld
- - cd helloworld && ls -la
- - cd helloworld && rm helloworld.*
- - cd helloworld && meteor add anti:gagarin@0.4.11 accounts-base accounts-password session meteor-platform clinical:active-entry clinical:user-model
- - cd helloworld && git clone http://github.com/clinical-meteor/clinical-active-entry packages/active-entry
- - cd helloworld && starrynight autoconfig
+ - cd ${HOME} && meteor create --release METEOR@1.1.0.3 helloworld
+ - cd ${HOME}/helloworld
+ - cd ${HOME}/helloworld && ls -la
+ - cd ${HOME}/helloworld && rm helloworld.*
+ - cd ${HOME}/helloworld && mkdir packages && mkdir packages/active-entry
+ - cp -R * ${HOME}/helloworld/packages/active-entry
+ - cd ${HOME}/helloworld && meteor add anti:gagarin@0.4.11 accounts-base accounts-password session meteor-platform clinical:user-model clinical:active-entry
+ - cd ${HOME}/helloworld && starrynight autoconfig
+ - cd ${HOME}/helloworld && meteor list
+ - cat tests/gagarin/activeEntryTests.js
+ - ls -la
+ - cd ~ && ls -la
+ - cd ${HOME} && pwd
+ - cd ${HOME} && ls -la
+ - cd ${HOME}/helloworld && ls -la
## Customize test commands
test:
pre:
- cd helloworld && meteor:
background: true
- - sleep 80
+ - sleep 30
override:
- - cd helloworld && starrynight run-tests --type package-verification
+ - cd ${HOME}/helloworld && starrynight run-tests --type package-verification
## Customize deployment commands
#deployment:
diff --git a/Packages/active-entry/components/changePassword/changePassword.html b/Packages/active-entry/components/changePassword/changePassword.html
new file mode 100755
index 000000000..f6c4c805f
--- /dev/null
+++ b/Packages/active-entry/components/changePassword/changePassword.html
@@ -0,0 +1,48 @@
+
+ Change Password
+
-
+
diff --git a/Packages/active-entry/components/entrySignIn/entrySignIn.js b/Packages/active-entry/components/entrySignIn/entrySignIn.js
index 523854089..f6af2401b 100755
--- a/Packages/active-entry/components/entrySignIn/entrySignIn.js
+++ b/Packages/active-entry/components/entrySignIn/entrySignIn.js
@@ -48,7 +48,7 @@ Template.entrySignIn.helpers({
return "border: 1px solid #a94442";
} else if (ActiveEntry.errorMessages.equals('email', "Email is poorly formatted")) {
return "border: 1px solid #f2dede";
- } else if (ActiveEntry.errorMessages.equals('email', "Email present")) {
+ } else if (ActiveEntry.successMessages.equals('email', "Email present")) {
return "border: 1px solid green";
} else {
return "border: 1px solid gray";
@@ -57,16 +57,16 @@ Template.entrySignIn.helpers({
getPasswordValidationStyling: function () {
if (ActiveEntry.errorMessages.equals('password', "Password is required")) {
return "border: 1px solid #a94442";
- } else if (ActiveEntry.errorMessages.equals('password', "Password is weak")) {
+ } else if (ActiveEntry.errorMessages.equals('password', Session.get('passwordWarning'))) {
return "border: 1px solid #f2dede";
- } else if (ActiveEntry.errorMessages.equals('password', "Password present")) {
+ } else if (ActiveEntry.successMessages.equals('password', "Password present")) {
return "border: 1px solid green";
} else {
return "border: 1px solid gray";
}
}
-});
+});
//==================================================================================================
// COMPONENT OUTPUTS
@@ -77,10 +77,12 @@ Template.entrySignIn.events({
},
'click #forgotPasswordButton': function (event) {
event.preventDefault();
+ ActiveEntry.reset();
Router.go('/forgotPassword');
},
"click #needAnAccountButton": function (event) {
event.preventDefault();
+ ActiveEntry.reset();
Router.go('/entrySignUp');
},
'keyup input[name="email"]': function (event, template) {
@@ -88,24 +90,28 @@ Template.entrySignIn.events({
ActiveEntry.verifyEmail(email);
ActiveEntry.errorMessages.set('signInError', null);
+ setSignInButtonStyling();
},
'change input[name="email"]': function (event, template) {
var email = $('input[name="email"]').val();
ActiveEntry.verifyEmail(email);
ActiveEntry.errorMessages.set('signInError', null);
+ setSignInButtonStyling();
},
'keyup #signInPagePasswordInput': function (event, template) {
var password = $('input[name="password"]').val();
ActiveEntry.verifyPassword(password);
ActiveEntry.errorMessages.set('signInError', null);
+ setSignInButtonStyling();
},
'change #signInPagePasswordInput': function (event, template) {
var password = $('input[name="password"]').val();
ActiveEntry.verifyPassword(password);
ActiveEntry.errorMessages.set('signInError', null);
+ setSignInButtonStyling();
},
// 'submit': function (event, template) {
// event.preventDefault();
@@ -115,7 +121,7 @@ Template.entrySignIn.events({
// ActiveEntry.signIn(emailValue, passwordValue);
// },
'click #signInToAppButton': function (event, template){
- console.log('click #signInToAppButton');
+ ActiveEntry.reset();
// var emailValue = template.$('[name=email]').val();
// var passwordValue = template.$('[name=password]').val();
var emailValue = template.$('#signInPageEmailInput').val();
@@ -123,9 +129,29 @@ Template.entrySignIn.events({
ActiveEntry.signIn(emailValue, passwordValue);
event.preventDefault();
+ },
+ 'keyup #entrySignIn': function(event, template) {
+ if(event.keyCode == 13) {
+ $("#signInToAppButton").click();
+ }
}
});
//==================================================================================================
+
+// Sets SignInButton Styling according to email and password fields
+function setSignInButtonStyling() {
+ var signInToAppButton = $("#signInToAppButton");
+ if ($("#signInPagePasswordInput").val() && ActiveEntry.successMessages.get('email')) {
+ // Set button as enable
+ signInToAppButton.removeClass("disabledButton");
+ signInToAppButton.attr("disabled", false);
+ } else {
+ signInToAppButton.addClass("disabledButton");
+ signInToAppButton.attr("disabled", true);
+
+
+ }
+}
\ No newline at end of file
diff --git a/Packages/active-entry/components/entrySignIn/entrySignIn.less b/Packages/active-entry/components/entrySignIn/entrySignIn.less
index 5b3b93e34..4cc2f5fc3 100755
--- a/Packages/active-entry/components/entrySignIn/entrySignIn.less
+++ b/Packages/active-entry/components/entrySignIn/entrySignIn.less
@@ -14,4 +14,18 @@
color: red;
font-weight: bold;
}
-}
+
+ .disabledButton {
+ border: none;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ filter: alpha(opacity=40);
+ -khtml-opacity: 0.40;
+ -moz-opacity: 0.40;
+ opacity: 0.40;
+ cursor: not-allowed;
+ box-shadow: none;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Packages/active-entry/components/entrySignUp/entrySignUp.html b/Packages/active-entry/components/entrySignUp/entrySignUp.html
index b871967ad..05a15a177 100755
--- a/Packages/active-entry/components/entrySignUp/entrySignUp.html
+++ b/Packages/active-entry/components/entrySignUp/entrySignUp.html
@@ -10,10 +10,11 @@