app/controllers/clients_controller.rb
def change_clients_login_password
    begin
      clients_login           = ClientsLogin.find(params[:client_login_id])
      clients_login.password  = Digest::SHA1.hexdigest(params[:new_password])
      clients_login.save!
      @result_text = "Client's login " + clients_login.login + " password changed!"
    rescue Exception => exc
      @result_text = "Error: #{exc.message}"  
    end    
    
    render :update do |page|
      page['client_login_result_text'].innerHTML = @result_text
      page.visual_effect :highlight, "client_login_result_text"
    end
  end
#
# Enables administrator to change client login details
# RJS action
#

Enables administrator to change client login details
RJS action
Enables administrator to change client login details RJS action
def change_clients_login_password
    begin
      clients_login           = ClientsLogin.find(params[:client_login_id])
      clients_login.password  = Digest::SHA1.hexdigest(params[:new_password])
      clients_login.save!
      @result_text = "Client's login " + clients_login.login + " password changed!"
    rescue Exception => exc
      @result_text = "Error: #{exc.message}"  
    end    
    render :update do |page|
      page['client_login_result_text'].innerHTML = @result_text
      page.visual_effect :highlight, "client_login_result_text"
    end
  end
def change_clients_login_password begin clients_login = ClientsLogin . find ( params [ :client_login_id ] ) clients_login . password = Digest :: SHA1 . hexdigest ( params [ :new_password ] ) clients_login . save! @result_text = "Client's login " + clients_login . login + " password changed!" rescue Exception => exc @result_text = "Error: #{exc.message}" end render :update do | page | page [ 'client_login_result_text' ] . innerHTML = @result_text page . visual_effect :highlight , "client_login_result_text" end end
Enables administrator to change client login details
RJS action
Enables administrator to change client login details RJS action