<commit_before><?php
use kartik\widgets\DepDrop;
use frontend\helpers\ContactsHelper;
?>

<?php
    $nativeLangList = !empty($userLanguage->language_id) ? $languages : array_merge([''], $languages);
    echo $form->field($userLanguage, 'language_id')->dropDownList($nativeLangList, ['name' => 'languages[0]', 'id' => 'native-lang', 'class' => 'lang-field'])->label('Native language'); 
?>
<div class="optional-languages">
<?php
    $parents = ['native-lang'];
    $optLanguages = ContactsHelper::getOptLanguages(Yii::$app->user->id);
    for($key = 1; $key < count($languages); $key++){
        echo $form->field($userLanguage, 'language_id')->widget(DepDrop::classname(), [
            'data' => !empty($optLanguages) ? array_shift($optLanguages) : [],<commit_msg>опять пропатчены окна в кабинете возле языков<commit_after><?php
use kartik\widgets\DepDrop;
use frontend\helpers\ContactsHelper;
?>

<?php
    $nativeLangList = !empty($userLanguage->language_id) ? $languages : array_merge([''], $languages);
    
    if(isset($nativeLangList[0])){
        $nativeLangList = $languages =  \common\components\Commonhelper::LaPatch();
    }
    if(empty($userLanguage)){
        $userLanguage = \common\components\Commonhelper::LaPatch2();
    }
        
    echo $form->field($userLanguage, 'language_id')->dropDownList($nativeLangList, ['name' => 'languages[0]', 'id' => 'native-lang', 'class' => 'lang-field'])->label('Native language'); 
?>
<div class="optional-languages">
<?php
    $parents = ['native-lang'];
    $optLanguages = ContactsHelper::getOptLanguages(Yii::$app->user->id);
    for($key = 1; $key < count($languages); $key++){
        echo $form->field($userLanguage, 'language_id')->widget(DepDrop::classname(), [
            'data' => !empty($optLanguages) ? array_shift($optLanguages) : [],
{'fraction_non_alphanumeric': 0.2026578073089701, 'fraction_numerical': 0.0033222591362126247, 'mean_word_length': 5.063758389261745, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2266224', 'n_tokens_mistral': 589, 'n_tokens_neox': 595, 'n_words': 91}