diff --git a/ckanext/canada/assets/internal/canada_internal.css b/ckanext/canada/assets/internal/canada_internal.css index a1bcb5930..37d72b49e 100644 --- a/ckanext/canada/assets/internal/canada_internal.css +++ b/ckanext/canada/assets/internal/canada_internal.css @@ -617,6 +617,33 @@ body ul.xloader-log li.item.failure > i{ body ul.xloader-log li.item.failure > i::after{ background-color: #B95252 !important; } +#s2id_field-department, +#s2id_field-organizations{ + min-height: 37px !important; +} +#s2id_field-department.select2-container, +#s2id_field-organizations.select2-container{ + vertical-align: initial !important; + width: 100% !important; +} +#s2id_field-department.select2-container, +#s2id_field-department.select2-container .select2-choice, +#s2id_field-department.select2-container .select2-chosen, +#s2id_field-organizations.select2-container, +#s2id_field-organizations.select2-container .select2-choice, +#s2id_field-organizations.select2-container .select2-chosen{ + height: 100% !important; +} +#s2id_field-department.select2-container .select2-choice, +#s2id_field-organizations.select2-container .select2-choice{ + font-size: 16px !important; + line-height: 1.4375 !important; + padding: 6px 12px !important; +} +#s2id_field-department.select2-container .select2-arrow b, +#s2id_field-organizations.select2-container .select2-arrow b{ + background-position-y: -100%; +} /*########################### ## END ## ## CKAN Base CSS Overrides## @@ -674,18 +701,21 @@ body ul.xloader-log li.item.failure > i::after{ pointer-events: none; animation: fade-opacity-in 0.5s ease-in 1s 1 normal forwards; } -.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container{ +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container, +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .recombinant-org-select1-wrapper select{ vertical-align: initial !important; flex: 1; width: auto !important; } .canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container, .canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-choice, -.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-chosen{ +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-chosen, +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .recombinant-org-select1-wrapper select{ height: 100% !important; border-radius: 0 !important; } -.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-choice{ +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-choice, +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .recombinant-org-select1-wrapper select{ background: #335075 !important; border-color: #335075 !important; box-shadow: none !important; @@ -706,6 +736,13 @@ body ul.xloader-log li.item.failure > i::after{ transition-duration: 0.325s !important; color: white !important; } +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .recombinant-org-select1-wrapper{ + width: 100% !important; +} +.canada-pd-org-select-wrapper .recombinant-org-select-wrapper .recombinant-org-select1-wrapper select{ + color: white !important; + width: 100% !important; +} .canada-pd-org-select-wrapper .recombinant-org-select-wrapper .select2-container .select2-arrow{ border-radius: 0 !important; background: #335075 !important; diff --git a/ckanext/canada/schemas/presets.yaml b/ckanext/canada/schemas/presets.yaml index 68ba35204..0d6fb1819 100644 --- a/ckanext/canada/schemas/presets.yaml +++ b/ckanext/canada/schemas/presets.yaml @@ -173,7 +173,7 @@ presets: class: form-control form-select # copied from dataset_organization preset validators: scheming_required string_safe owner_org_validator - form_snippet: organization.html + form_snippet: organization_autocomplete.html # Field = Publisher - Organization Name at Publication (English). # {The organization Title at publication Time} diff --git a/ckanext/canada/templates/recombinant/snippets/org_select.html b/ckanext/canada/templates/recombinant/snippets/org_select.html index 35d674737..02c523421 100644 --- a/ckanext/canada/templates/recombinant/snippets/org_select.html +++ b/ckanext/canada/templates/recombinant/snippets/org_select.html @@ -9,6 +9,8 @@ {% block select_classes %}recombinant-org-select-wrapper{% endblock %} {% block select_field %} + {% set organizations_available = h.organizations_available('create_dataset') %} + {% if organizations_available|length > 12 %} + {% else %} +