<?php

use TourOperatorPro\Html\TourOperatorProHtmlBackend;
use TourOperatorPro\Language\Text;
use TourOperatorPro\Utilities\Utility;
defined('_TOUROPERATOR_EXEC') or die;
extract($displayData);

TourOperatorProHtmlBackend::load_jquery_library('dateselect');
TourOperatorProHtmlBackend::load_jquery_library('select2');



$doc = Factory::getDocument();
$list_open_source_user = get_users();
$id_by_name = "element_field_". $name;
?>
    <div id="<?php esc_attr_e($id_by_name) ?>" class="field-wordpress_user">
        <select class="open-source-user" name="<?php esc_attr_e($name); ?>">
            <option value=""><?php esc_attr_e('None','touroperatorpro') ?></option>
			<?php foreach ($list_open_source_user as $user) { ?>
                <option <?php echo ($value == $user->get('id') ? ' selected ' : '') ?>
                        value="<?php esc_attr_e($user->get('id')) ?>"><?php esc_html_e($user->get('user_login')) ?></option>
			<?php } ?>
        </select>
    </div>
<?php
$doc->addScriptApplySelector('.field-wordpress_user','field_wordpress_user',array(
    "input_name"=>  $name,
),'admin/nb_apps/nb_woobooking/layouts/WooBooking/form/field/wordpressuser.jquery.js');
