Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
6c2c36469a
3 changed files with 45 additions and 4 deletions
|
@ -1163,7 +1163,7 @@ class Helper
|
||||||
* }
|
* }
|
||||||
* @todo - use this everywhere else in the app where we have very long if/else config('app.lock_passwords') stuff
|
* @todo - use this everywhere else in the app where we have very long if/else config('app.lock_passwords') stuff
|
||||||
*/
|
*/
|
||||||
public function isDemoMode() {
|
public static function isDemoMode() {
|
||||||
if (config('app.lock_passwords') === true) {
|
if (config('app.lock_passwords') === true) {
|
||||||
return true;
|
return true;
|
||||||
\Log::debug('app locked!');
|
\Log::debug('app locked!');
|
||||||
|
@ -1177,7 +1177,7 @@ class Helper
|
||||||
* I know it's gauche to return a shitty HTML string, but this is just a helper and since it will be the same every single time,
|
* I know it's gauche to return a shitty HTML string, but this is just a helper and since it will be the same every single time,
|
||||||
* it seemed pretty safe to do here. Don't you judge me.
|
* it seemed pretty safe to do here. Don't you judge me.
|
||||||
*/
|
*/
|
||||||
public function showDemoModeFieldWarning() {
|
public static function showDemoModeFieldWarning() {
|
||||||
if (Helper::isDemoMode()) {
|
if (Helper::isDemoMode()) {
|
||||||
return "<p class=\"text-warning\"><i class=\"fas fa-lock\"></i>" . trans('general.feature_disabled') . "</p>";
|
return "<p class=\"text-warning\"><i class=\"fas fa-lock\"></i>" . trans('general.feature_disabled') . "</p>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use App\Models\Setting;
|
||||||
|
|
||||||
|
class UpdateSlackSetting extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* This is a dumb migration that would only affect a few people that would have been caught in the back-in-time
|
||||||
|
* migration change to change Slack to slack
|
||||||
|
*/
|
||||||
|
$settings = Setting::where('webhook_selected', '=', 'Slack')->get();
|
||||||
|
|
||||||
|
foreach($settings as $setting){
|
||||||
|
$setting->webhook_selected = 'slack';
|
||||||
|
$setting->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
|
@ -60,8 +60,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 required" wire:ignore>
|
<div class="col-md-9 required" wire:ignore>
|
||||||
|
|
||||||
{{ Form::select('webhook_selected', array('slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook')), old('webhook_selected', $webhook_selected), array('class'=>'select2 form-control', 'aria-label' => 'webhook_selected', 'id' => 'select2', 'style'=>'width:90%')) }}
|
@if (Helper::isDemoMode())
|
||||||
|
{{ Form::select('webhook_selected', array('slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook')), old('webhook_selected', $webhook_selected), array('class'=>'select2 form-control', 'aria-label' => 'webhook_selected', 'id' => 'select2', 'style'=>'width:90%', 'disabled')) }}
|
||||||
|
@else
|
||||||
|
{{ Form::select('webhook_selected', array('slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook')), old('webhook_selected', $webhook_selected), array('class'=>'select2 form-control', 'aria-label' => 'webhook_selected', 'id' => 'select2', 'style'=>'width:90%')) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue