muck-users 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc
CHANGED
@@ -114,6 +114,21 @@ By default when a user logs out they are sent to the login page. You can add a
|
|
114
114
|
|
115
115
|
muck-users sends out emails that need to be able to generate links. Be sure to set a value for MuckEngine.configuration.application_url.
|
116
116
|
|
117
|
+
=== Beta Codes
|
118
|
+
muck-users includes the ability to require a code to sign up. Add a sign up form to collect emails:
|
119
|
+
|
120
|
+
<%= muck_form_for :access_code_request, :url => access_code_requests_path, :html => { :class => 'ajax beta_code_request_form' } do |f| -%>
|
121
|
+
<%= f.text_field :email, { :label => translate('muck.users.access_request_email') } -%>
|
122
|
+
<%= f.text_field :name, { :label => translate('muck.users.access_request_name') } -%>
|
123
|
+
<%= f.submit translate('muck.users.submit') %>
|
124
|
+
<% end -%>
|
125
|
+
|
126
|
+
Note that using the css classes 'ajax beta_code_request_form' will result in an ajax submission. Both classes are important for the request to work.
|
127
|
+
|
128
|
+
All emails will be stored in the database. Access the admin to send out beta codes:
|
129
|
+
|
130
|
+
http://yoursite.com/admin/access_codes
|
131
|
+
|
117
132
|
=== Helpers
|
118
133
|
Muck users provides an autocomplete login search. To enable this functionality create a text box with the class 'login-search' and add
|
119
134
|
the following code to include the needed javascript and css:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.6
|
@@ -16,12 +16,20 @@ class Muck::AccessCodeRequestsController < ApplicationController
|
|
16
16
|
|
17
17
|
def create
|
18
18
|
@page_title = t('muck.users.request_access_code')
|
19
|
-
@access_code_request = AccessCodeRequest.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
@access_code_request = AccessCodeRequest.create(params[:access_code_request])
|
20
|
+
respond_to do |format|
|
21
|
+
format.js do
|
22
|
+
render :template => 'access_code_requests/create.js', :layout => false
|
23
|
+
end
|
24
|
+
format.html do
|
25
|
+
if @access_code_request
|
26
|
+
redirect_to access_code_request_path(@access_code_request)
|
27
|
+
else
|
28
|
+
render :template => "access_code_requests/new"
|
29
|
+
end
|
30
|
+
end
|
24
31
|
end
|
32
|
+
|
25
33
|
end
|
26
34
|
|
27
35
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h3><%=translate('muck.users.request_access_code') %></h3>
|
2
2
|
<%= output_errors('Problem adding access code', {:class => 'help-box'}, @access_code_request) %>
|
3
|
-
<%= muck_form_for :access_code_request, :url => access_code_requests_path do |f| -%>
|
3
|
+
<%= muck_form_for :access_code_request, :url => access_code_requests_path, :html => { :class => 'ajax beta_code_request_form' } do |f| -%>
|
4
4
|
<%= f.text_field :email, { :label => translate('muck.users.access_request_email') } -%>
|
5
5
|
<%= f.text_field :name, { :label => translate('muck.users.access_request_name') } -%>
|
6
6
|
<%= f.submit translate('muck.users.submit') %>
|
data/config/locales/en.yml
CHANGED
@@ -8,6 +8,7 @@ en:
|
|
8
8
|
join_application_name: Join and get it done
|
9
9
|
email_help: Please use a valid, current e-mail address. We will never share or spam your e-mail address.
|
10
10
|
logout_required: ""
|
11
|
+
access_code_thank_you: Thank you for your interest. We'll get you a code as soon as possible.
|
11
12
|
access_code_fullfill_invites_limit_tip: Enter a number to limit the number of requests sent out. For example, entering 100 will limit the invites to the most recent 100 requests
|
12
13
|
access_required_warning: Site access is currently restricted. You need a valid access code to sign up.
|
13
14
|
login_out_success: You have been logged out.
|
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 = "3.1.
|
8
|
+
s.version = "3.1.6"
|
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{2011-
|
12
|
+
s.date = %q{2011-02-17}
|
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 = [
|
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
"app/helpers/muck_users_helper.rb",
|
33
33
|
"app/models/permission.rb",
|
34
34
|
"app/models/role.rb",
|
35
|
+
"app/views/access_code_requests/create.js.erb",
|
35
36
|
"app/views/access_code_requests/new.html.erb",
|
36
37
|
"app/views/access_code_requests/show.html.erb",
|
37
38
|
"app/views/admin/access_codes/_access_code.html.erb",
|
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:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 3.1.
|
9
|
+
- 6
|
10
|
+
version: 3.1.6
|
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: 2011-
|
19
|
+
date: 2011-02-17 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- app/helpers/muck_users_helper.rb
|
103
103
|
- app/models/permission.rb
|
104
104
|
- app/models/role.rb
|
105
|
+
- app/views/access_code_requests/create.js.erb
|
105
106
|
- app/views/access_code_requests/new.html.erb
|
106
107
|
- app/views/access_code_requests/show.html.erb
|
107
108
|
- app/views/admin/access_codes/_access_code.html.erb
|