muck-users 0.3.18 → 0.3.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.18
1
+ 0.3.19
@@ -106,8 +106,16 @@ class Muck::UsersController < ApplicationController
106
106
  end
107
107
  end
108
108
  respond_to do |format|
109
- format.html { render :text => result }
110
- format.js { render :text => result }
109
+ if ! @user.errors.on(:login) && ! result.blank?
110
+ format.html { render :partial => 'users/available', :locals => { :message => result } }
111
+ format.js { render :partial => 'users/available', :locals => { :message => result } }
112
+ else
113
+ format.html { render :partial => 'users/unavailable', :locals => { :message => result } }
114
+ format.js { render :partial => 'users/unavailable', :locals => { :message => result } }
115
+ end
116
+
117
+ #format.html { render :text => result }
118
+ #format.js { render :text => result }
111
119
  end
112
120
  end
113
121
 
@@ -126,10 +134,24 @@ class Muck::UsersController < ApplicationController
126
134
  else
127
135
  recover_password_prompt = render_to_string :partial => 'users/recover_password_via_email_link', :locals => { :email => params[:user_email] }
128
136
  result = t('muck.users.email_not_available', :reset_password_help => recover_password_prompt)
137
+ respond_to do |format|
138
+ format.html { render :partial => 'users/unavailable', :locals => { :message => result } }
139
+ format.js { render :partial => 'users/unavailable', :locals => { :message => result } }
140
+
141
+ end
142
+ return
129
143
  end
130
144
  respond_to do |format|
131
- format.html { render :text => result }
132
- format.js { render :text => result }
145
+ if errors.blank? && ! result.nil?
146
+ format.html { render :partial => 'users/available', :locals => { :message => result } }
147
+ format.js { render :partial => 'users/available', :locals => { :message => result } }
148
+ else
149
+ format.html { render :partial => 'users/unavailable', :locals => { :message => result } }
150
+ format.js { render :partial => 'users/unavailable', :locals => { :message => result } }
151
+ end
152
+
153
+ #format.html { render :text => result }
154
+ #format.js { render :text => result }
133
155
  end
134
156
  end
135
157
 
@@ -0,0 +1 @@
1
+ <span class="available"><%= message %></span>
@@ -10,12 +10,12 @@
10
10
  <% end -%>
11
11
 
12
12
  <%= f.text_field :login, { :label => t('muck.users.choose_member_name'),
13
- :extra_html => '<span id="username-availibility" class="availability"></span>',
13
+ :extra_html => '',
14
14
  :tip => t('muck.users.username_help'),
15
15
  :required_label => t('muck.users.username') } -%>
16
16
  <%= f.text_field :email, { :label => t('muck.users.email_address'),
17
17
  :tip => t('muck.users.email_help'),
18
- :extra_html => '<span id="email-availibility" class="availability"></span>' } -%>
18
+ :extra_html => '' } -%>
19
19
  <%= f.password_field :password, { :label => t('muck.users.password'),
20
20
  :tip => t('muck.users.password_help')} -%>
21
21
  <%= f.password_field :password_confirmation, { :label => t('muck.users.confirm_password'),
@@ -0,0 +1 @@
1
+ <span class="unavailable"><%= message %></span>
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-users}
8
- s.version = "0.3.18"
8
+ s.version = "0.3.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-06-01}
12
+ s.date = %q{2010-07-13}
13
13
  s.description = %q{Easily add user signup, login and other features to your application}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
@@ -691,9 +691,11 @@ Gem::Specification.new do |s|
691
691
  "app/views/user_mailer/welcome_notification.text.zh.plain.erb",
692
692
  "app/views/user_sessions/new.html.erb",
693
693
  "app/views/username_request/new.html.erb",
694
+ "app/views/users/_available.html.erb",
694
695
  "app/views/users/_recover_password_via_email_link.html.erb",
695
696
  "app/views/users/_signup_form.html.erb",
696
697
  "app/views/users/_signup_form_javascript.html.erb",
698
+ "app/views/users/_unavailable.html.erb",
697
699
  "app/views/users/_user.html.erb",
698
700
  "app/views/users/activation_confirmation.html.erb",
699
701
  "app/views/users/activation_instructions.html.erb",
@@ -767,6 +769,8 @@ Gem::Specification.new do |s|
767
769
  "public/images/admin/source/User.png",
768
770
  "public/images/admin/source/roles.png",
769
771
  "public/images/admin/user.gif",
772
+ "public/images/icon_no.gif",
773
+ "public/images/icon_success.gif",
770
774
  "public/images/profile_default.jpg",
771
775
  "public/javascripts/muck-users.js",
772
776
  "rails/init.rb",
Binary file
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 18
10
- version: 0.3.18
9
+ - 19
10
+ version: 0.3.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-06-01 00:00:00 -06:00
19
+ date: 2010-07-13 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -773,9 +773,11 @@ files:
773
773
  - app/views/user_mailer/welcome_notification.text.zh.plain.erb
774
774
  - app/views/user_sessions/new.html.erb
775
775
  - app/views/username_request/new.html.erb
776
+ - app/views/users/_available.html.erb
776
777
  - app/views/users/_recover_password_via_email_link.html.erb
777
778
  - app/views/users/_signup_form.html.erb
778
779
  - app/views/users/_signup_form_javascript.html.erb
780
+ - app/views/users/_unavailable.html.erb
779
781
  - app/views/users/_user.html.erb
780
782
  - app/views/users/activation_confirmation.html.erb
781
783
  - app/views/users/activation_instructions.html.erb
@@ -849,6 +851,8 @@ files:
849
851
  - public/images/admin/source/User.png
850
852
  - public/images/admin/source/roles.png
851
853
  - public/images/admin/user.gif
854
+ - public/images/icon_no.gif
855
+ - public/images/icon_success.gif
852
856
  - public/images/profile_default.jpg
853
857
  - public/javascripts/muck-users.js
854
858
  - rails/init.rb