droom 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/droom/widgets.js.coffee +1 -0
- data/app/views/devise/confirmations/show.html.haml +1 -14
- data/app/views/devise/passwords/edit.html.haml +3 -17
- data/app/views/droom/users/_form.html.haml +1 -14
- data/app/views/droom/users/_password_fields.html.haml +15 -0
- data/config/locales/en.yml +1 -0
- data/lib/droom.rb +6 -1
- data/lib/droom/version.rb +1 -1
- metadata +3 -2
@@ -10,20 +10,7 @@
|
|
10
10
|
= form_for resource, :url => confirm_password_path, :html => {:class => 'password'} do |f|
|
11
11
|
= f.hidden_field :confirmation_token
|
12
12
|
|
13
|
-
|
14
|
-
= f.label :password
|
15
|
-
%br
|
16
|
-
= f.password_field :password, :autocomplete => "off", :class => 'preferences password required', :required => true, :pattern => ".{6,}"
|
17
|
-
%br
|
18
|
-
%span.note
|
19
|
-
= t :password_requirements
|
20
|
-
|
21
|
-
%p.confirmation
|
22
|
-
= f.label :password_confirmation
|
23
|
-
%br
|
24
|
-
= f.password_field :password_confirmation, :class => 'preferences password_confirmation required', :required => true, :pattern => ""
|
25
|
-
|
26
|
-
%p.note.password_notice
|
13
|
+
= render "droom/users/password_fields", :f => f
|
27
14
|
|
28
15
|
.controls
|
29
16
|
.save.button
|
@@ -2,28 +2,14 @@
|
|
2
2
|
%h1.pagetitle
|
3
3
|
=t :choose_new_password
|
4
4
|
|
5
|
-
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f|
|
5
|
+
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "password" }) do |f|
|
6
6
|
= devise_error_messages!
|
7
7
|
= f.hidden_field :reset_password_token
|
8
|
-
|
9
|
-
%p
|
10
|
-
= f.label :password, t(:password_instructions)
|
11
|
-
%br
|
12
|
-
= f.password_field :password, :autocomplete => "off", :class => 'preferences password required', :required => true
|
13
|
-
%br
|
14
|
-
%span.formnote
|
15
|
-
= t :password_requirements
|
16
8
|
|
17
|
-
|
18
|
-
= f.label :password_confirmation, t(:password_confirmation_instructions)
|
19
|
-
%br
|
20
|
-
= f.password_field :password_confirmation, :autocomplete => "off", :class => 'preferences required'
|
21
|
-
%br
|
22
|
-
%span.formnote
|
23
|
-
= t :password_confirmation_requirements
|
9
|
+
= render "droom/users/password_fields", :f => f
|
24
10
|
|
25
11
|
%p.notice
|
26
|
-
|
12
|
+
= t :password_notice
|
27
13
|
|
28
14
|
.controls
|
29
15
|
.save.button
|
@@ -5,20 +5,7 @@
|
|
5
5
|
%br
|
6
6
|
= f.email_field :email, :class => 'preferences', :autocomplete => false
|
7
7
|
|
8
|
-
|
9
|
-
= f.label :password
|
10
|
-
%br
|
11
|
-
= f.password_field :password, :autocomplete => "off", :class => 'preferences password', :pattern => ".{6,}"
|
12
|
-
%br
|
13
|
-
%span.note
|
14
|
-
= t :password_requirements
|
15
|
-
|
16
|
-
%p.confirmation
|
17
|
-
= f.label :password_confirmation
|
18
|
-
%br
|
19
|
-
= f.password_field :password_confirmation, :class => 'preferences password_confirmation', :pattern => ""
|
20
|
-
|
21
|
-
%p.password_notice
|
8
|
+
= render "droom/users/password_fields", :f => f
|
22
9
|
|
23
10
|
.buttons
|
24
11
|
= f.submit t(:save_changes), :class => "submit"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- if f
|
2
|
+
%p
|
3
|
+
= f.label :password
|
4
|
+
%br
|
5
|
+
= f.password_field :password, :autocomplete => "off", :class => 'preferences password required', :required => true, :pattern => Droom.password_pattern
|
6
|
+
%br
|
7
|
+
%span.note
|
8
|
+
= t :password_requirements
|
9
|
+
|
10
|
+
%p.confirmation
|
11
|
+
= f.label :password_confirmation
|
12
|
+
%br
|
13
|
+
= f.password_field :password_confirmation, :class => 'preferences password_confirmation required', :required => true, :pattern => ""
|
14
|
+
|
15
|
+
%p.note.password_notice
|
data/config/locales/en.yml
CHANGED
@@ -226,6 +226,7 @@ en:
|
|
226
226
|
page_summary_explanation: "The page summary is a two- or three-line description that we use whenever this page appears in a list. You would normally see it on the help index page."
|
227
227
|
page_youtube_explanation: "Soon there will be a little video-finding gadget here, but to start with please paste in a video id. The embedding will be handled automatically. Omit if not relevant."
|
228
228
|
|
229
|
+
password_notice: "You must choose a password before you can proceed (unless you remember your old one: in that case you can just log in)."
|
229
230
|
person_title: "Title"
|
230
231
|
person_forename: "Forename"
|
231
232
|
person_name: "Name"
|
data/lib/droom.rb
CHANGED
@@ -53,7 +53,8 @@ module Droom
|
|
53
53
|
:required_calendar_names,
|
54
54
|
:stream_shared,
|
55
55
|
:aws_bucket_name,
|
56
|
-
:calendar_closed
|
56
|
+
:calendar_closed,
|
57
|
+
:password_pattern
|
57
58
|
|
58
59
|
class DroomError < StandardError; end
|
59
60
|
class PermissionDenied < DroomError; end
|
@@ -212,6 +213,10 @@ module Droom
|
|
212
213
|
@@required_calendar_names ||= %w{main stream}
|
213
214
|
end
|
214
215
|
|
216
|
+
def password_pattern
|
217
|
+
@@password_pattern ||= ".{6,}"
|
218
|
+
end
|
219
|
+
|
215
220
|
# Droom's preferences are arbitrary and open-ended. You can ask for any preference key: if it
|
216
221
|
# doesn't exist you just get back the default value, or nil if there isn't one. This is where you
|
217
222
|
# set the defaults.
|
data/lib/droom/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -841,6 +841,7 @@ files:
|
|
841
841
|
- app/views/droom/users/_extra_columns_header.html.haml
|
842
842
|
- app/views/droom/users/_extra_columns_note.html.haml
|
843
843
|
- app/views/droom/users/_form.html.haml
|
844
|
+
- app/views/droom/users/_password_fields.html.haml
|
844
845
|
- app/views/droom/users/_user.html.haml
|
845
846
|
- app/views/droom/users/_user_or_person.html.haml
|
846
847
|
- app/views/droom/users/_users_table.html.haml
|