Enh: Use of select2 dropdown for time zone selections

This commit is contained in:
buddh4 2017-07-14 22:03:31 +02:00
parent db72162411
commit 8228eae7ef
3 changed files with 8 additions and 5 deletions

View File

@ -14,6 +14,7 @@ HumHub Change Log
- Fix: `I18N` formatter user timezone not set
- Enh: Automatically set space default visibility in `Content::setContainer()`
- Fix: Fixed ContentContainerSettingManager caching issue if space/user id are equal
- Enh: Use of select2 dropdown for time zone selections
1.2.1 (June 17, 2017)
- Fix: Invite error in french language

View File

@ -1,5 +1,6 @@
<?php
use humhub\libs\TimezoneHelper;
use yii\widgets\ActiveForm;
use humhub\compat\CHtml;
?>
@ -24,7 +25,7 @@ use humhub\compat\CHtml;
<?= $languageDropDown = $form->field($model, 'defaultLanguage')->dropDownList($allowedLanguages, ['data-ui-select2' => '']); ?>
<?php endif; ?>
<?= $form->field($model, 'timeZone')->dropDownList(\humhub\libs\TimezoneHelper::generateList()); ?>
<?= $form->field($model, 'timeZone')->dropDownList(TimezoneHelper::generateList(), ['data-ui-select2' => '']); ?>
<?= humhub\modules\space\widgets\SpacePickerField::widget([
'form' => $form,

View File

@ -1,5 +1,6 @@
<?php
use humhub\libs\TimezoneHelper;
use yii\widgets\ActiveForm;
use \humhub\compat\CHtml;
?>
@ -8,13 +9,13 @@ use \humhub\compat\CHtml;
<?php $form = ActiveForm::begin(['id' => 'basic-settings-form']); ?>
<?php echo $form->field($model, 'tags'); ?>
<?= $form->field($model, 'tags'); ?>
<?php if (count($languages) > 1) : ?>
<?php echo $form->field($model, 'language')->dropDownList($languages, ['data-ui-select2' => '']); ?>
<?= $form->field($model, 'language')->dropDownList($languages, ['data-ui-select2' => '']); ?>
<?php endif; ?>
<?php echo $form->field($model, 'timeZone')->dropDownList(\humhub\libs\TimezoneHelper::generateList()); ?>
<?= $form->field($model, 'timeZone')->dropDownList(TimezoneHelper::generateList(), ['data-ui-select2' => '']); ?>
<?php if (Yii::$app->getModule('user')->settings->get('auth.allowGuestAccess')): ?>
@ -29,7 +30,7 @@ use \humhub\compat\CHtml;
<?php endif; ?>
<?php if (Yii::$app->getModule('tour')->settings->get('enable') == 1) : ?>
<?php echo $form->field($model, 'show_introduction_tour')->checkbox(); ?>
<?= $form->field($model, 'show_introduction_tour')->checkbox(); ?>
<?php endif; ?>
<button class="btn btn-primary" type="submit" data-ui-loader><?= Yii::t('UserModule.views_account_editSettings', 'Save') ?></button>