Class: AlPassword

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

Overview

パスワードウィジェット

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:

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

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

Returns:

  • (String)

    htmlタグ



784
785
786
787
788
789
790
791
792
# File 'lib/al_form.rb', line 784

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文字列



802
803
804
# File 'lib/al_form.rb', line 802

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