Class: Widgets::ResetPassword::Base

Inherits:
ErpApp::Widgets::Base
  • Object
show all
Defined in:
app/widgets/reset_password/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.base_layoutObject



28
29
30
31
32
33
34
35
# File 'app/widgets/reset_password/base.rb', line 28

def base_layout
  begin
    file = File.join(File.dirname(__FILE__),"/views/layouts/base.html.erb")
    IO.read(file)
  rescue
    return nil
  end
end

.titleObject



20
21
22
# File 'app/widgets/reset_password/base.rb', line 20

def title
  "Reset Password"
end

.widget_nameObject



24
25
26
# File 'app/widgets/reset_password/base.rb', line 24

def widget_name
  File.basename(File.dirname(__FILE__))
end

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/widgets/reset_password/base.rb', line 5

def index
  @website   = Website.find_by_host(request.host_with_port)
  @login_url = params[:login_url]
  @domain    = @website.configurations.first.get_item(ConfigurationItemType.find_by_internal_identifier('primary_host')).options.first.value

  render
end

#locateObject

should not be modified modify at your own risk



15
16
17
# File 'app/widgets/reset_password/base.rb', line 15

def locate
  File.dirname(__FILE__)
end