Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #169 from kamui545/patch-1

Adding support for url input
  • Loading branch information...
commit 8d8d64ac80578c70c183171bdbe503b91a28f150 2 parents 9e2db27 + 2773450
ADmad ADmad authored
6 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
View
@@ -7318,6 +7318,12 @@ public function testHtml5Inputs() {
'input' => array('type' => 'text', 'name' => 'data[User][query]', 'id' => 'UserQuery', 'value' => 'test')
);
$this->assertTags($result, $expected);
+
+ $result = $this->Form->input('User.website', array('type' => 'url', 'value' => 'http://domain.tld', 'div' => false, 'label' => false));
+ $expected = array(
+ 'input' => array('type' => 'url', 'name' => 'data[User][website]', 'id' => 'UserWebsite', 'value' => 'http://domain.tld')
+ );
+ $this->assertTags($result, $expected);
}
/**
3  lib/Cake/View/Helper/FormHelper.php
View
@@ -1072,6 +1072,9 @@ public function input($fieldName, $options = array()) {
case 'textarea':
$input = $this->textarea($fieldName, $options + array('cols' => '30', 'rows' => '6'));
break;
+ case 'url':
+ $input = $this->text($fieldName, array('type' => 'url') + $options);
+ break;
default:
$input = $this->{$type}($fieldName, $options);
}
Please sign in to comment.
Something went wrong with that request. Please try again.