diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.js index 531671a3af..43a7093052 100644 --- a/frontend_tests/node_tests/settings_org.js +++ b/frontend_tests/node_tests/settings_org.js @@ -108,12 +108,7 @@ function simulate_realm_domains_table() { } function test_realms_domain_modal(add_realm_domain) { - var info = $.create('domains-info-stub'); - - $('#realm_domains_modal').set_find_results( - '.realm_domains_info', - info - ); + var info = $('.realm_domains_info'); $('#add-realm-domain-widget').set_find_results( '.new-realm-domain', @@ -410,7 +405,7 @@ function test_change_allow_subdomains(change_allow_subdomains) { stopPropagation: noop, }; - var info = $.create('realm-domain-info-stub'); + var info = $('.realm_domains_info'); var domain = 'example.com'; var allow = true; @@ -423,11 +418,6 @@ function test_change_allow_subdomains(change_allow_subdomains) { error_callback = req.error; }; - $('#realm_domains_modal').set_find_results( - '.realm_domains_info', - info - ); - var domain_obj = $.create('domain object'); domain_obj.text(domain); diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 707daad16b..e732e13326 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -689,7 +689,7 @@ function _set_up() { $("#realm_domains_table").on("click", ".delete_realm_domain", function () { var domain = $(this).parents("tr").find(".domain").text(); var url = "/json/realm/domains/" + domain; - var realm_domains_info = $("#realm_domains_modal").find(".realm_domains_info"); + var realm_domains_info = $(".realm_domains_info"); channel.del({ url: url, @@ -703,7 +703,7 @@ function _set_up() { }); $("#submit-add-realm-domain").click(function () { - var realm_domains_info = $("#realm_domains_modal").find(".realm_domains_info"); + var realm_domains_info = $(".realm_domains_info"); var widget = $("#add-realm-domain-widget"); var domain = widget.find(".new-realm-domain").val(); var allow_subdomains = widget.find(".new-realm-domain-allow-subdomains").prop("checked"); @@ -728,7 +728,7 @@ function _set_up() { $("#realm_domains_table").on("change", ".allow-subdomains", function (e) { e.stopPropagation(); - var realm_domains_info = $("#realm_domains_modal").find(".realm_domains_info"); + var realm_domains_info = $(".realm_domains_info"); var domain = $(this).parents("tr").find(".domain").text(); var allow_subdomains = $(this).prop('checked'); var url = '/json/realm/domains/' + domain; diff --git a/static/styles/app_components.css b/static/styles/app_components.css index cddeeaa596..3a6badf619 100644 --- a/static/styles/app_components.css +++ b/static/styles/app_components.css @@ -296,6 +296,7 @@ .new-style input[type=text] { border-radius: 5px; box-shadow: none; + margin: 0px; } .clear_search_button:hover { diff --git a/static/styles/settings.css b/static/styles/settings.css index 28537526fe..a4f9697181 100644 --- a/static/styles/settings.css +++ b/static/styles/settings.css @@ -336,6 +336,15 @@ input[type=checkbox] + .inline-block { margin-left: 10px; } +.allow-subdomains, +.new-realm-domain-allow-subdomains { + margin: 0 !important; +} + +.realm_domains_info { + margin-bottom: 0px; +} + .admin-realm-form h3 { margin-bottom: 0px; } diff --git a/static/templates/settings/admin-realm-domains-list.handlebars b/static/templates/settings/admin-realm-domains-list.handlebars index d699aee057..c70c9d0e0d 100644 --- a/static/templates/settings/admin-realm-domains-list.handlebars +++ b/static/templates/settings/admin-realm-domains-list.handlebars @@ -1,7 +1,13 @@ {{#with realm_domain}}