# HG changeset patch # User Marcin Kuzminski # Date 2018-11-28 12:41:53 # Node ID 19ce6eb404c447d4c6bcc5b20e95915fda0db4ac # Parent be2709fe3e63a04ee55ffa6113440583813aa5a7 auth-plugins, ui: added some tweeks to the ui - make select2 code generic independent of number of fields - decrease large inputs to fit our container width. diff --git a/rhodecode/public/css/main-content.less b/rhodecode/public/css/main-content.less --- a/rhodecode/public/css/main-content.less +++ b/rhodecode/public/css/main-content.less @@ -196,6 +196,16 @@ .text-as-placeholder { padding-top: @input-padding-px + @border-thickness-inputs; } + + .no-border { + border: 1px; + } + + .no-horizontal-padding { + padding-left: 0; + padding-right: 0; + } + } // TODO: johbo: Try to find a better integration of this bit. diff --git a/rhodecode/public/css/variables.less b/rhodecode/public/css/variables.less --- a/rhodecode/public/css/variables.less +++ b/rhodecode/public/css/variables.less @@ -125,7 +125,7 @@ @label-summary-minwidth: 80px; @search-form-width: 400px; @fields-input-m: 400px; -@fields-input-l: 750px; +@fields-input-l: 720px; // BUTTONS @button-padding: .9em; diff --git a/rhodecode/templates/admin/auth/plugin_settings.mako b/rhodecode/templates/admin/auth/plugin_settings.mako --- a/rhodecode/templates/admin/auth/plugin_settings.mako +++ b/rhodecode/templates/admin/auth/plugin_settings.mako @@ -65,7 +65,7 @@ %elif node.widget == "bool":
${h.checkbox(node.name, True, checked=defaults.get(node.name))}
%elif node.widget == "select": - ${h.select(node.name, defaults.get(node.name), node.validator.choices)} + ${h.select(node.name, defaults.get(node.name), node.validator.choices, class_="select2AuthSetting")} %elif node.widget == "textarea":
${h.textarea(node.name, defaults.get(node.name), rows=10)}
%elif node.widget == "readonly": @@ -113,12 +113,9 @@ dropdownCssClass: 'drop-menu-dropdown', dropdownAutoWidth: true, minimumResultsForSearch: -1 - }; - $("#tls_kind").select2(select2Options); - $("#tls_reqcert").select2(select2Options); - $("#search_scope").select2(select2Options); - $("#group_extraction_type").select2(select2Options); - $("#admin_groups_sync").select2(select2Options); + }; + $('.select2AuthSetting').select2(select2Options); + });