| @@ -16,8 +16,10 @@ | ||
| 16 | 16 | |
| 17 | 17 | $vbo_app = VikBooking::getVboApplication(); |
| 18 | 18 | $vbo_app->loadSelect2(); |
| 19 | 19 | |
| 20 | +JText::script('VBNEWCUSTOMFCOUNTRY'); | |
| 21 | + | |
| 20 | 22 | ?> |
| 21 | 23 | <div class="vbo-list-form-filters vbo-btn-toolbar"> |
| 22 | 24 | <form action="index.php?option=com_vikbooking&view=states" method="post" name="statesform"> |
| 23 | 25 | <div style="width: 100%; display: inline-block;" class="btn-toolbar" id="filter-bar"> |
| @@ -22,9 +24,9 @@ | ||
| 22 | 24 | <form action="index.php?option=com_vikbooking&view=states" method="post" name="statesform"> |
| 23 | 25 | <div style="width: 100%; display: inline-block;" class="btn-toolbar" id="filter-bar"> |
| 24 | 26 | <div class="btn-group pull-left"> |
| 25 | 27 | <select name="idcountry" id="idcountry" onchange="document.statesform.submit();"> |
| 26 | - <option value=""><?php echo JText::translate('VBNEWCUSTOMFCOUNTRY'); ?></option> | |
| 28 | + <option></option> | |
| 27 | 29 | <?php |
| 28 | 30 | foreach (VikBooking::getCountriesArray($tn = true, $no_id = false) as $country) { |
| 29 | 31 | ?> |
| 30 | 32 | <option value="<?php echo $country['id']; ?>"<?php echo $country['id'] == $pidcountry ? ' selected="selected"' : ''; ?>><?php echo $country['country_name']; ?></option> |
| @@ -32,10 +34,10 @@ | ||
| 32 | 34 | } |
| 33 | 35 | ?> |
| 34 | 36 | </select> |
| 35 | 37 | </div> |
| 36 | - <div class="btn-group pull-left input-append"> | |
| 37 | - <input type="text" name="statename" id="statename" value="<?php echo $pstatename; ?>" size="40" placeholder="<?php echo JText::translate('VBPVIEWROOMONE'); ?>"/> | |
| 38 | + <div class="btn-group pull-left input-append btn-group-right-el"> | |
| 39 | + <input type="text" name="statename" id="statename" value="<?php echo JHtml::fetch('esc_attr', $pstatename); ?>" size="40" placeholder="<?php echo JText::translate('VBPVIEWROOMONE'); ?>"/> | |
| 38 | 40 | <button type="button" class="btn btn-secondary" onclick="document.statesform.submit();"><i class="icon-search"></i></button> |
| 39 | 41 | </div> |
| 40 | 42 | <div class="btn-group pull-left"> |
| 41 | 43 | <button type="button" class="btn btn-secondary" onclick="document.getElementById('statename').value='';document.getElementById('idcountry').value='';document.statesform.submit();"><?php echo JText::translate('JSEARCH_FILTER_CLEAR'); ?></button> |
| @@ -45,12 +47,19 @@ | ||
| 45 | 47 | <input type="hidden" name="option" value="com_vikbooking" /> |
| 46 | 48 | </form> |
| 47 | 49 | </div> |
| 48 | 50 | |
| 49 | -<script type="text/javascript"> | |
| 50 | -jQuery(function() { | |
| 51 | - jQuery('#idcountry').select2(); | |
| 52 | -}); | |
| 51 | +<script> | |
| 52 | +(function($) { | |
| 53 | + 'use strict'; | |
| 54 | + | |
| 55 | + $(function() { | |
| 56 | + $('#idcountry').select2({ | |
| 57 | + allowClear: true, | |
| 58 | + placeholder: Joomla.JText._('VBNEWCUSTOMFCOUNTRY'), | |
| 59 | + }); | |
| 60 | + }); | |
| 61 | +})(jQuery); | |
| 53 | 62 | </script> |
| 54 | 63 | |
| 55 | 64 | <?php |
| 56 | 65 | if (empty($this->rows)) { |