=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java 2012-10-22 18:48:19 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java 2012-10-23 10:26:43 +0000 @@ -74,6 +74,11 @@ return infrastructuralPeriodType != null ? infrastructuralPeriodType : DEFAULT_INFRASTRUCTURAL_PERIODTYPE; } + public boolean selfRegistrationAllowed() + { + return selfRegistrationRole != null && selfRegistrationRole instanceof UserAuthorityGroup; + } + // ------------------------------------------------------------------------- // Set and get methods // ------------------------------------------------------------------------- === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java 2012-10-22 18:54:25 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/AccountController.java 2012-10-23 10:26:43 +0000 @@ -95,9 +95,9 @@ HttpServletRequest request, HttpServletResponse response ) { - UserAuthorityGroup userRole = configurationService.getConfiguration().getSelfRegistrationRole(); + boolean allowed = configurationService.getConfiguration().selfRegistrationAllowed(); - if ( userRole == null ) + if ( !allowed ) { response.setStatus( HttpServletResponse.SC_BAD_REQUEST ); return "User self registration is not allowed"; === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/account.css' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/account.css 2012-10-19 18:29:23 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/account.css 2012-10-23 10:26:43 +0000 @@ -17,14 +17,14 @@ top: 0; left: 0; width: 100%; - height: 93px; + height: 80px; background-color: #1d5288; } #bannerArea { position: relative; - top: 25px; + top: 19px; } #accountContainer @@ -39,7 +39,7 @@ #accountInput { position: relative; - padding-top: 80px; + padding-top: 65px; } h3 === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css 2012-10-17 17:04:50 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css 2012-10-23 10:26:43 +0000 @@ -59,6 +59,27 @@ color: #bfd9f2; } +#bannerArea +{ + margin-bottom: 35px; + border: none; +} + +#accountArea +{ + position: absolute; + right: 10px; + padding: 18px 30px 18px 0; + font-size: 17px; +} + +#accountIntro +{ + position: relative; + top: 1px; + padding-right: 15px +} + #loginField { position: relative; @@ -67,12 +88,6 @@ text-align: center; } -#bannerArea -{ - margin-bottom: 35px; - border: none; -} - #loginField td { padding-right: 5px; @@ -102,7 +117,28 @@ text-align: center; } -.button { +.greenButtonLink +{ + padding: 6px 12px; + height: 27px; + border: 1px solid #67A767; + border-radius: 3px; + margin-right: 4px; + font-family: LiberationSansBold, arial; + font-size: 13px; + background-color: #1A9B20; + color: #fff !important; + text-decoration: none !important; +} + +.greenButtonLink:hover +{ + text-decoration: none; + background-color: #1DA223; +} + +.button +{ font-family: LiberationSansBold, arial; background: -webkit-linear-gradient(top, #f1f1f1, #d1d1d1); background: -moz-linear-gradient(top, #f1f1f1, #d1d1d1); @@ -114,7 +150,8 @@ color: #222; } -.button:hover { +.button:hover +{ background: -webkit-linear-gradient(top, #fafafa, #dadada); background: -moz-linear-gradient(top, #fafafa, #dadada); background: -ms-linear-gradient(top, #fafafa, #dadada); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css 2012-10-17 20:29:56 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css 2012-10-23 10:26:43 +0000 @@ -624,6 +624,50 @@ } /*----------------------------------------------------------------------------*/ +/* Buttons */ +/*----------------------------------------------------------------------------*/ + +.greyButtonLink +{ + padding: 6px 12px; + height: 25px; + border: 1px solid #aaa; + border-radius: 3px; + margin-right: 4px; + font-family: LiberationSansBold, arial; + font-size: 13px; + background-color: #f3f3f3; + color: #606060 !important; + text-decoration: none !important; +} + +.greyButtonLink:hover +{ + text-decoration: none; + background-color: #f8f8f8; +} + +.blueButtonLink +{ + padding: 6px 12px; + height: 25px; + border: 1px solid #3D77B3; + border-radius: 3px; + margin-right: 4px; + font-family: LiberationSansBold, arial; + font-size: 13px; + background-color: #427DB8; + color: #fff !important; + text-decoration: none !important; +} + +.blueButtonLink:hover +{ + text-decoration: none; + background-color: #3674B3; +} + +/*----------------------------------------------------------------------------*/ /* jQuery overrides */ /*----------------------------------------------------------------------------*/ === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js 2012-10-22 16:28:40 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js 2012-10-23 10:26:43 +0000 @@ -33,9 +33,7 @@ $( document ).ready( function() { - Recaptcha.create( "6LcM6tcSAAAAANwYsFp--0SYtcnze_WdYn8XwMMk", "recaptchaDiv", { - callback: Recaptcha.focus_response_field - } ); + Recaptcha.create( "6LcM6tcSAAAAANwYsFp--0SYtcnze_WdYn8XwMMk", "recaptchaDiv" ); $( "#accountForm" ).validate( { rules: validationRules.rules, === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2012-10-11 11:56:28 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2012-10-23 10:26:43 +0000 @@ -15,11 +15,12 @@ }); }); +
-