mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 18:59:09 -04:00
69 lines
3.0 KiB
PHP
69 lines
3.0 KiB
PHP
@extends('layouts.admin.main')
|
|
|
|
@section('content')
|
|
<div class="col-md-12">
|
|
<div class="card">
|
|
<div class="card-header card-header-primary">
|
|
<h4>Ajouter une images</h4>
|
|
</div>
|
|
<div class="card-body mt-5">
|
|
<form action="/admin/picture/edit/{{$picture->id}}" method="post" enctype="multipart/form-data">
|
|
|
|
@csrf
|
|
|
|
<div class="col-lg-12">
|
|
<div class="form-group">
|
|
<label>Nom de l'image</label>
|
|
<input name="title" type="text" class="form-control" value="{{$picture->title}}">
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<div class="form-group bmd-form-group is-filled">
|
|
<label class="label-control bmd-label-static">Choisir l'image</label>
|
|
<div class="fileinput fileinput-new input-group" data-provides="fileinput" style="display: flex !important;">
|
|
<div class="form-control" data-trigger="fileinput">
|
|
<span class="fileinput-filename"></span>
|
|
</div>
|
|
<span class="input-group-append"><span class="input-group-text fileinput-exists cursor" data-dismiss="fileinput">Remove</span><span class="input-group-text btn-file"><span class="fileinput-new cursor">Select file</span><span class="fileinput-exists cursor">Change</span><input type="file" name="file" accept="image/*"></span></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<label for="desc">Description de l'image</label>
|
|
<div class="form-group">
|
|
<textarea name="desc" id="desc" class="form-control">{!!$picture->desc!!}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<button type="submit" class="btn btn-primary">Sauvegarder</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
|
|
@section('custom_scripts')
|
|
<script>
|
|
$('#desc').trumbowyg({
|
|
lang: 'fr'
|
|
});
|
|
function saveChange(pPerm) {
|
|
(function($) {
|
|
var myswitch = document.getElementById(pPerm);
|
|
$.post('/api/config/general/save?api_token='+api_token, { value: myswitch.checked,perm: pPerm } , function(data) {
|
|
swal({
|
|
title: 'Modification enregistré !',
|
|
type: 'success',
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
location.reload();
|
|
}
|
|
})
|
|
});
|
|
})(jQuery);
|
|
}
|
|
</script>
|
|
@endsection
|