mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
silenced Discord option and validation, more translations
This commit is contained in:
parent
69944853f9
commit
15c19a7ab7
|
@ -32,12 +32,12 @@ class SlackSettingsForm extends Component
|
||||||
"placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX",
|
"placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX",
|
||||||
"link" => 'https://api.slack.com/messaging/webhooks',
|
"link" => 'https://api.slack.com/messaging/webhooks',
|
||||||
),
|
),
|
||||||
"Discord" => array(
|
// "Discord" => array(
|
||||||
"name" => "Discord",
|
// "name" => "Discord",
|
||||||
"icon" => 'fab fa-discord',
|
// "icon" => 'fab fa-discord',
|
||||||
"placeholder" => "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXX",
|
// "placeholder" => "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXX",
|
||||||
"link" => 'https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page',
|
// "link" => 'https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page',
|
||||||
),
|
// ),
|
||||||
"General"=> array(
|
"General"=> array(
|
||||||
"name" => "General",
|
"name" => "General",
|
||||||
"icon" => "fab fa-hashtag",
|
"icon" => "fab fa-hashtag",
|
||||||
|
@ -108,7 +108,7 @@ class SlackSettingsForm extends Component
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->isDisabled= 'disabled';
|
$this->isDisabled= 'disabled';
|
||||||
return session()->flash('error' , trans('admin/settings/message.webhook.error', ['error_message' => $e->getMessage()]));
|
return session()->flash('error' , trans('admin/settings/message.webhook.error', ['error_message' => $e->getMessage(), 'app' => $this->webhook_name]));
|
||||||
}
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AddsWebhookOptionToSettingsTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('settings', function (Blueprint $table) {
|
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_botname', 'webhook_botname');
|
||||||
$table->renameColumn('slack_endpoint', 'webhook_endpoint');
|
$table->renameColumn('slack_endpoint', 'webhook_endpoint');
|
||||||
$table->renameColumn('slack_channel', 'webhook_channel');
|
$table->renameColumn('slack_channel', 'webhook_channel');
|
||||||
|
|
|
@ -34,11 +34,11 @@ return [
|
||||||
'authentication_success' => 'User authenticated against LDAP successfully!'
|
'authentication_success' => 'User authenticated against LDAP successfully!'
|
||||||
],
|
],
|
||||||
'webhook' => [
|
'webhook' => [
|
||||||
'sending' => 'Sending Slack test message...',
|
'sending' => 'Sending :app test message...',
|
||||||
'success_pt1' => 'Success! Check the ',
|
'success_pt1' => 'Success! Check the ',
|
||||||
'success_pt2' => ' channel for your test message, and be sure to click SAVE below to store your settings.',
|
'success_pt2' => ' channel for your test message, and be sure to click SAVE below to store your settings.',
|
||||||
'500' => '500 Server Error.',
|
'500' => '500 Server Error.',
|
||||||
'error' => 'Something went wrong. Slack responded with: :error_message',
|
'error' => 'Something went wrong. :app responded with: :error_message',
|
||||||
'error_misc' => 'Something went wrong. :( ',
|
'error_misc' => 'Something went wrong. :( ',
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
class="form-control "
|
class="form-control "
|
||||||
>
|
>
|
||||||
<option value="Slack">Slack</option>
|
<option value="Slack">Slack</option>
|
||||||
<option value="Discord">Discord</option>
|
{{-- <option value="Discord">Discord</option>--}}
|
||||||
<option value="General">General Webhook</option>
|
<option value="General">General Webhook</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -83,10 +83,12 @@
|
||||||
<p class="text-warning"><i
|
<p class="text-warning"><i
|
||||||
class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
||||||
placeholder={{$webhook_placeholder}} {{old('webhook_endpoint', $webhook_endpoint)}}>
|
placeholder="{{$webhook_placeholder}}"
|
||||||
|
value="{{old('webhook_endpoint', $webhook_endpoint)}}">
|
||||||
@else
|
@else
|
||||||
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
||||||
placeholder={{$webhook_placeholder}} {{old('webhook_endpoint', $webhook_endpoint)}}>
|
placeholder="{{$webhook_placeholder}}"
|
||||||
|
value="{{old('webhook_endpoint', $webhook_endpoint)}}">
|
||||||
@endif
|
@endif
|
||||||
{!! $errors->first('webhook_endpoint', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
{!! $errors->first('webhook_endpoint', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue