mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Don't use @lang() it doesn't escape the string Found an issue where a string contained a single quote and broke the page. * fix regex errors * fix another style of mis-replacement * found another issue
38 lines
1.8 KiB
PHP
38 lines
1.8 KiB
PHP
@extends('widgets.settings.base')
|
|
|
|
@section('form')
|
|
<div class="form-group">
|
|
<label for="title-{{ $id }}" class="control-label">{{ __('Widget title') }}</label>
|
|
<input type="text" class="form-control" name="title" id="title-{{ $id }}" placeholder="{{ __('Custom title') }}" value="{{ $title }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="min_severity-{{ $id }}" class="control-label">{{ __('Displayed severity') }}:</label>
|
|
<select class="form-control" name="min_severity" id="min_severity-{{ $id }}">
|
|
<option value="">{{ __('any severity') }}</option>
|
|
@foreach($severities as $name => $val)
|
|
<option value="{{ $val }}" @if($min_severity == $val) selected @endif>{{ $name }}{{$val > 3 ? '' : ' ' . __('or higher')}}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="time_interval-{{ $id }}" class="control-label">{{ __('Last days') }}</label>
|
|
<input class="form-control" name="time_interval" id="time_interval-{{ $id }}" value="{{ $time_interval }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="hidenavigation-{{ $id }}" class="control-label">{{ __('Hide Navigation') }}</label>
|
|
<input type="checkbox" class="form-control" name="hidenavigation" id="hidenavigation-{{ $id }}" value="{{ $hidenavigation }}" data-size="normal" @if($hidenavigation) checked @endif>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script type="text/javascript">
|
|
$('#hidenavigation-{{ $id }}')
|
|
.bootstrapSwitch('offColor','danger')
|
|
.on('switchChange.bootstrapSwitch', function (e, data) {
|
|
var hidenav = $(this).is(':checked') ? "1": "0";
|
|
$('#hidenavigation-{{ $id }}').val(hidenav);
|
|
});
|
|
</script>
|
|
@endsection
|
|
|