<?php

use WpBookingHotel\Factory;
use WpBookingHotel\Utilities\Utility;
use WpBookingHotel\Html\WpBookingHotelHtmlBackend as WpBookingHotelHtmlBackendAlias;
use WpBookingHotel\Language\Text;
defined('_WPBOOKINGHOTEL_EXEC') or die;
extract($displayData);

WpBookingHotelHtmlBackendAlias::load_jquery_library('dateselect');
$doc = Factory::getDocument();
$doc->addLessStylesheet('admin/app/layouts/WooBooking/form/field/mediabrowser/mediabrowser.less');
$id_by_name = "element_field_". $name;
$name_of_field = str_replace(array('[', ']'), '_', $name);
?>
    <div id="<?php echo (esc_attr($id_by_name)) ?>" class="field-mediabrowser">
        <div class="show-image">
            <div>
                <img class="media-show" src="<?php echo($value) ?>">
            </div>
        </div>
        <div class="input-group">
            <input name="<?php echo (esc_attr($name)); ?>" value="<?php echo (esc_attr($value)) ?>" type="text"
                   class="form-control">
            <span class="input-group-btn">
        <button class="btn btn-default btn-browser-media" type="button"><?php esc_html_e('Browser','wpbookinghotel');?></button>
      </span>
        </div><!-- /input-group -->
    </div>
<?php
$doc->addScriptApplySelector('.field-mediabrowser','field_mediabrowser',array(
    "input_name"=>  $name,
    "multiple"=>  $multiple,
),'admin/app/layouts/WooBooking/form/field/mediabrowser/mediabrowser.jquery.js');
