Class: AlPassword

Inherits:
AlText show all
Defined in:
lib/al_form.rb

Overview

パスワードウィジェット

Instance Attribute Summary

Attributes inherited from AlText

#max, #min, #validator

Attributes inherited from AlWidget

#filter, #foreign, #hidden, #label, #message, #name, #required, #tag_attr, #value

Instance Method Summary (collapse)

Methods inherited from AlText

#initialize, #set_value, #validate

Methods inherited from AlWidget

#initialize, #set_attr, #set_value

Constructor Details

This class inherits a constructor from AlText

Instance Method Details

- (String) make_tag(arg = {})

(AlPassword) HTMLタグの生成

Parameters:

  • arg (Hash) (defaults to: {})

    htmlタグへ追加するアトリビュートを指定

Returns:

  • (String)

    htmlタグ



788
789
790
791
792
793
794
795
796
# File 'lib/al_form.rb', line 788

def make_tag( arg = {} )
  return super( arg )  if @hidden

  r = %Q(<input type="password" name="#{@name}" id="#{@name}" value="#{Alone::escape_html( @value )}")
  (@tag_attr.merge arg).each do |k,v|
    r << %Q( #{k}="#{Alone::escape_html(v)}")
  end
  return "#{r} #{AL_FORM_EMPTYTAG_CLOSE}"
end

- (String) make_value(*arg)

Note:

表示しない

(AlPassword) HTML値の生成

Returns:

  • (String)

    html文字列



805
806
807
# File 'lib/al_form.rb', line 805

def make_value( *arg )
  return '********'
end