Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2024-04-15 09:46:23 +02:00
commit a2bbacd705
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 55 additions and 54 deletions

View file

@ -63,10 +63,8 @@ class SecureHeaders
'https://www.google.com/recaptcha/',
'https://www.gstatic.com/recaptcha/',
'https://yl.s-web.fr',
'https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js',
'https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js',
'https://cdn.jsdelivr.net/npm/sweetalert2@11.0.16/dist/sweetalert2.all.min.js',
'https://cdn.jsdelivr.net/npm/sweetalert2@10'
'https://cdn.ckeditor.com',
'https://cdn.jsdelivr.net',
]) . ' ' . $jsDev . ';'
];
$response->headers->set(

View file

@ -1,61 +1,64 @@
<div class="forms-group">
<div class="form-group">
<label for="title">{{ __('Titre') }} *</label>
<input type="text" id="title" name="title" class="form-control" placeholder="{{ __('Titre') }} *" value="{{ old('title', $text->title ?? '') }}" required>
@include('back.modules.input-error', ['inputName'=>'title'])
<input class="form-control" id="title" name="title" type="text" value="{{ old('title', $text->title ?? '') }}"
placeholder="{{ __('Titre') }} *" required>
@include('back.modules.input-error', ['inputName' => 'title'])
</div>
<div class="form-group">
<div class="form-group">
<label for="text">{{ __('Texte') }} *</label>
<textarea class="form-control" placeholder="{{ __('Texte') }}" id="text" name="text" style="height: 150px;">{{ old('commentaire', $text->text ?? '') }}</textarea>
@include('back.modules.input-error', ['inputName'=>'text'])
<textarea class="form-control" id="text" name="text" style="height: 150px;" placeholder="{{ __('Texte') }}">{{ old('commentaire', $text->text ?? '') }}</textarea>
@include('back.modules.input-error', ['inputName' => 'text'])
</div>
</div>
@push('scripts')
<script type="text/javascript">
var editorConfig = {
removePlugins: ["Image", "ImageCaption", "ImageStyle", "ImageToolbar", "ImageUpload"],
toolbar: ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', '|', 'blockQuote', 'insertTable', '|', 'undo', 'redo'],
heading: {
options: [{
model: 'paragraph',
title: 'Paragraph',
class: 'ck-heading_paragraph'
<script type="text/javascript" nonce="{{ $nonce }}">
var editorConfig = {
removePlugins: ["Image", "ImageCaption", "ImageStyle", "ImageToolbar", "ImageUpload"],
toolbar: ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', '|', 'blockQuote', 'insertTable', '|',
'undo', 'redo'
],
heading: {
options: [{
model: 'paragraph',
title: 'Paragraph',
class: 'ck-heading_paragraph'
},
{
model: 'heading1',
view: 'h1',
title: 'Heading 1',
class: 'ck-heading_heading1'
},
{
model: 'heading2',
view: 'h2',
title: 'Heading 2',
class: 'ck-heading_heading2'
},
{
model: 'heading3',
view: 'h3',
title: 'Heading 3',
class: 'ck-heading_heading3'
},
{
model: 'heading4',
view: 'h4',
title: 'Heading 4',
class: 'ck-heading_heading4'
}
]
},
{
model: 'heading1',
view: 'h1',
title: 'Heading 1',
class: 'ck-heading_heading1'
},
{
model: 'heading2',
view: 'h2',
title: 'Heading 2',
class: 'ck-heading_heading2'
},
{
model: 'heading3',
view: 'h3',
title: 'Heading 3',
class: 'ck-heading_heading3'
},
{
model: 'heading4',
view: 'h4',
title: 'Heading 4',
class: 'ck-heading_heading4'
table: {
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells']
}
]
},
table: {
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells']
}
};
ClassicEditor
.create(document.querySelector('#text'), editorConfig)
.catch(error => {
console.error(error);
});
</script>
@endpush
};
ClassicEditor
.create(document.querySelector('#text'), editorConfig)
.catch(error => {
console.error(error);
});
</script>
@endpush