Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3091 shib ui #3126

Merged
merged 5 commits into from
May 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ user.updatePassword.password=Create a password that is minimum six characters lo
authenticationProvidersAvailable.tip={0}There are no active authentication providers{1}If you are a system administrator, please enable one using the API.{2}If you are not a system administrator, please contact the one for your institution.
login.System=Login System
login.forgot.text=Forgot your password?
login.builtin=Dataverse Account Log In
login.institution=Institutional Log In
login.builtin=Dataverse Account
login.institution=Institutional Account
login.institution.blurb=Use Dataverse with your institutional log in instead of creating an account. <a href="{0}/{1}/user/account.html" target="_blank">Learn More</a>.
login.institution.support.beforeLink=Leaving your institution? Please contact
login.institution.support.afterLink=for assistance.
Expand Down
122 changes: 66 additions & 56 deletions src/main/webapp/loginpage.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,61 +34,70 @@
</div>
</ui:fragment>
<div id="login-container" class="row">
<div id="builtinColumn" class="col-md-6" jsf:rendered="#{LoginPage.authenticationProvidersAvailable}">
<h2 style="margin-top:0;" jsf:rendered="#{systemConfig.shibEnabled == true}">#{bundle['login.builtin']}</h2>
<h:form id="loginForm" styleClass="form-horizontal">
<p:focus context="loginForm"/>
<ui:remove>
<ui:fragment rendered="#{LoginPage.multipleProvidersAvailable}">
<div class="form-group text-left">
<label class="col-sm-4 control-label" for="loginSystemSelect">
#{bundle['login.System']}
</label>
<div class="col-sm-8">
<h:selectOneMenu id="loginSystemSelect" styleClass="form-control" value="#{LoginPage.credentialsAuthProviderId}">
<f:selectItems value="#{LoginPage.listCredentialsAuthenticationProviders()}" var="ap"
itemLabel="#{ap.title}" itemValue="#{ap.id}" />
<f:ajax render="@all" listener="#{LoginPage.resetFilledCredentials}"/>
</h:selectOneMenu>

<div class="panel panel-default highlight #{systemConfig.shibEnabled ? 'col-md-12' : 'col-md-6'}">
<div class="panel-body row">

<div id="builtinColumn" class="#{systemConfig.shibEnabled ? 'col-md-5' : 'col-md-12'}" jsf:rendered="#{LoginPage.authenticationProvidersAvailable}">
<h2 class="no-margin-top" jsf:rendered="#{systemConfig.shibEnabled == true}">#{bundle['login.builtin']}</h2>
<h:form id="loginForm" styleClass="form-horizontal">
<p:focus context="loginForm"/>
<ui:remove>
<ui:fragment rendered="#{LoginPage.multipleProvidersAvailable}">
<div class="form-group text-left">
<label class="col-sm-4 control-label" for="loginSystemSelect">
#{bundle['login.System']}
</label>
<div class="col-sm-8">
<h:selectOneMenu id="loginSystemSelect" styleClass="form-control" value="#{LoginPage.credentialsAuthProviderId}">
<f:selectItems value="#{LoginPage.listCredentialsAuthenticationProviders()}" var="ap"
itemLabel="#{ap.title}" itemValue="#{ap.id}" />
<f:ajax render="@all" listener="#{LoginPage.resetFilledCredentials}"/>
</h:selectOneMenu>
</div>
</div>
</ui:fragment>
</ui:remove>
<ui:repeat id="credentialsContainer2" value="#{LoginPage.filledCredentials}" var="fc">
<div class="form-group text-left">
<label class="col-sm-4 control-label" for="credValue">
#{fc.credential.title}
</label>
<div class="col-sm-8">
<h:inputText rendered="#{not fc.credential.secret}" value="#{fc.value}" id="credValue" styleClass="form-control"/>
<p:message rendered="#{not fc.credential.secret}" for="credValue" display="text"/>
<h:inputSecret rendered="#{fc.credential.secret}" value="#{fc.value}" id="sCredValue" styleClass="form-control"/>
<p:message rendered="#{not fc.credential.secret}" for="sCredValue" display="text"/>
</div>
</div>
</ui:repeat>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-9 button-block">
<p:commandButton id="login" value="#{bundle.login}" update="@all" action="#{LoginPage.login}"/>
<p:button value="#{bundle.cancel}" outcome="/dataverse.xhtml?alias=#{dataverseServiceBean.findRootDataverse().alias}"/>
</div>
</div>
</ui:fragment>
</ui:remove>
<ui:repeat id="credentialsContainer2" value="#{LoginPage.filledCredentials}" var="fc">
<div class="form-group text-left">
<label class="col-sm-4 control-label" for="credValue">
#{fc.credential.title}
</label>
<div class="col-sm-8">
<h:inputText rendered="#{not fc.credential.secret}" value="#{fc.value}" id="credValue" styleClass="form-control"/>
<p:message rendered="#{not fc.credential.secret}" for="credValue" display="text"/>
<h:inputSecret rendered="#{fc.credential.secret}" value="#{fc.value}" id="sCredValue" styleClass="form-control"/>
<p:message rendered="#{not fc.credential.secret}" for="sCredValue" display="text"/>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-9">
<a href="passwordreset.xhtml">
#{bundle['login.forgot.text']}
</a>
</div>
</div>
</div>
</ui:repeat>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-9 button-block">
<p:commandButton id="login" value="#{bundle.login}" update="@all" action="#{LoginPage.login}"/>
<p:button value="#{bundle.cancel}" outcome="/dataverse.xhtml?alias=#{dataverseServiceBean.findRootDataverse().alias}"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-9">
<a href="passwordreset.xhtml">
#{bundle['login.forgot.text']}
</a>
</div>
</h:form>
</div>
</h:form>
</div>
<div class="col-md-6" jsf:rendered="#{systemConfig.shibEnabled == true}">
<div class="panel panel-default highlight">
<div class="panel-body">
<h2 style="margin-top:0;">#{bundle['login.institution']}</h2>
<p class="help-block">
<h:form>
<h:outputFormat value="#{bundle['login.institution.blurb']} " escape="false">

<div class="col-md-1" jsf:rendered="#{systemConfig.shibEnabled == true}">&#160;</div>

<div class="col-md-6" jsf:rendered="#{systemConfig.shibEnabled == true}">
<h2 class="no-margin-top">#{bundle['login.institution']}</h2>

<div id="idpSelect" class="margin-bottom"></div>

<h:form>
<p class="help-block">
<span class="glyphicon glyphicon-info-sign"/>
<h:outputFormat value=" #{bundle['login.institution.blurb']} " escape="false">
<f:param value="#{settingsWrapper.guidesBaseUrl}"/>
<f:param value="#{systemConfig.version}"/>
</h:outputFormat>
Expand All @@ -99,11 +108,10 @@
<f:setPropertyActionListener target="#{sendFeedbackDialog.userMessage}" value=""/>
<f:setPropertyActionListener target="#{sendFeedbackDialog.userEmail}" value=""/>
</p:commandLink>
<h:outputText value=" #{bundle['login.institution.support.afterLink']}" escape="false"/>
</h:form>
</p>

<div id="idpSelect"></div>
<h:outputText value=" #{bundle['login.institution.support.afterLink']}" escape="false"/>
</p>
</h:form>

<script type="text/javascript">
// TODO: get this working for https://github.com/IQSS/dataverse/issues/1551
//shibRedirectPage = '?redirectPage=' + '#{LoginPage.redirectPage}';
Expand Down Expand Up @@ -136,9 +144,11 @@
<!--<a href="http://federation.org/DS/DS?entityID=https%3A%2F%2FyourentityId.edu.edu%2Fshibboleth&return=https%3A%2F%2Fyourreturn.edu%2FShibboleth.sso%2FDS%3FSAMLDS%3D1%26target%3Dhttps%3A%2F%2Fyourreturn.edu%2F">this link</a>.-->
</noscript>
</div>

</div>
</div>
</div>

</ui:define>
</ui:composition>
</h:body>
Expand Down
20 changes: 9 additions & 11 deletions src/main/webapp/resources/css/structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ td.col-select-width {width:36px;}
.margin-top-half {margin-top:.5em;}
.margin-bottom {margin-bottom:1em;}
.margin-bottom-half {margin-bottom:.5em;}
.no-margin-top {margin-top:0;}
.no-margin-bottom {margin-bottom:0;}
.padding-12 {padding: 12px;}
.clear-both {clear:both;}
Expand Down Expand Up @@ -226,16 +227,14 @@ div.panel.highlight {
}
#idpSelectIdPListTile form, #idpSelectIdPEntryTile form {margin-bottom:1em;}
#idpSelectIdPListTile input.btn, #idpSelectIdPEntryTile input.btn {margin-left:.5em;}

#idpSelectIdPEntryTile {position: relative;}

.IdPSelectPreferredIdPButton {display:inline-block;text-align:center;margin-right:4px;margin-bottom:.5em;}
ul.IdPSelectDropDown {
background-clip: padding-box;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176);
/* display: none;*/
float: left;
font-size: 14px;
left: 0;
Expand All @@ -245,36 +244,35 @@ ul.IdPSelectDropDown {
padding: 5px 0;
position: absolute;
text-align: left;
/*top: 100%;*/
bottom:-22px;
top: calc(100% - 32px);
z-index: 1000;
}

ul.IdPSelectDropDown > li > a {
ul.IdPSelectDropDown > li {
clear: both;
color: #333;
display: block;
/* display: block; */
font-weight: 400;
line-height: 1.42857;
padding: 3px 20px;
white-space: nowrap;
}

ul.IdPSelectDropDown > li > a:hover, ul.IdPSelectDropDown > li > a:focus {
ul.IdPSelectDropDown > li:hover, ul.IdPSelectDropDown > li:focus {
background-color: #f5f5f5;
color: #262626;
text-decoration: none;
}
ul.IdPSelectDropDown > .active > a, ul.IdPSelectDropDown > .active > a:hover, ul.IdPSelectDropDown > .active > a:focus {
ul.IdPSelectDropDown > li.active, ul.IdPSelectDropDown > li.active:hover, ul.IdPSelectDropDown > li.active:focus {
background-color: #428bca;
color: #fff;
outline: 0 none;
text-decoration: none;
}
ul.IdPSelectDropDown > .disabled > a, ul.IdPSelectDropDown > .disabled > a:hover, ul.IdPSelectDropDown > .disabled > a:focus {
ul.IdPSelectDropDown > li.disabled, ul.IdPSelectDropDown > li.disabled:hover, ul.IdPSelectDropDown > li.disabled:focus {
color: #777;
}
ul.IdPSelectDropDown > .disabled > a:hover, ul.IdPSelectDropDown > .disabled > a:focus {
ul.IdPSelectDropDown > li.disabled:hover, ul.IdPSelectDropDown > li.disabled:focus {
background-color: transparent;
background-image: none;
cursor: not-allowed;
Expand Down
Loading