mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
follow best practices when working with blade and javascript
This commit is contained in:
parent
825a9a384d
commit
daf6bcb6d5
|
@ -71,14 +71,11 @@
|
|||
|
||||
@section('moar_scripts')
|
||||
<!-- bootstrap color picker -->
|
||||
<?php
|
||||
$color = request()->old('color', $item->color) ? request()->old('color', $item->color) : '#AA3399';
|
||||
?>
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
$(function() {
|
||||
$('.color').colorpicker({
|
||||
color: '{{ $color }}',
|
||||
color: `{{ old('color', $item->color) ?: '#AA3399' }}`,
|
||||
format: 'hex'
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue