Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Select-box class for Form Builder
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 18 Feb 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\Helpers\Form;
|
||||
@@ -125,9 +124,9 @@ class _Select extends FormAbstract
|
||||
{
|
||||
$name .= '[]';
|
||||
}
|
||||
|
||||
|
||||
/* Translate labels back to keys? */
|
||||
if ( $this->options['returnLabels'] )
|
||||
if ( $this->options['returnLabels'] and ( $this->options['unlimited'] === NULL or $this->value !== $this->options['unlimited'] ) )
|
||||
{
|
||||
$value = array();
|
||||
if ( is_array( $this->value ) )
|
||||
@@ -146,7 +145,7 @@ class _Select extends FormAbstract
|
||||
{
|
||||
$value = $this->value;
|
||||
}
|
||||
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'forms', 'core' )->select( $name, $value, $this->required, $this->parseOptions(), $this->options['multiple'], $this->options['class'], $this->options['disabled'], $this->options['toggles'], $this->htmlId, $this->options['unlimited'], $this->options['unlimitedLang'], $this->options['unlimitedToggles'], $this->options['unlimitedToggleOn'], $this->options['userSuppliedInput'], $this->options['sort'], $this->options['parse'] );
|
||||
}
|
||||
|
||||
@@ -240,12 +239,12 @@ class _Select extends FormAbstract
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
else
|
||||
elseif ( $this->options['unlimited'] === NULL )
|
||||
{
|
||||
return $this->options['options'][ $value ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user