Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
2ab98a36d5 | |||
b8a4e9d660 | |||
037abb1749 | |||
be6061fb6e | |||
ba18a2a21c | |||
83470c3ff5 | |||
d5d7f4f4a0 | |||
d7897d5c66 |
@ -1,16 +1,16 @@
|
||||
@if(isset($label))
|
||||
<label {{ $attributes->only(['class']) }} for="{{ $id ?? $name }}">{{ $label }}</label>
|
||||
@endisset
|
||||
<div class="form-group">
|
||||
@if(isset($label))
|
||||
<label {{ $attributes->only(['class']) }} for="{{ $id ?? $name }}">{{ $label }}</label>
|
||||
@endisset
|
||||
<div class="input-group has-validation">
|
||||
@if(isset($icon) || isset($prepend))
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">@isset($icon)<i class="fas fa-fw {{ $icon }}"></i>@endisset @isset($prepend){!! $prepend !!}@endisset</span>
|
||||
</div>
|
||||
@endif()
|
||||
@endif
|
||||
{{ $slot }}
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error($old ?? $name)
|
||||
<span class="invalid-feedback">
|
||||
@error((! empty($old)) ? $old : $name)
|
||||
{{ $message }}
|
||||
@elseif(isset($feedback))
|
||||
{{ $feedback }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<div class="form-check text-right">
|
||||
<input type="checkbox" class="form-check-input {{ $class ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @checked(isset($checked)) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="checkbox" class="form-check-input {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @checked(old($old ?? $name)) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</div>
|
||||
</x-leenooks::form.base>
|
@ -1,3 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="date" class="form-control {{ $classes ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="date" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,3 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="email" class="form-control {{ $classes ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="email" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,5 +1,5 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="file" class="form-control {{ $classes ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="file" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
||||
{{ $slot }}
|
||||
|
||||
|
3
resources/components/form/number.blade.php
Normal file
3
resources/components/form/number.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="number" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,3 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="password" class="form-control {{ $classes ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="password" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,29 +1,31 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="hidden" id="{{ $name }}_disabled" name="{{ $name }}" value="" disabled>
|
||||
<select class="form-control @error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @required(isset($required)) @disabled(isset($disabled))>
|
||||
@if(! empty($value) || isset($addnew) || isset($choose))
|
||||
<select class="form-control @error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @required(isset($required)) @disabled(isset($disabled))>
|
||||
@if(empty($value) || isset($addnew) || isset($choose))
|
||||
<option value=""></option>
|
||||
@isset($addnew)
|
||||
<option value="new">{{ $addnew ?: 'Add New' }}</option>
|
||||
@endisset
|
||||
@endif
|
||||
|
||||
@empty($groupby)
|
||||
@foreach($options as $option)
|
||||
@continue(! Arr::get($option,'value'))
|
||||
<option value="{{ Arr::get($option,'id') }}" @selected(Arr::get($option,'id') == old($old ?? $name,$value ?? ''))>{{ Arr::get($option,'value') }}</option>
|
||||
@endforeach
|
||||
@isset($options)
|
||||
@empty($groupby)
|
||||
@foreach($options as $option)
|
||||
@continue(! Arr::get($option,'value'))
|
||||
<option value="{{ Arr::get($option,'id') }}" @selected(Arr::get($option,'id') == old($old ?? $name,$value ?? ''))>{{ Arr::get($option,'value') }}</option>
|
||||
@endforeach
|
||||
|
||||
@else
|
||||
@foreach($options->groupBy($groupby) as $group)
|
||||
<optgroup label="{{ $groupby == 'active' ? (Arr::get($group->first(),$groupby) ? 'Active' : 'Not Active') : Arr::get($group->first(),$groupby) }}">
|
||||
@foreach($group as $option)
|
||||
@continue(! Arr::get($option,'value'))
|
||||
<option value="{{ Arr::get($option,'id') }}" @selected(Arr::get($option,'id') == old($old ?? $name,$value ?? ''))>{{ Arr::get($option,'value') }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
@endempty
|
||||
@else
|
||||
@foreach($options->groupBy($groupby) as $group)
|
||||
<optgroup label="{{ $groupby == 'active' ? (Arr::get($group->first(),$groupby) ? 'Active' : 'Not Active') : Arr::get($group->first(),$groupby) }}">
|
||||
@foreach($group as $option)
|
||||
@continue(! Arr::get($option,'value'))
|
||||
<option value="{{ Arr::get($option,'id') }}" @selected(Arr::get($option,'id') == old($old ?? $name,$value ?? ''))>{{ Arr::get($option,'value') }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
@endempty
|
||||
@endisset
|
||||
</select>
|
||||
</x-leenooks::form.base>
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="text" class="form-control {{ $class ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" placeholder="{{ $placeholder ?? '' }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="text" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" placeholder="{{ $placeholder ?? '' }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,3 +1,43 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<textarea class="form-control {{ $classes ?? ''}} @error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @isset($placeholder)placeholder="{{ $placeholder }}"@endisset @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>{{ old($old ?? $name,$value ?? '') }}</textarea>
|
||||
</x-leenooks::form.base>
|
||||
|
||||
<div class="form-group">
|
||||
@if(isset($label))
|
||||
<label {{ $attributes->only(['class']) }} for="{{ $id ?? $name }}">{{ $label }}</label>
|
||||
@endisset
|
||||
<div class="input-group has-validation">
|
||||
@if(isset($icon) || isset($prepend))
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">@isset($icon)<i class="fas fa-fw {{ $icon }}"></i>@endisset @isset($prepend){!! $prepend !!}@endisset</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="w-100">
|
||||
<textarea class="form-control {{ $class ?? ''}} @error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @isset($placeholder)placeholder="{{ $placeholder }}"@endisset @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>{{ old($old ?? $name,$value ?? '') }}</textarea>
|
||||
<span class="invalid-feedback">
|
||||
@error($old ?? $name)
|
||||
{{ $message }}
|
||||
@elseif(isset($feedback))
|
||||
{{ $feedback }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@isset($helper)
|
||||
<span class="input-helper">{{ $helper }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@pa(simplemde)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
new SimpleMDE({
|
||||
element: $('#{{ $id ?? $name }}')[0],
|
||||
forceSync: true
|
||||
});
|
||||
|
||||
@error($old ?? $name)
|
||||
$('div.CodeMirror-wrap').addClass('form-control is-invalid');
|
||||
@enderror
|
||||
});
|
||||
</script>
|
||||
@append
|
3
resources/components/form/time.blade.php
Normal file
3
resources/components/form/time.blade.php
Normal file
@ -0,0 +1,3 @@
|
||||
<x-leenooks::form.base {{ $attributes }}>
|
||||
<input type="time" class="form-control {{ $class ?? ''}}@error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
</x-leenooks::form.base>
|
@ -1,12 +1,12 @@
|
||||
<div class="form-group">
|
||||
<div class="input-group has-validation">
|
||||
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
|
||||
<input type="checkbox" class="custom-control-input @error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @checked(old($old ?? $name,$value ?? '')) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
<input type="checkbox" class="custom-control-input @error((! empty($old)) ? $old : $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @checked(old($old ?? $name,$value ?? '')) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||
@if(isset($label))
|
||||
<label class="custom-control-label" for="{{ $id ?? $name }}">{{ $label }}</label>
|
||||
@endif
|
||||
</div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<span class="invalid-feedback">
|
||||
@error($name)
|
||||
{{ $message }}
|
||||
@elseif(isset($feedback))
|
||||
|
@ -120,7 +120,7 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#passkey').on('click',function() {
|
||||
passkey_check('{{ csrf_token() }}','/passkey/loggedin');
|
||||
passkey_check('{{ csrf_token() }}','{{ redirect()->intended("/passkey/loggedin")->getTargetUrl() }}');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav class="mt-2">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" data-accordion="false">
|
||||
<!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library -->
|
||||
@include('adminlte::layouts.partials.sidebarmenu')
|
||||
</ul>
|
||||
|
@ -1,3 +0,0 @@
|
||||
@include('adminlte::widget.success')
|
||||
|
||||
@include('adminlte::widget.errors')
|
@ -1,10 +0,0 @@
|
||||
<!-- Success -->
|
||||
@if(session()->has('success'))
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-check"></i> Success!</h5>
|
||||
<ul>
|
||||
<li>{{ session()->get('success') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Leenooks\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
|
||||
class ScheduleList extends Command
|
||||
{
|
||||
protected $signature = 'schedule:list';
|
||||
|
||||
protected $description = 'List when scheduled commands are executed.';
|
||||
|
||||
/**
|
||||
* @var Schedule
|
||||
*/
|
||||
protected $schedule;
|
||||
|
||||
/**
|
||||
* ScheduleList constructor.
|
||||
*
|
||||
* @param Schedule $schedule
|
||||
*/
|
||||
public function __construct(Schedule $schedule)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->schedule = $schedule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$events = array_map(function ($event) {
|
||||
return [
|
||||
'cron' => $event->expression,
|
||||
'command' => static::fixupCommand($event->command),
|
||||
];
|
||||
}, $this->schedule->events());
|
||||
|
||||
$this->table(
|
||||
['Cron', 'Command'],
|
||||
$events
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* If it's an artisan command, strip off the PHP
|
||||
*
|
||||
* @param $command
|
||||
* @return string
|
||||
*/
|
||||
protected static function fixupCommand($command)
|
||||
{
|
||||
$parts = explode(' ', $command);
|
||||
if (count($parts) > 2 && $parts[1] === "'artisan'") {
|
||||
array_shift($parts);
|
||||
}
|
||||
|
||||
return implode(' ', $parts);
|
||||
}
|
||||
}
|
@ -121,6 +121,16 @@ class PageAssets
|
||||
],
|
||||
]
|
||||
],
|
||||
'simplemde' => [
|
||||
'base' => [
|
||||
'css' => [
|
||||
'//cdn.jsdelivr.net/simplemde/latest/simplemde.min.css',
|
||||
],
|
||||
'js' => [
|
||||
'//cdn.jsdelivr.net/simplemde/latest/simplemde.min.js',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// Items to manage
|
||||
|
@ -42,6 +42,7 @@ class CustomBladeServiceProvider extends ServiceProvider
|
||||
switch ($type) {
|
||||
case 'datatables':
|
||||
case 'select2':
|
||||
case 'simplemde':
|
||||
Log::alert(sprintf('Blade @css/@js for %s deprecicated, use @pa',$type));
|
||||
break;
|
||||
|
||||
@ -147,21 +148,6 @@ class CustomBladeServiceProvider extends ServiceProvider
|
||||
|
||||
break;
|
||||
|
||||
case 'simplemde':
|
||||
switch ($content) {
|
||||
case 'css':
|
||||
// Base
|
||||
$css->put($type,'https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css');
|
||||
|
||||
break;
|
||||
|
||||
case 'js':
|
||||
// Base
|
||||
$js->put($type,'https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'summernote':
|
||||
switch ($content) {
|
||||
case 'css':
|
||||
|
@ -4,13 +4,12 @@ namespace Leenooks\Providers;
|
||||
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Leenooks\Http\Middleware\GuestUser;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Leenooks\Http\Middleware\GuestUser;
|
||||
use Leenooks\PageAssets;
|
||||
use Leenooks\Traits\SingleOrFail;
|
||||
use Orchestra\Support\Facades\Asset;
|
||||
|
||||
/**
|
||||
* Class GuestUserServiceProvider.
|
||||
|
15
src/Traits/ObjectIssetFix.php
Normal file
15
src/Traits/ObjectIssetFix.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Fix for when there is a call to pluck() for values resolved via __get()
|
||||
*/
|
||||
namespace Leenooks\Traits;
|
||||
|
||||
trait ObjectIssetFix
|
||||
{
|
||||
// Fix for a call to pluck('something') (which is resolved via __get()), but it returns false.
|
||||
public function __isset($key)
|
||||
{
|
||||
return (bool)$this->{$key};
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user