mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -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 $webhook_name;
|
||||
public $webhook_link;
|
||||
public $webhook_test;
|
||||
public $webhook_placeholder;
|
||||
public $webhook_icon;
|
||||
public $webhook_selected;
|
||||
|
@ -41,18 +42,21 @@ class SlackSettingsForm extends Component
|
|||
"icon" => 'fab fa-slack',
|
||||
"placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX",
|
||||
"link" => 'https://api.slack.com/messaging/webhooks',
|
||||
"test" => 'testWebhook'
|
||||
),
|
||||
"general" => array(
|
||||
"name" => trans('admin/settings/general.general_webhook'),
|
||||
"icon" => "fab fa-hashtag",
|
||||
"placeholder" => "",
|
||||
"link" => "",
|
||||
"test" => 'testWebhook'
|
||||
),
|
||||
"google" => array(
|
||||
"name" => trans('admin/settings/general.google_workspaces'),
|
||||
"icon" => "fa-brands fa-google",
|
||||
"placeholder" => "",
|
||||
"link" => "",
|
||||
"placeholder" => "https://chat.googleapis.com/v1/spaces/xxxxxxxx/messages?key=xxxxxx",
|
||||
"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'));
|
||||
|
||||
}
|
||||
public function googleWebhookTest(){
|
||||
|
||||
}
|
||||
|
||||
public function clearSettings(){
|
||||
|
|
|
@ -106,15 +106,17 @@
|
|||
@endif
|
||||
|
||||
<!-- Webhook botname -->
|
||||
<div class="form-group{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_name ])) }}
|
||||
@if($webhook_selected != 'microsoft' && $webhook_selected != 'google')
|
||||
<div class="form-group{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_name ])) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="text" wire:model.lazy="webhook_botname" class='form-control' placeholder="Snipe-Bot" {{ old('webhook_botname', $webhook_botname)}}{{ Helper::isDemoMode() ? ' disabled' : ''}}>
|
||||
{!! $errors->first('webhook_botname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div><!--col-md-10-->
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="text" wire:model.lazy="webhook_botname" class='form-control' placeholder="Snipe-Bot" {{ old('webhook_botname', $webhook_botname)}}{{ Helper::isDemoMode() ? ' disabled' : ''}}>
|
||||
{!! $errors->first('webhook_botname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div><!--col-md-10-->
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!Helper::isDemoMode())
|
||||
@include('partials.forms.demo-mode')
|
||||
|
|
Loading…
Reference in a new issue