mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 15:09:40 -08:00
Merge pull request #12667 from snipe/fixes/small_livewire_ui_fixed
Small UI tweaks
This commit is contained in:
commit
b83980299a
|
@ -406,6 +406,7 @@ return [
|
||||||
'tasks_view_all' => 'View all tasks',
|
'tasks_view_all' => 'View all tasks',
|
||||||
'true' => 'True',
|
'true' => 'True',
|
||||||
'false' => 'False',
|
'false' => 'False',
|
||||||
|
'integration_option' => 'Integration Option',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
|
{{-- Page title --}}
|
||||||
|
@section('title')
|
||||||
|
{{ trans('admin/settings/general.webhook_title') }}
|
||||||
|
@parent
|
||||||
|
@stop
|
||||||
|
|
||||||
{{-- Page title --}}
|
@section('header_right')
|
||||||
@section('title')
|
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
|
||||||
{{ trans('admin/settings/general.webhook_title') }}
|
@stop
|
||||||
@parent
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('header_right')
|
|
||||||
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
|
|
||||||
{{-- Page content --}}
|
{{-- Page content --}}
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<form class="form-horizontal" role="form" wire:submit.prevent="submit">
|
||||||
|
{{csrf_field()}}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
|
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
|
||||||
<div class="panel box box-default">
|
<div class="panel box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h2 class="box-title">
|
<h2 class="box-title">
|
||||||
<i class="{{$webhook_icon}}"></i> {{ trans('admin/settings/general.webhook', ['app'=>$webhook_name] ) }}
|
<i class="{{$webhook_icon}}"></i> {{ trans('admin/settings/general.webhook', ['app' => $webhook_name] ) }}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
@ -32,7 +34,7 @@
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12" style="border-top: 0px;">
|
<div class="col-md-12">
|
||||||
@if (session()->has('save'))
|
@if (session()->has('save'))
|
||||||
<div class="alert alert-success fade in">
|
<div class="alert alert-success fade in">
|
||||||
{{session('save')}}
|
{{session('save')}}
|
||||||
|
@ -55,84 +57,77 @@
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="form-group" style="margin-left:-14px;">
|
|
||||||
<div class="col-md-2">
|
<div class="form-group col-md-12 required">
|
||||||
<label>Integration Option</label>
|
<div class="col-md-3">
|
||||||
|
<label for="webhook_selected">
|
||||||
|
{{ trans('general.integration_option') }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8"style="margin-left: 2px;">
|
|
||||||
<select wire:model="webhook_selected"
|
<div class="col-md-9">
|
||||||
aria-label="webhook_selected"
|
<select wire:model="webhook_selected" aria-label="webhook_selected" class="form-control">
|
||||||
class="form-control "
|
<option value="slack">{{ trans('admin/settings/general.slack') }}</option>
|
||||||
>
|
<option value="general">{{ trans('admin/settings/general.general_webhook') }}</option>
|
||||||
<option value="slack">{{trans('admin/settings/general.slack')}}</option>
|
|
||||||
{{-- <option value="Discord">Discord</option>--}}
|
|
||||||
<option value="general">{{trans('admin/settings/general.general_webhook')}}</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<br><br><br>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<form class="form-horizontal" role="form" wire:submit.prevent="submit">
|
|
||||||
{{csrf_field()}}
|
|
||||||
|
|
||||||
<!--Webhook endpoint-->
|
<!--Webhook endpoint-->
|
||||||
<div class="form-group{{ $errors->has('webhook_endpoint') ? ' error' : '' }}">
|
<div class="form-group col-md-12 required{{ $errors->has('webhook_endpoint') ? ' error' : '' }}">
|
||||||
<div class="col-md-2">
|
|
||||||
{{ Form::label('webhook_endpoint', trans('admin/settings/general.webhook_endpoint',['app' => $webhook_selected ])) }}
|
<div class="col-md-3">
|
||||||
</div>
|
{{ Form::label('webhook_endpoint', trans('admin/settings/general.webhook_endpoint',['app' => ucwords($webhook_selected) ])) }}
|
||||||
<div class="col-md-8 required">
|
|
||||||
@if (config('app.lock_passwords')===true)
|
|
||||||
<p class="text-warning"><i
|
|
||||||
class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
|
||||||
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
|
||||||
placeholder="{{$webhook_placeholder}}"
|
|
||||||
value="{{old('webhook_endpoint', $webhook_endpoint)}}">
|
|
||||||
@else
|
|
||||||
<input type="text" wire:model="webhook_endpoint" class='form-control'
|
|
||||||
placeholder="{{$webhook_placeholder}}"
|
|
||||||
value="{{old('webhook_endpoint', $webhook_endpoint)}}">
|
|
||||||
@endif
|
|
||||||
{!! $errors->first('webhook_endpoint', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Webhook channel -->
|
<div class="col-md-9">
|
||||||
<div class="form-group{{ $errors->has('webhook_channel') ? ' error' : '' }}">
|
@if (config('app.lock_passwords')===true)
|
||||||
<div class="col-md-2">
|
<p class="text-warning">
|
||||||
{{ Form::label('webhook_channel', trans('admin/settings/general.webhook_channel',['app' => $webhook_selected ])) }}
|
<i class="fas fa-lock" aria-hidden="true"></i>
|
||||||
</div>
|
{{ trans('general.feature_disabled') }}
|
||||||
<div class="col-md-8 required">
|
</p>
|
||||||
@if (config('app.lock_passwords')===true)
|
<input type="text" wire:model="webhook_endpoint" class="form-control" placeholder="{{ $webhook_placeholder }}" value="{{ old('webhook_endpoint', $webhook_endpoint) }}">
|
||||||
<input type="text" wire:model="webhook_channel" class='form-control'
|
@else
|
||||||
placeholder="#IT-Ops"
|
<input type="text" wire:model="webhook_endpoint" class="form-control" placeholder="{{ $webhook_placeholder }}" value="{{ old('webhook_endpoint', $webhook_endpoint) }}">
|
||||||
value="{{old('webhook_channel', $webhook_channel)}}">
|
@endif
|
||||||
<p class="text-warning"><i
|
{!! $errors->first('webhook_endpoint', '<span class="alert-msg">:message</span>') !!}
|
||||||
class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
|
||||||
|
|
||||||
@else
|
|
||||||
<input type="text" wire:model="webhook_channel" class='form-control'
|
|
||||||
placeholder="#IT-Ops"
|
|
||||||
value="{{old('webhook_channel', $webhook_channel)}}">
|
|
||||||
@endif
|
|
||||||
{!! $errors->first('webhook_channel', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Webhook channel -->
|
||||||
|
<div class="col-md-12 form-group required{{ $errors->has('webhook_channel') ? ' error' : '' }}">
|
||||||
|
<div class="col-md-3">
|
||||||
|
{{ Form::label('webhook_channel', trans('admin/settings/general.webhook_channel',['app' => ucwords($webhook_selected) ])) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
|
@if (config('app.lock_passwords')===true)
|
||||||
|
<input type="text" wire:model="webhook_channel" class="form-control" placeholder="#IT-Ops" value="{{ old('webhook_channel', $webhook_channel) }}">
|
||||||
|
<p class="text-warning">
|
||||||
|
<i class="fas fa-lock" aria-hidden="true"></i> {{ trans('general.feature_disabled') }}</p>
|
||||||
|
@else
|
||||||
|
<input type="text" wire:model="webhook_channel" class="form-control" placeholder="#IT-Ops" value="{{ old('webhook_channel', $webhook_channel) }}">
|
||||||
|
@endif
|
||||||
|
{!! $errors->first('webhook_channel', '<span class="alert-msg">:message</span>') !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Webhook botname -->
|
<!-- Webhook botname -->
|
||||||
<div class="form-group{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
<div class="col-md-12 form-group required{{ $errors->has('webhook_botname') ? ' error' : '' }}">
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => $webhook_selected ])) }}
|
{{ Form::label('webhook_botname', trans('admin/settings/general.webhook_botname',['app' => ucwords($webhook_selected) ])) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-9">
|
||||||
@if (config('app.lock_passwords')===true)
|
@if (config('app.lock_passwords')===true)
|
||||||
<input type="text" wire:model="webhook_botname" class='form-control'
|
<input type="text" wire:model="webhook_botname" class='form-control'
|
||||||
placeholder="Snipe-Bot" {{old('webhook_botname', $webhook_botname)}}>
|
placeholder="Snipe-Bot" {{old('webhook_botname', $webhook_botname)}}>
|
||||||
<p class="text-warning"><i
|
<p class="text-warning"><i class="fas fa-lock"></i>
|
||||||
class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
{{ trans('general.feature_disabled') }}
|
||||||
|
</p>
|
||||||
@else
|
@else
|
||||||
<input type="text" wire:model="webhook_botname" class='form-control'
|
<input type="text" wire:model="webhook_botname" class="form-control" placeholder="Snipe-Bot" {{old('webhook_botname', $webhook_botname)}}>
|
||||||
placeholder="Snipe-Bot" {{old('webhook_botname', $webhook_botname)}}>
|
|
||||||
@endif
|
@endif
|
||||||
{!! $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-->
|
||||||
|
@ -141,12 +136,20 @@
|
||||||
<!--Webhook Integration Test-->
|
<!--Webhook Integration Test-->
|
||||||
@if($webhook_selected == 'Slack' || $webhook_selected == 'Discord')
|
@if($webhook_selected == 'Slack' || $webhook_selected == 'Discord')
|
||||||
@if($webhook_endpoint != null && $webhook_channel != null)
|
@if($webhook_endpoint != null && $webhook_channel != null)
|
||||||
<div class="form-group">
|
<div class="form-group col-md-12">
|
||||||
<div class="col-md-offset-2 col-md-8">
|
<div class="col-md-offset-3 col-md-9">
|
||||||
|
|
||||||
<a href="#" wire:click.prevent="testWebhook"
|
<a href="#" wire:click.prevent="testWebhook"
|
||||||
class="btn btn-default btn-sm pull-left"><span><i class="{{$webhook_icon}}"></i> {!! trans('admin/settings/general.webhook_test',['app' => $webhook_selected ]) !!}</span></a>
|
class="btn btn-default btn-sm pull-left">
|
||||||
<div wire:loading><span style="padding-left: 5px; font-size: 20px"><i
|
<i class="{{$webhook_icon}}" aria-hidden="true"></i>
|
||||||
class="fas fa-spinner fa-spin"></i></span></div>
|
{!! trans('admin/settings/general.webhook_test',['app' => ucwords($webhook_selected) ]) !!}
|
||||||
|
</a>
|
||||||
|
<div wire:loading>
|
||||||
|
<span style="padding-left: 5px; font-size: 20px">
|
||||||
|
<i class="fas fa-spinner fa-spin" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -161,8 +164,10 @@
|
||||||
aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div><!--box-footer-->
|
</div><!--box-footer-->
|
||||||
</form>
|
|
||||||
|
|
||||||
</div> <!-- /box -->
|
</div> <!-- /box -->
|
||||||
</div> <!-- /.col-md-8-->
|
</div> <!-- /.col-md-8-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
@extends('layouts/default')
|
@extends('layouts/default')
|
||||||
|
@livewire('slack-settings-form')
|
||||||
|
|
||||||
@livewire('slack-settings-form')
|
|
||||||
</div> <!-- /.col-md-8-->
|
|
||||||
</div> <!-- /.row-->
|
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue