예제 #1
0
 /**
  * get data for dropDownList in update setting page
  * @param $type
  * @return array
  */
 public static function getListData($type)
 {
     if ($type == '{TIMEZONE}') {
         return Core::getTimezoneList();
     }
     if ($type == '{LOCALE}') {
         return Core::getLocaleList();
     }
     return [];
 }
예제 #2
0
?>
</h1>
        </div>
        <div class="box-body">
            <div class="account-form">
                <?php 
$form = ActiveForm::begin(['action' => Yii::$app->urlManager->createUrl(['/account'])]);
?>
                <?php 
echo $form->field($model, 'fullname')->textInput(['maxlength' => true, 'disabled' => !$model->canChangeName()]);
?>
                <?php 
echo $form->field($model, 'language')->widget(Select2Widget::className(), ['bootstrap' => false, 'items' => \common\models\Message::getLocaleList()]);
?>
                <?php 
echo $form->field($model, 'timezone')->widget(Select2Widget::className(), ['bootstrap' => false, 'items' => Core::getTimezoneList()]);
?>
                <div class="form-group">
                    <?php 
echo Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-primary']);
?>
                </div
                <?php 
ActiveForm::end();
?>
            </div>
        </div>
    </div>
</div>