mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Remove old Theme::js calls in blade layouts. Persist checkboxes, Server Owner, Node, Default Allocation, and Additional Allocations on servers/new.blade.php
This commit is contained in:
@@ -6,6 +6,7 @@ use Exception;
|
||||
use Carbon\Carbon;
|
||||
use Cron\CronExpression;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\ViewErrorBag;
|
||||
|
||||
class Utilities
|
||||
{
|
||||
@@ -50,4 +51,15 @@ class Utilities
|
||||
sprintf('%s %s %s * %s', $minute, $hour, $dayOfMonth, $dayOfWeek)
|
||||
)->getNextRunDate());
|
||||
}
|
||||
|
||||
public static function checked($name, $default)
|
||||
{
|
||||
$errors = session('errors');
|
||||
|
||||
if (isset($errors) && $errors instanceof ViewErrorBag && $errors->any()) {
|
||||
return old($name) ? 'checked' : '';
|
||||
}
|
||||
|
||||
return ($default) ? 'checked' : '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user