2023-01-25 16:22:34 -08:00
|
|
|
|
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
<div class="col-md-12" style="border-top: 0px;">
|
2023-02-01 16:51:05 -08:00
|
|
|
@if (session()->has('save'))
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="alert alert-success fade in">
|
2023-02-01 16:51:05 -08:00
|
|
|
{{session('save')}}
|
2023-01-31 11:32:05 -08:00
|
|
|
</div>
|
|
|
|
@endif
|
2023-02-15 14:45:18 -08:00
|
|
|
|
|
|
|
@if(session()->has('success'))
|
|
|
|
<div class="alert alert-success fade in">
|
|
|
|
{{session('success')}}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@if(session()->has('error'))
|
|
|
|
<div class="alert alert-danger fade in">
|
|
|
|
{{session('error')}}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@if(session()->has('message'))
|
|
|
|
<div class="alert alert-danger fade in">
|
|
|
|
{{session('message')}}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<form class="form-horizontal" role="form" wire:submit.prevent="submit">
|
2023-01-31 11:32:05 -08:00
|
|
|
{{csrf_field()}}
|
2023-02-01 12:08:13 -08:00
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
<!--slack endpoint-->
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="form-group{{ $errors->has('slack_endpoint') ? ' error' : '' }}">
|
2023-01-31 11:32:05 -08:00
|
|
|
<div class="col-md-2">
|
|
|
|
{{ Form::label('slack_endpoint', trans('admin/settings/general.slack_endpoint')) }}
|
2023-01-25 16:22:34 -08:00
|
|
|
</div>
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="col-md-8 required">
|
2023-01-31 11:32:05 -08:00
|
|
|
@if (config('app.lock_passwords')===true)
|
|
|
|
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_endpoint" class= 'form-control' placeholder="https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX" {{old('slack_endpoint', $slack_endpoint)}}>
|
2023-01-31 11:32:05 -08:00
|
|
|
@else
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_endpoint" class= 'form-control' placeholder="https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX" {{old('slack_endpoint', $slack_endpoint)}}>
|
2023-01-31 11:32:05 -08:00
|
|
|
@endif
|
|
|
|
{!! $errors->first('slack_endpoint', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- slack channel -->
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="form-group{{ $errors->has('slack_channel') ? ' error' : '' }}">
|
2023-01-31 11:32:05 -08:00
|
|
|
<div class="col-md-2">
|
|
|
|
{{ Form::label('slack_channel', trans('admin/settings/general.slack_channel')) }}
|
|
|
|
</div>
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="col-md-8 required">
|
2023-01-31 11:32:05 -08:00
|
|
|
@if (config('app.lock_passwords')===true)
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_channel" class='form-control' placeholder="#IT-Ops" value="{{old('slack_channel', $slack_channel)}}">
|
2023-01-31 11:32:05 -08:00
|
|
|
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
2023-01-25 16:22:34 -08:00
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
@else
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_channel" class= 'form-control' placeholder="#IT-Ops" value="{{old('slack_channel', $slack_channel)}}">
|
2023-01-31 11:32:05 -08:00
|
|
|
@endif
|
|
|
|
{!! $errors->first('slack_channel', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-30 16:10:02 -08:00
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
<!-- slack botname -->
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="form-group{{ $errors->has('slack_botname') ? ' error' : '' }}">
|
2023-01-31 11:32:05 -08:00
|
|
|
<div class="col-md-2">
|
|
|
|
{{ Form::label('slack_botname', trans('admin/settings/general.slack_botname')) }}
|
2023-01-25 16:22:34 -08:00
|
|
|
</div>
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="col-md-8 required">
|
2023-01-31 11:32:05 -08:00
|
|
|
@if (config('app.lock_passwords')===true)
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_botname" class= 'form-control' placeholder="Snipe-Bot" {{old('slack_botname', $slack_botname)}}>
|
2023-01-31 11:32:05 -08:00
|
|
|
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
2023-01-25 16:22:34 -08:00
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
@else
|
2023-02-15 14:45:18 -08:00
|
|
|
<input type="text" wire:model.lazy="slack_botname" class= 'form-control' placeholder="Snipe-Bot" {{old('slack_botname', $slack_botname)}}>
|
2023-01-31 11:32:05 -08:00
|
|
|
@endif
|
|
|
|
{!! $errors->first('slack_botname', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
|
|
</div><!--col-md-10-->
|
|
|
|
</div>
|
2023-01-25 16:22:34 -08:00
|
|
|
|
2023-02-01 12:08:13 -08:00
|
|
|
<!--Slack Integration Test-->
|
|
|
|
@if($slack_endpoint != null && $slack_channel != null && $slack_botname != null)
|
2023-02-01 16:51:05 -08:00
|
|
|
<div class="form-group">
|
2023-02-15 14:45:18 -08:00
|
|
|
<div class="col-md-offset-2 col-md-8">
|
|
|
|
<a href="#" wire:click.prevent="testSlack" class="btn btn-default btn-sm pull-left"><span>{!! trans('admin/settings/general.slack_test') !!}</span></a>
|
2023-02-15 14:06:40 -08:00
|
|
|
<div wire:loading><span style="padding-left: 5px; font-size: 20px"><i class="fas fa-spinner fa-spin"></i></span></div>
|
2023-02-01 12:08:13 -08:00
|
|
|
</div>
|
2023-02-01 16:51:05 -08:00
|
|
|
</div>
|
2023-02-01 12:08:13 -08:00
|
|
|
@endif
|
|
|
|
|
2023-02-01 16:51:05 -08:00
|
|
|
<div class="box-footer" style="margin-top: 45px;">
|
|
|
|
<div class="text-right col-md-12">
|
2023-01-31 11:32:05 -08:00
|
|
|
<a class="btn btn-link text-left" href="{{ route('settings.index') }}">{{ trans('button.cancel') }}</a>
|
2023-02-15 14:45:18 -08:00
|
|
|
<button type="submit" class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
2023-01-31 11:32:05 -08:00
|
|
|
</div>
|
|
|
|
</div><!--box-footer-->
|
2023-01-30 16:10:02 -08:00
|
|
|
</form>
|
|
|
|
|
2023-01-31 11:32:05 -08:00
|
|
|
</div> <!-- /box -->
|
2023-01-30 16:10:02 -08:00
|
|
|
|
2023-01-26 15:17:08 -08:00
|
|
|
|