From bd9cb907020bb7b4814d750714e0a67180f48fc1 Mon Sep 17 00:00:00 2001 From: futa-ikeda Date: Tue, 16 Sep 2025 18:30:41 -0400 Subject: [PATCH 1/3] Update institution login page --- .../OsfInstitutionLoginPreparationAction.java | 2 +- src/main/resources/messages.properties | 4 +- src/main/resources/static/css/cas.css | 8 +++- src/main/resources/static/images/email.svg | 3 ++ .../templates/casInstitutionLoginView.html | 44 +++++++------------ 5 files changed, 28 insertions(+), 33 deletions(-) create mode 100644 src/main/resources/static/images/email.svg diff --git a/src/main/java/io/cos/cas/osf/web/flow/login/OsfInstitutionLoginPreparationAction.java b/src/main/java/io/cos/cas/osf/web/flow/login/OsfInstitutionLoginPreparationAction.java index 56e5dc29..142b1785 100644 --- a/src/main/java/io/cos/cas/osf/web/flow/login/OsfInstitutionLoginPreparationAction.java +++ b/src/main/java/io/cos/cas/osf/web/flow/login/OsfInstitutionLoginPreparationAction.java @@ -94,7 +94,7 @@ protected Event doExecute(RequestContext context) { if (institutionId != null) { institutionLoginUrlMapSorted = institutionLoginUrlMap; } else { - institutionLoginUrlMap.put("", " -- select an institution -- "); + institutionLoginUrlMap.put("", " Select institution "); institutionLoginUrlMapSorted = OsfInstitutionUtils.sortByValue(institutionLoginUrlMap); } context.getFlowScope().put("institutions", institutionLoginUrlMapSorted); diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 697591fa..60245f3b 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -608,12 +608,12 @@ screen.institutionlogin.title=Institution SSO screen.institutionlogin.heading=Sign in through your institution screen.institutionlogin.message.select=If your institution has partnered with OSF, please select its name below and sign in with your institutional credentials. If you do not currently have an OSF account, this will create one for you. screen.institutionlogin.message.auto=Your institution has partnered with OSF. Please continue to sign in with your institutional credentials. If you do not currently have an OSF account, this will create one for you. -screen.institutionlogin.heading.select=Select your institution +screen.institutionlogin.heading.select=Your institution screen.institutionlogin.heading.auto=Your institution screen.institutionlogin.link.select=Not your institution? screen.institutionlogin.link.unsupported=I can't find my institution screen.institutionlogin.button.submit=Sign in -screen.institutionlogin.osf=Sign in with your OSF account +screen.institutionlogin.osf=Sign in with email # # Unsupported Institution # diff --git a/src/main/resources/static/css/cas.css b/src/main/resources/static/css/cas.css index 82b14def..75097f81 100644 --- a/src/main/resources/static/css/cas.css +++ b/src/main/resources/static/css/cas.css @@ -453,7 +453,7 @@ button.close { color: var(--cas-theme-primary, #153e50); } -.mdc-button--raised:not(:disabled) { +.mdc-button--raised { background-color: transparent; font-weight: bold; } @@ -819,6 +819,12 @@ body { &:hover { background-color: var(--cas-theme-osf-blue-hover, #0089ff); } + + &:disabled { + opacity: 0.6; + background-color: var(--cas-theme-osf-blue, #337ab7) !important; /* override mdc styles */ + color: white; + } } .form-button .button-osf-red, diff --git a/src/main/resources/static/images/email.svg b/src/main/resources/static/images/email.svg new file mode 100644 index 00000000..367c0cf5 --- /dev/null +++ b/src/main/resources/static/images/email.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main/resources/templates/casInstitutionLoginView.html b/src/main/resources/templates/casInstitutionLoginView.html index 51f47568..e09fd549 100644 --- a/src/main/resources/templates/casInstitutionLoginView.html +++ b/src/main/resources/templates/casInstitutionLoginView.html @@ -14,23 +14,7 @@