?>
<div class="organisations-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    <p>
        <?php 
echo Html::beginForm('', 'post', ['class' => 'uk-width-medium-1-1 uk-form uk-form-horizontal']);
?>
        <?php 
echo Select2::widget(['name' => 'country_code', 'data' => Organisations::dropdown(), 'options' => ['id' => 'country_select', 'multiple' => false, 'placeholder' => 'Choose...', 'class' => 'uk-width-medium-7-10']]);
?>
        <?php 
AjaxSubmitButton::begin(['label' => 'Refresh', 'ajaxOptions' => ['type' => 'POST', 'url' => 'index.php?r=organisations/refreshdata1', 'success' => new \yii\web\JsExpression('function(html){
                  $("#output").html(html);
                  }')], 'options' => ['class' => 'btn btn-primary', 'type' => 'submit']]);
AjaxSubmitButton::end();
?>
        <?php 
echo Html::endForm();
?>
    </p>
    <div id="output"></div>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'uid', 'label', 'abbreviation', 'category', 'website', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <div class="row">
            <div style="text-align: justify;" class="col-lg-7">
                
        <?php 
// Select Organisations :
// 1. Get Data From Preferences
$currentOrgs = Preferences::getSelectedOrgIds();
echo Html::beginForm('admnin_panel', 'post', ['class' => 'uk-width-medium-1-1 uk-form uk-form-horizontal']);
// 2. Show selected Organisations
echo '<label class="control-label">Οργανισμοί</label>';
echo Select2::widget(['name' => 'select_orgs', 'data' => Organisations::dropdown(), 'value' => $currentOrgs, 'options' => ['placeholder' => 'Επιλέξτε τους Οργανισμούς που θέλετε ...', 'multiple' => true]]);
?>
                    <br>
            <?php 
// Select Decision Types :
// 1. Get Data From Preferences
$currentTypes = Preferences::getSelectedTypes();
// 2. Show selected Types
echo '<label class="control-label">Τύποι Αποφάσεων</label>';
echo Select2::widget(['name' => 'select_types', 'data' => ['Β.1.3' => 'Β.1.3', 'Β.2.1' => 'Β.2.1', 'Β.2.2' => 'Β.2.2', 'Δ.1' => 'Δ.1', 'Δ.2.1' => 'Δ.2.1', 'Δ.2.2' => 'Δ.2.2'], 'value' => $currentTypes, 'options' => ['placeholder' => 'Επιλέξτε τους Τύπους Αποφάσεων που θέλετε ...', 'multiple' => true]]);
?>
    
                    <br>     
            <?php 
// Select Date Range:
// 1. Get Data From Preferences