lowercases variables

This commit is contained in:
Godfrey M 2023-03-13 15:26:51 -07:00
parent 477bd27cba
commit 7612c5d852
3 changed files with 10 additions and 10 deletions

View file

@ -26,8 +26,8 @@ class SlackSettingsForm extends Component
'webhook_botname' => 'string|nullable',
];
static $webhook_text= [
"Slack" => array(
"name" => "Slack",
"slack" => array(
"name" => "slack",
"icon" => 'fab fa-slack',
"placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX",
"link" => 'https://api.slack.com/messaging/webhooks',
@ -38,8 +38,8 @@ class SlackSettingsForm extends Component
// "placeholder" => "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXX",
// "link" => 'https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page',
// ),
"General"=> array(
"name" => "General",
"general"=> array(
"name" => "general",
"icon" => "fab fa-hashtag",
"placeholder" => "",
"link" => "",
@ -61,7 +61,7 @@ class SlackSettingsForm extends Component
}
public function updated($field){
if($this->webhook_selected != 'General') {
if($this->webhook_selected != 'general') {
$this->validateOnly($field, $this->rules);
}
}
@ -119,7 +119,7 @@ class SlackSettingsForm extends Component
}
public function submit()
{
if($this->webhook_selected != 'General') {
if($this->webhook_selected != 'general') {
$this->validate($this->rules);
}

View file

@ -14,7 +14,7 @@ class AddsWebhookOptionToSettingsTable extends Migration
public function up()
{
Schema::table('settings', function (Blueprint $table) {
$table->string('webhook_selected')->after('slack_botname')->default('Slack')->nullable();
$table->string('webhook_selected')->after('slack_botname')->default('slack')->nullable();
$table->renameColumn('slack_botname', 'webhook_botname');
$table->renameColumn('slack_endpoint', 'webhook_endpoint');
$table->renameColumn('slack_channel', 'webhook_channel');

View file

@ -24,7 +24,7 @@
</div>
<div class="box-body">
<div class="col-md-12">
@if($webhook_selected != 'General')
@if($webhook_selected != 'general')
<p>
{!! trans('admin/settings/general.webhook_integration_help',array('webhook_link' => $webhook_link, 'app' => $webhook_name)) !!}
</p>
@ -64,9 +64,9 @@
aria-label="webhook_selected"
class="form-control "
>
<option value="Slack">Slack</option>
<option value="slack">Slack</option>
{{-- <option value="Discord">Discord</option>--}}
<option value="General">General Webhook</option>
<option value="general">General Webhook</option>
</select>
</div>
<br><br><br>