From 1ca7df52b7f9ee141516dcf7d17d2524afffbd2b Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 11 Sep 2011 18:20:43 -0400 Subject: [PATCH] fixed default image size for users --- app/assets/stylesheets/application.css.scss | 10 ++++++++++ app/models/user.rb | 2 +- app/views/users/edit.html.erb | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index d1422eb35..9b1ec513e 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -151,6 +151,10 @@ div.prose { } } +fieldset { + margin-bottom: 1em; +} + header { margin: 0 0 1em 0; padding: 0; @@ -187,6 +191,12 @@ input[type=submit]:hover { /* background-color: #F6F6F6;*/ } +legend { + font-size: $h2_size; + font-weight: bold; + margin-bottom: 0.5em; +} + menu { margin: 0; padding: 0; diff --git a/app/models/user.rb b/app/models/user.rb index fd80e28a2..80a8d82cf 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -14,7 +14,7 @@ class User < ActiveRecord::Base end attr_accessor :password, :old_password - attr_accessible :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr, :time_zone + attr_accessible :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr, :time_zone, :default_image_size validates_length_of :name, :within => 2..20, :on => :create validates_format_of :name, :with => /\A[^\s:]+\Z/, :on => :create, :message => "cannot have whitespace or colons" validates_uniqueness_of :name, :case_sensitive => false, :on => :create diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index d06887826..99d30d5c7 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -9,9 +9,9 @@ <%= f.input :receive_email_notifications, :title => "Enable to receive email notification when you receive a DMail" %> <%= f.input :comment_threshold, :title => "Comments below this score will be hidden by default" %> <%= f.input :always_resize_images, :title => "Enable to automatically resize images to fit your browser window" %> - <%= f.input :default_image_size, :title => "Medium shows images resized to #{Danbooru.config.medium_image_width} pixels wide, large is #{Danbooru.config.large_image_width} pixels wide, and original is whatever the original image is", :collection => %w(Medium Large Original) %> - <%= f.input :favorite_tags, :title => "A list of whitespace delimited tags that show up in your profile" %> - <%= f.input :blacklisted_tags, :title => "A list of newline delimited tags that you never want to see" %> + <%= f.input :default_image_size, :title => "Medium shows images resized to #{Danbooru.config.medium_image_width} pixels wide, large is #{Danbooru.config.large_image_width} pixels wide, and original is whatever the original image is", :collection => %w(medium large original) %> + <%= f.input :favorite_tags, :title => "A list of whitespace delimited tags that show up in your profile", :input_html => {:size => "40x5"} %> + <%= f.input :blacklisted_tags, :title => "A list of newline delimited tags that you never want to see", :input_html => {:size => "40x5"} %>