diff --git a/app/assets/javascripts/utility.js b/app/assets/javascripts/utility.js index 5a0e03172..379dd828f 100644 --- a/app/assets/javascripts/utility.js +++ b/app/assets/javascripts/utility.js @@ -8,11 +8,13 @@ } Danbooru.j_alert = function(title, msg) { - $('
').html(msg).dialog({modal: true}); + this.notice(msg); + // $('').html(msg).dialog({modal: true}); } Danbooru.j_error = function(msg) { - this.j_alert("Error", msg); + this.notice(msg); + // this.j_alert("Error", msg); } Danbooru.ajax_start = function(target) { diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 2b8c56327..9427bfab1 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -10,7 +10,7 @@ module Admin @user = User.find(params[:id]) @user.level = params[:user][:level] @user.save - redirect_to edit_admin_user_path(@user, :notice => "User updated") + redirect_to edit_admin_user_path(@user, :notice => "User updated"), :notice => "User updated" end end end diff --git a/app/models/post_flag.rb b/app/models/post_flag.rb index 34bccd012..38bc6b2b0 100644 --- a/app/models/post_flag.rb +++ b/app/models/post_flag.rb @@ -7,7 +7,7 @@ class PostFlag < ActiveRecord::Base validate :validate_creator_is_not_limited validate :validate_post_is_active before_validation :initialize_creator, :on => :create - validates_uniqueness_of :creator_id, :scope => :post_id, :message => "has already flagged this post" + validates_uniqueness_of :creator_id, :scope => :post_id, :message => "have already flagged this post" before_save :update_post scope :resolved, where("is_resolved = ?", true) scope :unresolved, where("is_resolved = ?", false) diff --git a/config/locales/en.yml b/config/locales/en.yml index 179c14ca5..a1e5d0979 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,3 +3,11 @@ en: hello: "Hello world" + activerecord: + attributes: + post_flag: + creator: "You" + creator_id: "You" + post_vote: + user: "You" + user_id: "You"