diff --git a/app/views/orgs/_shibboleth_ds_list.html.erb b/app/views/orgs/_shibboleth_ds_list.html.erb index c4c59a7..c988088 100644 --- a/app/views/orgs/_shibboleth_ds_list.html.erb +++ b/app/views/orgs/_shibboleth_ds_list.html.erb @@ -1,14 +1,14 @@ -
- <% letter = '' %> +<% letter = '' %> + +
-
\ No newline at end of file +
diff --git a/app/views/orgs/shibboleth_ds.html.erb b/app/views/orgs/shibboleth_ds.html.erb index f1522af..8b2c55e 100644 --- a/app/views/orgs/shibboleth_ds.html.erb +++ b/app/views/orgs/shibboleth_ds.html.erb @@ -5,41 +5,86 @@
<%= form_for 'shibboleth_ds', url: shibboleth_ds_path, html: {class: "shibboleth-ds-form roadmap-form"} do |f| %>
- +
+ - <%= render partial: "shared/accessible_combobox", - locals: {name: 'org_name', - id: 'org_name', - default_selection: nil, - models: @orgs, - attribute: 'name', - classes: 'fixed-width-large'} %> + <% if @orgs.count <= 2 %> + + + <% else %> + <%= render partial: "shared/accessible_combobox", + locals: {name: 'org_name', + id: 'org_name', + default_selection: nil, + models: @orgs, + attribute: 'name', + classes: 'fixed-width-large'} %> + <% end %> + + <%= render partial: 'shared/accessible_submit_button', + locals: {id: 'submit-button', + val: _('Go'), + disabled_initially: true, + classes: 'small-input-button', + tooltip: _('Select an institution.'), + classes: 'inline left-indent'} %> - <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'submit-button', - val: _('Go'), - disabled_initially: true, - classes: 'small-input-button', - tooltip: _('Select an institution.'), - classes: 'inline'} %> + <% if @orgs.count > 2 %> +

+ - <%= _('or') %> - +
+ <%= _('See the full list of partner institutions') %> +

+ <% end %> -

- - <%= _('or') %> - -
- <%= _('See the full list of partner institutions') %> -

- - - -
- -

- <%= _('Institution not a DMPTool partner?') %> <%= _('Create an account with any email address')%> -

<% end %> + + + +
+ +

+ <%= _('Institution not a DMPTool partner?') %> <%= _('Create an account with any email address')%> +

diff --git a/lib/assets/javascripts/orgs/shibboleth_ds.js b/lib/assets/javascripts/orgs/shibboleth_ds.js index aae05ec..2537ab6 100644 --- a/lib/assets/javascripts/orgs/shibboleth_ds.js +++ b/lib/assets/javascripts/orgs/shibboleth_ds.js @@ -1,16 +1,20 @@ $(document).ready(function(){ // If the hidden valid-form field is set to true then enable the submit button - $("#org_id").change(function(){ - $(this).siblings(".form-submit").attr('aria-disabled', $(this).val() === ""); + $("#org_name, #org_id").change(function(){ + if($(this).prop('tagName') === 'select'){ + $(this).siblings(".form-submit").attr('aria-disabled', $(this).children(':selected').attr('id') === ""); + }else{ + $(this).siblings(".form-submit").attr('aria-disabled', $("#org_id").val() === ""); + } }); $("#show_list").click(function(e){ e.preventDefault(); if($("#full_list").css("display") == "none"){ - $("#full_list").show(); + $("#full_list").attr('aria-hidden', 'false').show(); $(this).html(__('Hide list')); }else{ - $("#full_list").hide(); + $("#full_list").attr('aria-hidden', 'true').hide(); $(this).html(__('See the full list of partner institutions')); } }); diff --git a/lib/assets/stylesheets/roadmap-form.scss b/lib/assets/stylesheets/roadmap-form.scss index c1ad078..e88a71ac 100644 --- a/lib/assets/stylesheets/roadmap-form.scss +++ b/lib/assets/stylesheets/roadmap-form.scss @@ -133,7 +133,6 @@ /* Accessible Form Buttons */ input.form-submit { - clear: both; background-color: $primary-color; color: $reverse-text; padding: 4px 12px; @@ -405,4 +404,45 @@ #shibboleth-ds { width: 50%; +} + +/* Shibboleth Custom Discovery Service form */ +/* ------------------------------------------------ */ +form.shibboleth-ds-form { + width: 55%; + + select { + width: 85%; + } + + input.form-submit { + margin-top: 0; + margin-bottom: 15px; + } +} + +div.three-column, div.two-column, div.one-column { + display: inline-block; + vertical-align: top; + + ul li { + margin-top: 5px; + margin-bottom: 5px; + } + + ul li.separator { + background-color: $medium-grey; + color: $white; + font-weight: bold; + padding: 4px 12px; + } +} +div.three-column { + width: 31%; +} +div.two-column { + width: 47%; +} +div.one-column { + width: 95%; } \ No newline at end of file diff --git a/lib/assets/stylesheets/roadmap.scss b/lib/assets/stylesheets/roadmap.scss index 5ee4674..d52d951 100644 --- a/lib/assets/stylesheets/roadmap.scss +++ b/lib/assets/stylesheets/roadmap.scss @@ -82,17 +82,3 @@ margin-bottom: 20px; table-layout: fixed; } - -div.three-column { - ul li { - margin-top: 5px; - margin-bottom: 5px; - } - - ul li.separator { - background-color: $medium-grey; - color: $white; - font-weight: bold; - padding: 4px 12px; - } -} \ No newline at end of file