mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
adding a test variable for test methods
This commit is contained in:
parent
ada1a593a4
commit
1d3124f89f
|
@ -15,6 +15,7 @@ class SlackSettingsForm extends Component
|
||||||
public $isDisabled ='disabled' ;
|
public $isDisabled ='disabled' ;
|
||||||
public $webhook_name;
|
public $webhook_name;
|
||||||
public $webhook_link;
|
public $webhook_link;
|
||||||
|
public $webhook_test;
|
||||||
public $webhook_placeholder;
|
public $webhook_placeholder;
|
||||||
public $webhook_icon;
|
public $webhook_icon;
|
||||||
public $webhook_selected;
|
public $webhook_selected;
|
||||||
|
@ -41,18 +42,21 @@ class SlackSettingsForm extends Component
|
||||||
"icon" => 'fab fa-slack',
|
"icon" => 'fab fa-slack',
|
||||||
"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',
|
||||||
|
"test" => 'testWebhook'
|
||||||
),
|
),
|
||||||
"general" => array(
|
"general" => array(
|
||||||
"name" => trans('admin/settings/general.general_webhook'),
|
"name" => trans('admin/settings/general.general_webhook'),
|
||||||
"icon" => "fab fa-hashtag",
|
"icon" => "fab fa-hashtag",
|
||||||
"placeholder" => "",
|
"placeholder" => "",
|
||||||
"link" => "",
|
"link" => "",
|
||||||
|
"test" => 'testWebhook'
|
||||||
),
|
),
|
||||||
"google" => array(
|
"google" => array(
|
||||||
"name" => trans('admin/settings/general.google_workspaces'),
|
"name" => trans('admin/settings/general.google_workspaces'),
|
||||||
"icon" => "fa-brands fa-google",
|
"icon" => "fa-brands fa-google",
|
||||||
"placeholder" => "",
|
"placeholder" => "https://chat.googleapis.com/v1/spaces/xxxxxxxx/messages?key=xxxxxx",
|
||||||
"link" => "",
|
"link" => "https://developers.google.com/chat/how-tos/webhooks#register_the_incoming_webhook",
|
||||||
|
"test" => 'googleWebhookTest'
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -145,6 +149,9 @@ class SlackSettingsForm extends Component
|
||||||
|
|
||||||
return session()->flash('error' , trans('admin/settings/message.webhook.error_misc'));
|
return session()->flash('error' , trans('admin/settings/message.webhook.error_misc'));
|
||||||
|
|
||||||
|
}
|
||||||
|
public function googleWebhookTest(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearSettings(){
|
public function clearSettings(){
|
||||||
|
|
|
@ -106,6 +106,7 @@
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Webhook botname -->
|
<!-- Webhook botname -->
|
||||||
|
@if($webhook_selected != 'microsoft' && $webhook_selected != 'google')
|
||||||
<div class="form-group{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
<div class="form-group{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_name ])) }}
|
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_name ])) }}
|
||||||
|
@ -115,6 +116,7 @@
|
||||||
{!! $errors->first('webhook_botname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
{!! $errors->first('webhook_botname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||||
</div><!--col-md-10-->
|
</div><!--col-md-10-->
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (!Helper::isDemoMode())
|
@if (!Helper::isDemoMode())
|
||||||
@include('partials.forms.demo-mode')
|
@include('partials.forms.demo-mode')
|
||||||
|
|
Loading…
Reference in a new issue