_language.php 2.25 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
<?php

/**
 * Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
 * OPEN 2.0
 *
7
8
9
10
 * @see https://www.open2.0.regione.lombardia.it Developers'community
 * @license GPLv3
 * @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
 *
waltermazza's avatar
waltermazza committed
11
 * @package    arter
Marcello Pivanti's avatar
Marcello Pivanti committed
12
13
14
15
 * @category   CategoryName
 * @author     Elite Division S.r.l.
 */

waltermazza's avatar
waltermazza committed
16
use arter\amos\core\helpers\Html;
Marcello Pivanti's avatar
Marcello Pivanti committed
17
18
use yii\widgets\ActiveForm;
use kartik\datecontrol\DateControl;
waltermazza's avatar
waltermazza committed
19
20
use arter\amos\translation\AmosTranslation;
use arter\amos\translation\models\TranslationConf;
Marcello Pivanti's avatar
Marcello Pivanti committed
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
56
57
58
59

?>
<div class="search">

    <?php 
    $form = ActiveForm::begin([
                'action' => ['update', '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>