mirror of
https://github.com/Eising/kipketer.git
synced 2024-05-11 05:55:17 +00:00
22 lines
574 B
Ruby
22 lines
574 B
Ruby
class Hastighedstest < Sinatra::Base
|
|
|
|
# Builds an html input tag
|
|
#
|
|
# == Parameters:
|
|
# type::
|
|
# the html input type, e.g. text, hidden, password, etc.
|
|
# name::
|
|
# the form element name
|
|
# value::
|
|
# (Optional) the value in the input field
|
|
# == Returns:
|
|
# An <input /> tag
|
|
def input(type, name, value=nil)
|
|
if value
|
|
"<input type=\"#{type}\" name=\"#{name}\" value=\"#{value}\" id=\"#{name}\" />"
|
|
else
|
|
"<input type=\"#{type}\" name=\"#{name}\" id=\"#{name}\" />"
|
|
end
|
|
end
|
|
end
|