mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding FormHelper::input() fix for generating select menus (Ticket #1860)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4293 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
2ef3e325ca
commit
33990b2193
2 changed files with 3 additions and 3 deletions
|
@ -260,7 +260,7 @@ class FormHelper extends AppHelper {
|
||||||
|
|
||||||
$this->setFormTag($tagName);
|
$this->setFormTag($tagName);
|
||||||
|
|
||||||
if (!isset($options['type']) || ($options['type'] == 'select' && !isset($options['options']))) {
|
if ((!isset($options['type']) || $options['type'] == 'select') && !isset($options['options'])) {
|
||||||
if (ClassRegistry::isKeySet($this->model())) {
|
if (ClassRegistry::isKeySet($this->model())) {
|
||||||
|
|
||||||
$model =& ClassRegistry::getObject($this->model());
|
$model =& ClassRegistry::getObject($this->model());
|
||||||
|
@ -354,7 +354,7 @@ class FormHelper extends AppHelper {
|
||||||
if(isset($options['rows']) || isset($options['cols'])) {
|
if(isset($options['rows']) || isset($options['cols'])) {
|
||||||
$options['type'] = 'textarea';
|
$options['type'] = 'textarea';
|
||||||
}
|
}
|
||||||
|
|
||||||
$empty = false;
|
$empty = false;
|
||||||
if(isset($options['empty'])) {
|
if(isset($options['empty'])) {
|
||||||
$empty = $options['empty'];
|
$empty = $options['empty'];
|
||||||
|
|
|
@ -168,7 +168,7 @@ class XmlHelper extends AppHelper {
|
||||||
}
|
}
|
||||||
$out = "<{$ns}{$name}" . $this->__composeAttributes($attrib);
|
$out = "<{$ns}{$name}" . $this->__composeAttributes($attrib);
|
||||||
|
|
||||||
if ((empty($content) || $content == null) && $endTag) {
|
if (empty($content) && $endTag) {
|
||||||
$out .= ' />';
|
$out .= ' />';
|
||||||
} else {
|
} else {
|
||||||
$out .= '>' . $this->__composeContent($content);
|
$out .= '>' . $this->__composeContent($content);
|
||||||
|
|
Loading…
Add table
Reference in a new issue