# HG changeset patch # User Mads Kiilerich # Date 2017-06-25 16:47:51 # Node ID ee3343f3658ffa0f8fb138abab9d37d5176027d0 # Parent e77f5cd50f1fc9733ccf56eb8fc5bcc3c0922ead style: drop form-horizontal - our style is much closer to plain Bootstrap forms form-horizontal is made for grid markup. It give form-groups a negative margin to break out of the grid ... but the way we use it for settings, we have to do weird things to undo that. The default styling for forms is much closer to what we want. It looks ok without our custom styling and is easier to style to our style. If we want grid markup with form-horizontal, it would be correct to re-introduce both at once. diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -609,12 +609,12 @@ div.panel.panel-default div.panel-headin color: #4e6100; } -#content div.panel div.form div.form-horizontal div.form-group { +#content div.panel div.form div.form-group { border-bottom: 1px solid #DDD; clear: both; } -#content div.panel div.form div.form-horizontal div.form-group > label { +#content div.panel div.form div.form-group > label { color: #393939; font-weight: 700; } @@ -789,7 +789,7 @@ div.panel.panel-default div.panel-headin position: relative; } -#content div.panel div#summary-panel-body.form div.form-horizontal div.form-group > div { +#content div.panel div#summary-panel-body.form div.form-group > div { margin: 0 0 10px 150px; } @@ -1073,21 +1073,16 @@ a.metatag[data-tag="license"]:hover { #quick_login .links .logout { } -#quick_login div.form div.form-horizontal { - padding-top: 2px; - padding-left: 10px; -} - -#quick_login div.form div.form-horizontal div.form-group { +#quick_login div.form div.form-group { padding: 5px; } -#quick_login div.form div.form-horizontal div.form-group > label { +#quick_login div.form div.form-group > label { color: #fff; padding-bottom: 3px; } -#quick_login div.form div.form-horizontal div.form-group > div input { +#quick_login div.form div.form-group > div input { width: 236px; background: #FFF; border-top: 1px solid #b3b3b3; @@ -1100,7 +1095,7 @@ a.metatag[data-tag="license"]:hover { padding: 5px 7px 4px; } -#quick_login div.form div.form-horizontal div.buttons { +#quick_login div.form div.buttons { clear: both; overflow: hidden; text-align: right; @@ -1139,7 +1134,7 @@ a.metatag[data-tag="license"]:hover { background-color: inherit !important; } -#register div.form div.form-horizontal div.form-group > label { +#register div.form div.form-group > label { width: 135px; float: left; text-align: right; @@ -1147,11 +1142,11 @@ a.metatag[data-tag="license"]:hover { padding: 5px 0 0 5px; } -#register div.form div.form-horizontal div.form-group > div input { +#register div.form div.form-group > div input { width: 300px; } -#register div.form div.form-horizontal div.buttons { +#register div.form div.buttons { border-top: 1px solid #DDD; margin: 0; padding: 10px 0 0 145px; @@ -2342,9 +2337,9 @@ nav.navbar #quick .select2-container .se /* formencode htmlfill adds 'error' to failing input fields */ -#content div.panel div.form div.form-horizontal div.form-group > div input.error, -#login div.form div.form-horizontal div.form-group > div input.error, -#register div.form div.form-horizontal div.form-group > div input.error { +#content div.panel div.form div.form-group > div input.error, +#login div.form div.form-group > div input.error, +#register div.form div.form-group > div input.error { background: #FBE3E4; border-top: 1px solid #e1b2b3; border-left: 1px solid #e1b2b3; @@ -2353,9 +2348,9 @@ nav.navbar #quick .select2-container .se } /* formencode htmlfill injects 'error-message' */ -#content div.panel div.form div.form-horizontal div.form-group span.error-message, -#login div.form div.form-horizontal div.form-group span.error-message, -#register div.form div.form-horizontal div.form-group span.error-message { +#content div.panel div.form div.form-group span.error-message, +#login div.form div.form-group span.error-message, +#register div.form div.form-group span.error-message { display: inline-block; color: red; margin: 4px 0 0; @@ -2366,38 +2361,38 @@ nav.navbar #quick .select2-container .se margin: 0; } -#content div.panel div.form div.form-horizontal div.form-group > div { +#content div.panel div.form div.form-group > div { margin: 0 0 10px 200px; } -#content div.panel div.form div.form-horizontal div.form-group > div a:hover, -#content div.panel div.form div.form-horizontal div.form-group > div a.ui-selectmenu:hover, +#content div.panel div.form div.form-group > div a:hover, +#content div.panel div.form div.form-group > div a.ui-selectmenu:hover, #content div.panel div.action a:hover { color: #000; text-decoration: none; } -#content div.panel div.form div.form-horizontal div.form-group > div a.ui-selectmenu-focus, +#content div.panel div.form div.form-group > div a.ui-selectmenu-focus, #content div.panel div.action a.ui-selectmenu-focus { border: 1px solid #666; } -div.form div.form-horizontal div.form-group div.button input, -#content div.panel div.form div.form-horizontal div.buttons input, -div.form div.form-horizontal div.buttons input, +div.form div.form-group div.button input, +#content div.panel div.form div.buttons input, +div.form div.buttons input, #content div.panel div.action div.button input { font-size: 11px; font-weight: 700; margin: 0; } -div.form div.form-horizontal div.form-group div.highlight, -#content div.panel div.form div.form-horizontal div.buttons div.highlight { +div.form div.form-group div.highlight, +#content div.panel div.form div.buttons div.highlight { display: inline; } -#content div.panel div.form div.form-horizontal div.buttons, -div.form div.form-horizontal div.buttons { +#content div.panel div.form div.buttons, +div.form div.buttons { margin: 10px 10px 0 200px; padding: 0; } @@ -2421,7 +2416,7 @@ div.form div.form-horizontal div.buttons padding: 0; } -#register div.form div.form-horizontal div.form-group span.error-message { +#register div.form div.form-group span.error-message { height: 1%; display: block; color: red; diff --git a/kallithea/templates/admin/auth/auth_settings.html b/kallithea/templates/admin/auth/auth_settings.html --- a/kallithea/templates/admin/auth/auth_settings.html +++ b/kallithea/templates/admin/auth/auth_settings.html @@ -25,7 +25,6 @@ ## enabled auth plugins

${_('Authentication Plugins')}

-
@@ -48,12 +47,10 @@
-
%for cnt, module in enumerate(c.enabled_plugin_names): <% pluginName = c.plugin_shortnames[module] %>

${_('Plugin')}: ${pluginName}

-
## autoform generation, based on plugin definition from it's settings %for setting in c.plugin_settings[module]: <% fullsetting = "auth_%s_%s" % (pluginName, setting["name"]) %> @@ -98,15 +95,12 @@
%endif %endfor - %endfor -
${h.submit('save',_('Save'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/defaults/defaults.html b/kallithea/templates/admin/defaults/defaults.html --- a/kallithea/templates/admin/defaults/defaults.html +++ b/kallithea/templates/admin/defaults/defaults.html @@ -23,8 +23,6 @@ ${h.form(url('defaults_update', id='defaults'))}
-
-
@@ -69,7 +67,6 @@ ${h.submit('save',_('Save'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/my_account/my_account_api_keys.html b/kallithea/templates/admin/my_account/my_account_api_keys.html --- a/kallithea/templates/admin/my_account/my_account_api_keys.html +++ b/kallithea/templates/admin/my_account/my_account_api_keys.html @@ -52,7 +52,6 @@
${h.form(url('my_account_api_keys'), method='post')}
-
@@ -74,7 +73,6 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/my_account/my_account_emails.html b/kallithea/templates/admin/my_account/my_account_emails.html --- a/kallithea/templates/admin/my_account/my_account_emails.html +++ b/kallithea/templates/admin/my_account/my_account_emails.html @@ -35,7 +35,6 @@
${h.form(url('my_account_emails'), method='post')}
-
@@ -48,7 +47,6 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()}
diff --git a/kallithea/templates/admin/my_account/my_account_password.html b/kallithea/templates/admin/my_account/my_account_password.html --- a/kallithea/templates/admin/my_account/my_account_password.html +++ b/kallithea/templates/admin/my_account/my_account_password.html @@ -4,7 +4,6 @@ ${h.form(url('my_account_password'), method='post')}
-
@@ -32,7 +31,6 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/my_account/my_account_profile.html b/kallithea/templates/admin/my_account/my_account_profile.html --- a/kallithea/templates/admin/my_account/my_account_profile.html +++ b/kallithea/templates/admin/my_account/my_account_profile.html @@ -1,6 +1,5 @@ ${h.form(url('my_account'), method='post')}
-
@@ -49,6 +48,5 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/permissions/permissions_globals.html b/kallithea/templates/admin/permissions/permissions_globals.html --- a/kallithea/templates/admin/permissions/permissions_globals.html +++ b/kallithea/templates/admin/permissions/permissions_globals.html @@ -1,6 +1,5 @@ ${h.form(url('admin_permissions'), method='post')}
-
@@ -96,6 +95,5 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/permissions/permissions_ips.html b/kallithea/templates/admin/permissions/permissions_ips.html --- a/kallithea/templates/admin/permissions/permissions_ips.html +++ b/kallithea/templates/admin/permissions/permissions_ips.html @@ -21,7 +21,6 @@ ${h.form(url('edit_user_ips_update', id=c.user.user_id))}
-
@@ -35,6 +34,5 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/repo_groups/repo_group_add.html b/kallithea/templates/admin/repo_groups/repo_group_add.html --- a/kallithea/templates/admin/repo_groups/repo_group_add.html +++ b/kallithea/templates/admin/repo_groups/repo_group_add.html @@ -24,7 +24,6 @@ ${h.form(url('repos_groups'))}
-
@@ -59,7 +58,6 @@ ${h.submit('save',_('Save'),class_="btn btn-default")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html b/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html --- a/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html +++ b/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html @@ -1,7 +1,6 @@ ## -*- coding: utf-8 -*- ${h.form(url('update_repos_group',group_name=c.repo_group.group_name))}
-
@@ -37,19 +36,16 @@ ${h.reset('reset',_('Reset'),class_="btn btn-default")}
-
${h.end_form()} ${h.form(url('delete_repo_group', group_name=c.repo_group.group_name))}
-
${h.submit('remove_%s' % c.repo_group.group_name,_('Remove this group'),class_="btn btn-danger",onclick="return confirm('"+_('Confirm to delete this group')+"');")}
-
${h.end_form()} diff --git a/kallithea/templates/admin/repos/repo_add_base.html b/kallithea/templates/admin/repos/repo_add_base.html --- a/kallithea/templates/admin/repos/repo_add_base.html +++ b/kallithea/templates/admin/repos/repo_add_base.html @@ -2,7 +2,6 @@ ${h.form(url('repos'))}
-
@@ -65,7 +64,6 @@ ${h.submit('add',_('Add'),class_="btn btn-default")}
-