_language_tr.php 2.1 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php

/**
 * Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
 * OPEN 2.0
 *
 * @package    Open20Package
 * @category   CategoryName
 * @author     Elite Division S.r.l.
 */

use elitedivision\amos\core\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\datecontrol\DateControl;
use elitedivision\amos\translation\AmosTranslation;
use elitedivision\amos\translation\models\TranslationConf;

?>
<div class="search">

    <?php 
    $form = ActiveForm::begin([
                'action' => ['view-tr', 'id' => filter_input(INPUT_GET, 'id'), 'lang' => filter_input(INPUT_GET, 'lang'), 'namespace' => filter_input(INPUT_GET, 'namespace'), 'url' => filter_input(INPUT_GET, 'url')],
                'method' => 'get',
                'options' => [
                    'data-pjax' => true,
                    'id' => 'filter_lang',
                    'class' => 'default-form',
                ]
    ]);
    ?>    
    <div class="container" id="container-filter">
    <div class="col-md-6">
        <p>
            <strong>    
                <?= $model->getAttributeLabel('language_source') ?>
            </strong>
                <?=
                        $form->field($model, 'language_source')
                        ->dropDownList(\yii\helpers\ArrayHelper::map(TranslationConf::getStaticAllActiveLanguages(true, filter_input(INPUT_GET, 'namespace'))->andWhere(['!=', 'language_id', filter_input(INPUT_GET, 'lang')])->orderBy('language_id')->all(), 'language_id', 'language_id'), ['prompt' => AmosTranslation::t('amostranslation', 'Source contents {lang}', ['lang' => (isset($this->context->module->defaultLanguage)? '(' . $this->context->module->defaultLanguage . ')' : '')]), 'id' => 'source_lang_id'])
                        ->label(false);
                ?>             
            
        </p>
    </div>

    <div class="col-md-6 m-t-30">                 
            <?= Html::submitButton(AmosTranslation::tHtml('amostranslation', 'Change source language'), ['class' => 'btn btn-navigation-primary']) ?>      
    </div>
    </div>
    <div class="clearfix"></div> 
    <?php
    ActiveForm::end();
    ?>
</div>