<?php

defined('_WPBOOKINGPRO_EXEC') or die;
extract($displayData);

$class = ' class="' . trim('simplecolors chzn-done ' . $class) . '"';
$disabled = $disabled ? ' disabled' : '';
$readonly = $readonly ? ' readonly' : '';

WpBookingPro_Html::_('jquery.framework');
WpBookingPro_Html::_('script', 'system/html5fallback.js',
	array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
WpBookingPro_Html::_('script', 'jui/jquery.simplecolors.min.js', array('version' => 'auto', 'relative' => true));
WpBookingPro_Html::_('stylesheet', 'jui/jquery.simplecolors.css', array('version' => 'auto', 'relative' => true));
WpBookingPro_Html::_('script', 'system/color-field-init.min.js', array('version' => 'auto', 'relative' => true));
?>
<select data-chosen="true" name="<?php esc_html_e($name); ?>" id="<?php esc_html_e($id); ?>"<?php
esc_html_e($disabled); ?><?php esc_html_e($readonly); ?><?php esc_html_e($required); ?><?php esc_html_e($class); ?><?php esc_html_e($position); ?><?php
esc_html_e($onchange); ?><?php esc_html_e($autofocus); ?>>
	<?php foreach ($colors as $i => $c) : ?>
        <option<?php echo($c == $color ? ' selected="selected"' : ''); ?>><?php esc_html_e($c); ?></option>
		<?php if (($i + 1) % $split == 0) : ?>
            <option>-</option>
		<?php endif; ?>
	<?php endforeach; ?>
</select>
