Class: AlSubmit

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

Overview

サブミットボタンウィジェット

Instance Attribute Summary

Attributes inherited from AlWidget

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

Instance Method Summary (collapse)

Methods inherited from AlButton

#initialize, #make_value, #set_value, #validate

Methods inherited from AlWidget

#initialize, #make_value, #set_attr, #set_value

Constructor Details

This class inherits a constructor from AlButton

Instance Method Details

- (String) make_tag(arg = {})

Note:

hiddenフラグ未対応。

(AlSubmit) HTMLタグの生成

Parameters:

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

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

Returns:

  • (String)

    htmlタグ



1292
1293
1294
1295
1296
1297
1298
# File 'lib/al_form.rb', line 1292

def make_tag( arg = {} )
  r = %Q(<input type="submit" 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