disable fixed baseurl (#7344)

* Base URL should not be editable when fixed #475

* Base URL should not be editable when fixed #475

* Base URL should not be editable when fixed #475

* Base URL should not be editable when fixed #475
This commit is contained in:
Gevorg Mansuryan 2024-12-14 03:20:38 +04:00 committed by GitHub
parent ce5aeda1c5
commit 18cf39f092
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 4 deletions

View File

@ -18,6 +18,7 @@ HumHub Changelog
- Enh #7336: Update GitHub workflow versions
- Enh #7339: Add `DeviceDetectorHelper::isMultiInstanceApp()` method to detect if the app is running in a multi-instance mode
- Enh #7342: Mask .env `DB__PASSWORD` variable in logs
- Enh #7344: Disable editing Base URL when setting is fixed
1.17.0-beta.2 (November 12, 2024)
---------------------------------

View File

@ -2,9 +2,7 @@
namespace humhub\modules\admin\models\forms;
use DateTimeZone;
use humhub\libs\DynamicConfig;
use humhub\libs\TimezoneHelper;
use humhub\modules\ui\icon\widgets\Icon;
use Yii;
use yii\base\Model;
@ -118,5 +116,4 @@ class BasicSettingsForm extends Model
return true;
}
}

View File

@ -19,7 +19,7 @@ use yii\helpers\Html;
<?php $form = ActiveForm::begin(['acknowledge' => true]); ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'baseUrl') ?>
<?= $form->field($model, 'baseUrl')->textInput(['disabled' => Yii::$app->settings->isFixed('baseUrl')]) ?>
<?php $allowedLanguages = Yii::$app->i18n->getAllowedLanguages(); ?>
<?php if (count($allowedLanguages) > 1) : ?>