diff --git a/tildes/scss/modules/_form.scss b/tildes/scss/modules/_form.scss index 876bda3..c179059 100644 --- a/tildes/scss/modules/_form.scss +++ b/tildes/scss/modules/_form.scss @@ -38,10 +38,6 @@ select.form-select:not([multiple]) { } } -.form-buttons.no-reverse { - flex-direction: row; -} - textarea.form-input { height: 8rem; line-height: 1.5; @@ -78,20 +74,6 @@ textarea.form-input { } } -.form-oneline { - display: flex; - font-size: 0.6rem; - margin-bottom: 0.4rem; - - .form-oneline-item { - flex: 2; - } - - .form-oneline-item-double { - flex: 4; - } -} - .form-search .form-input { margin-right: 0.4rem; } diff --git a/tildes/static/js/behaviors/theme-selector.js b/tildes/static/js/behaviors/theme-selector.js index d1c8383..c05ac2c 100644 --- a/tildes/static/js/behaviors/theme-selector.js +++ b/tildes/static/js/behaviors/theme-selector.js @@ -7,8 +7,7 @@ $.onmount('[data-js-theme-selector]', function() { var new_theme = $(this).val(); var selected_text = $(this).find('option:selected').text(); - var $setDefaultLink = $('#button-set-default-theme'); - var $formDefaultValue = $('#input-set-default-theme'); + var $setDefaultButton = $('#button-set-default-theme'); // persist the new theme for the user in their cookie document.cookie = 'theme=' + new_theme + ';' + @@ -24,19 +23,14 @@ $.onmount('[data-js-theme-selector]', function() { } } - // if a non-default theme was chosen, add the class to the body - if (new_theme) { - $body.addClass('theme-' + new_theme); - } - - // set the IC hidden input with the new value - $formDefaultValue.val(new_theme); + // add the class for the new theme to the body + $body.addClass('theme-' + new_theme); - // set visibility of 'Set as account default' link - if (selected_text.indexOf('(account default)') !== -1) { - $setDefaultLink.css('visibility', 'hidden'); + // set visibility of 'Set as account default' button + if (selected_text.indexOf('account default') === -1) { + $setDefaultButton.removeClass('d-none'); } else { - $setDefaultLink.css('visibility', 'visible'); + $setDefaultButton.addClass('d-none'); } }); }); diff --git a/tildes/tildes/templates/settings.jinja2 b/tildes/tildes/templates/settings.jinja2 index bfe4b5d..1a30236 100644 --- a/tildes/tildes/templates/settings.jinja2 +++ b/tildes/tildes/templates/settings.jinja2 @@ -8,8 +8,16 @@