diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 6d0cb94..cca9cad 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -59,6 +59,7 @@ class AccountController < ApplicationController def signup if @plugins.dispatch(:allow_user_registration).include?(false) redirect_back_or_default(:controller => 'home') + session[:notice] = _("This environment doesn't allow user registration.") end @invitation_code = params[:invitation_code] @@ -132,6 +133,7 @@ class AccountController < ApplicationController def forgot_password if @plugins.dispatch(:allow_password_recovery).include?(false) redirect_back_or_default(:controller => 'home') + session[:notice] = _("This environment doesn't allow password recovery.") end @change_password = ChangePassword.new(params[:change_password]) diff --git a/app/views/account/login_block.rhtml b/app/views/account/login_block.rhtml index 31ee47b..4f869dd 100644 --- a/app/views/account/login_block.rhtml +++ b/app/views/account/login_block.rhtml @@ -16,18 +16,24 @@ <%= f.password_field :password %> + <%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %> + <% button_bar do %> <%= submit_button( 'login', _('Log in') )%> - <%= link_to content_tag( 'span', _('New user') ), - { :controller => 'account', :action => 'signup' }, - :class => 'button with-text icon-add' %> + <% unless @plugins.dispatch(:allow_user_registration).include?(false) %> + <%= link_to content_tag( 'span', _('New user') ), + { :controller => 'account', :action => 'signup' }, + :class => 'button with-text icon-add' %> + <% end %> <% end %> <% end %> -
- <%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %> -
+ <% unless @plugins.dispatch(:allow_password_recovery).include?(false) %> ++ <%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %> +
+ <% end %> -- libgit2 0.21.2