diff --git a/app/controllers/admin/sessions_controller.rb b/app/controllers/admin/sessions_controller.rb index c55aa508..88a140fd 100644 --- a/app/controllers/admin/sessions_controller.rb +++ b/app/controllers/admin/sessions_controller.rb @@ -1,7 +1,6 @@ class SessionsController < Devise::SessionsController - def create - debugger + def create super reset_session end diff --git a/app/controllers/desktop/registrations_controller.rb b/app/controllers/desktop/registrations_controller.rb index 676bfe8e..264ddde7 100644 --- a/app/controllers/desktop/registrations_controller.rb +++ b/app/controllers/desktop/registrations_controller.rb @@ -1,4 +1,5 @@ class Desktop::RegistrationsController < Devise::RegistrationsController + def update self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb new file mode 100644 index 00000000..57aa5f7c --- /dev/null +++ b/app/controllers/registrations_controller.rb @@ -0,0 +1,3 @@ +class RegistrationsController < Devise::RegistrationsController + layout "devise" +end \ No newline at end of file diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 0baabc15..2bfc4eeb 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -60,6 +60,10 @@ class User validates :user_id, :presence => { :message => I18n.t("users.user_id_not_null") } , :length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") } + + def email_required? + false + end # validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique") # def new_attribute_values=(vars) diff --git a/app/views/admin/sites/preference.html.erb b/app/views/admin/sites/preference.html.erb index 24437520..ff4f802e 100644 --- a/app/views/admin/sites/preference.html.erb +++ b/app/views/admin/sites/preference.html.erb @@ -163,8 +163,9 @@
<% @site_in_use_locales.each do |locale| %> - <%= radio_button_tag "site[default_locale]", locale, @locale == locale,:class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(locale)}", disabled: true } %> + <%= radio_button_tag "site[default_locale]", locale, @locale == locale ,:class=>"toggle-check in_use_locales", :data => { :title => "#{I18nVariable.from_locale(locale)}" } %> <% end %> +
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 3cb9470d..4cd9868a 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -3,11 +3,11 @@ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= devise_error_messages! %> - +
<%= f.label "Username" %>
- <%= f.email_field :user_id %>
+ <%= f.text_field :user_id %>
<%= f.label :password %>
<%= f.password_field :password %>
diff --git a/config/routes.rb b/config/routes.rb index b79e3d50..611000ad 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,9 +3,7 @@ Orbit::Application.routes.draw do # get "robots.txt" => 'robots#index' - - - devise_for :users do + devise_for :users, :controllers => { :registrations => "registrations" } do match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put end