+
- <%= 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') %>
-
-
-
- <%= render partial: 'shibboleth_ds_list', locals: {orgs: @orgs} %>
-
-
-
-
- <%= _('Institution not a DMPTool partner?') %> <%= _('Create an account with any email address')%>
-
<% end %>
+
+
+
+ <% if @orgs.count > 2 %>
+ <% if @orgs.count > 3 %>
+ <% one_third = @orgs.count / 3 %>
+
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'three', orgs: @orgs,
+ column_start: 0, column_end: (one_third - 1)} %>
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'three', orgs: @orgs,
+ column_start: one_third, column_end: ((one_third * 2) - 1)} %>
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'three', orgs: @orgs,
+ column_start: (one_third * 2), column_end: @orgs.count} %>
+
+ <% else %>
+ <% one_half = @orgs.count / 2 %>
+
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'two', orgs: @orgs,
+ column_start: 0, column_end: (one_half - 1)} %>
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'two', orgs: @orgs,
+ column_start: one_half, column_end: @orgs.count} %>
+
+ <% end %>
+
+ <% else %>
+ <%= render partial: 'shibboleth_ds_list',
+ locals: {column_count: 'one', orgs: @orgs,
+ column_start: 0, column_end: @orgs.count} %>
+ <% 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