public static function colorpicker($name, $value = null, $options = array())
	{
		static $done;

		if ($done === null)
		{
			$done = array();
		}

		$readonly = isset($options['readonly']) && $options['readonly'] == 'readonly';
		$disabled = isset($options['disabled']) && $options['disabled'] == 'disabled';

		$options['class'] = 'input-colorpicker';

		$value = $value ? '#' . ltrim($value, '#') : '';

		if (!$readonly && !$disabled)
		{
			$id = self::getIdAttribute($name, $options);

			// Only display the triggers once for each control.
			if (!in_array($id, $done))
			{
				// Load the calendar behavior
				Behavior::colorpicker();

				$done[] = $id;
			}

			return '<span class="input-color">' . self::text($name, $value, $options) . '</span>';
		}

		return self::text($name . 'disabled', $value, $options) . self::hidden($name, $value, $options);
	}
public static function colorpicker($name, $value = null, $options = array())
	{
		static $done;

		if ($done === null)
		{
			$done = array();
		}

		$readonly = isset($options['readonly']) && $options['readonly'] == 'readonly';
		$disabled = isset($options['disabled']) && $options['disabled'] == 'disabled';

		$options['class'] = 'input-colorpicker';

		$value = $value ? '#' . ltrim($value, '#') : '';

		if (!$readonly && !$disabled)
		{
			$id = self::getIdAttribute($name, $options);

			// Only display the triggers once for each control.
			if (!in_array($id, $done))
			{
				// Load the calendar behavior
				Behavior::colorpicker();

				$done[] = $id;
			}

			return '<span class="input-color">' . self::text($name, $value, $options) . '</span>';
		}

		return self::text($name . 'disabled', $value, $options) . self::hidden($name, $value, $options);
	}
public static function colorpicker ( $ name , $ value = null , $ options = array ( ) ) { static $ done ; if ( $ done === null ) { $ done = array ( ) ; } $ readonly = isset ( $ options [ 'readonly' ] ) && $ options [ 'readonly' ] == 'readonly' ; $ disabled = isset ( $ options [ 'disabled' ] ) && $ options [ 'disabled' ] == 'disabled' ; $ options [ 'class' ] = 'input-colorpicker' ; $ value = $ value ? '#' . ltrim ( $ value , '#' ) : '' ; if ( ! $ readonly && ! $ disabled ) { $ id = self :: getIdAttribute ( $ name , $ options ) ; // Only display the triggers once for each control. if ( ! in_array ( $ id , $ done ) ) { // Load the calendar behavior Behavior :: colorpicker ( ) ; $ done [ ] = $ id ; } return '<span class="input-color">' . self :: text ( $ name , $ value , $ options ) . '</span>' ; } return self :: text ( $ name . 'disabled' , $ value , $ options ) . self :: hidden ( $ name , $ value , $ options ) ; }
Displays a color picker control field

@param   string  $name
@param   string  $value
@param   array   $options
@return  string  HTML markup for a calendar field
Displays a color picker control field