diff options
author | ankonym <ankonym@gmail.com> | 2015-09-21 18:34:04 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-09-28 15:12:46 +0200 |
commit | 9adbde13619de8b2c300056b062d12f0961cb710 (patch) | |
tree | f9161d0a39b497cca05887a0e4fc48acde5aa650 /app/views/users/new.html.haml | |
parent | ca591b482870c93674aaf454e90f56796da7d87d (diff) |
Make invite code configurable
Through the config param 'invite_required', providers can decide whether users need to provide an invite code upon signup.
The default setting is false.
Diffstat (limited to 'app/views/users/new.html.haml')
-rw-r--r-- | app/views/users/new.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml index cd4bf70..b44f77c 100644 --- a/app/views/users/new.html.haml +++ b/app/views/users/new.html.haml @@ -17,8 +17,11 @@ = f.input :login, :label => t(:username), :required => false, :input_html => { :id => :srp_username } = f.input :password, :required => false, :validate => true, :input_html => { :id => :srp_password } = f.input :password_confirmation, :required => false, :validate => true, :input_html => { :id => :srp_password_confirmation } - = f.input :invite_code, :input_html => { :id => :srp_invite_code } + - if APP_CONFIG[:invite_required] + = f.input :invite_code, :input_html => { :id => :srp_invite_code } + - else + = f.input :invite_code, :as => "hidden", :input_html => { :value => " ", :id => :srp_invite_code } = f.button :wrapped, cancel: home_path -# |