Commit f7dcb057 by Taylor Otwell

added more html5 form elements.

parent 2da478cc
......@@ -19,7 +19,6 @@ return array(
'GET /' => function()
{
return Form::input('email', 'email', '', array('required', 'class' => 'awesome'));
return View::make('home/index');
},
......
......@@ -260,6 +260,45 @@ class Form {
}
/**
* Create a HTML time input element.
*
* @param string $name
* @param string $value
* @param array $attributes
* @return string
*/
public static function time($name, $value = null, $attributes = array())
{
return static::input('time', $name, $value, $attributes);
}
/**
* Create a HTML datetime input element.
*
* @param string $name
* @param string $value
* @param array $attributes
* @return string
*/
public static function datetime($name, $value = null, $attributes = array())
{
return static::input('datetime', $name, $value, $attributes);
}
/**
* Create a HTML local datetime input element.
*
* @param string $name
* @param string $value
* @param array $attributes
* @return string
*/
public static function datetime_local($name, $value = null, $attributes = array())
{
return static::input('datetime-local', $name, $value, $attributes);
}
/**
* Create a HTML file input element.
*
* @param string $name
......@@ -296,6 +335,18 @@ class Form {
}
/**
* Create a HTML image input element.
*
* @param string $value
* @param array $attributes
* @return string
*/
public static function image($value, $attributes = array())
{
return static::input('image', null, $value, $attributes);
}
/**
* Create a HTML button element.
*
* @param string $name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment