<?phpdefined('_WPBOOKINGPRO_EXEC') or die;

extract($displayData);

WpBookingPro_HtmlFrontend::_('jquery.framework');
WpBookingPro_HtmlFrontend::_('script', 'system/html5fallback.js',
	array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
$list = '';
if ($options) {
	$list = 'list="' . $id . '_datalist"';
}
$autocomplete = !$autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $autocomplete . '"';
$autocomplete = $autocomplete === ' autocomplete="on"' ? '' : $autocomplete;
$attributes = array(
	!empty($class) ? 'class="' . $class . '"' : '',
	!empty($size) ? 'size="' . $size . '"' : '',
	$disabled ? 'disabled' : '',
	$readonly ? 'readonly' : '',
	$list,
	strlen($hint) ? 'placeholder="' . htmlspecialchars($hint, ENT_COMPAT, 'UTF-8') . '"' : '',
	$onchange ? ' onchange="' . $onchange . '"' : '',
	!empty($maxLength) ? $maxLength : '',
	$required ? 'required aria-required="true"' : '',
	$autocomplete,
	$autofocus ? ' autofocus' : '',
	$spellcheck ? '' : 'spellcheck="false"',
	!empty($inputmode) ? $inputmode : '',
	!empty($pattern) ? 'pattern="' . $pattern . '"' : '',
);
$id_by_name = "element_field_" . str_replace(array('[', ']'), '_', $name);
$data = $displayData['field']->getForm()->getData();
$name = $data->def('name');
$name = "A105, M3M4 Building";
$arrName = explode(' ', $name);
$iconImg = '';
for ($i = 0; $i < 3; $i++) {
	$iconImg .= substr($arrName[$i], 0, 1);
}
$iconImg = strtoupper($iconImg);
?>
    <div id="<?php esc_html_e($id_by_name) ?>" class="<?php esc_html_e($class); ?> field-cover hide-option">
        <div class="img-location">
            <span><?php esc_html_e($iconImg); ?></span>
        </div>
        <p><?php esc_html_e($name); ?></p>
    </div>
<?php
$doc = Factory::getDocument();
$doc->addStyleSheet('nb_apps/nb_woobooking/less/main_style.less');
$doc->addScriptApplySelector('.field-cover','field_cover',array(),'nb_apps/nb_woobooking/layouts/WooBooking/form/field/cover.jquery.js');