roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [1/2] roller git commit: Fix problem with save button disable/enable logic.
Date Sun, 26 Jun 2016 20:13:14 GMT
Repository: roller
Updated Branches:
  refs/heads/bootstrap-ui 04a101d1e -> 2f4b2b3e1


Fix problem with save button disable/enable logic.


Project: http://git-wip-us.apache.org/repos/asf/roller/repo
Commit: http://git-wip-us.apache.org/repos/asf/roller/commit/89135133
Tree: http://git-wip-us.apache.org/repos/asf/roller/tree/89135133
Diff: http://git-wip-us.apache.org/repos/asf/roller/diff/89135133

Branch: refs/heads/bootstrap-ui
Commit: 89135133fd6270ca2f0d74998befce81806a7404
Parents: 04a101d
Author: Dave Johnson <snoopdave@gmail.com>
Authored: Sat Jun 25 15:56:30 2016 -0400
Committer: Dave Johnson <snoopdave@gmail.com>
Committed: Sat Jun 25 15:56:30 2016 -0400

----------------------------------------------------------------------
 app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/roller/blob/89135133/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp b/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
index fd21232..7f7b110 100644
--- a/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
@@ -110,22 +110,21 @@
             valid = true;
 
         } else {
-            saveButton.attr("disabled", true);
-            saveButton.addClass("btn-danger");
-            return;
+            valid = false;
         }
 
         if ( (password && password.trim().length) || (passwordConfirm &&
passwordConfirm.trim().length > 0 )) {
             if ( password != passwordConfirm ) {
-                saveButton.attr("disabled", true );
-                saveButton.addClass("btn-danger");
-                return;
+                valid = false;
             }
         }
 
         if ( valid ) {
             saveButton.attr("disabled", false);
             saveButton.removeClass("btn-danger");
+        } else {
+            saveButton.attr("disabled", true);
+            saveButton.addClass("btn-danger");
         }
 
     }


Mime
View raw message