Files
aritmija/oldSite/Plugins/Services/Resources/views/form.blade.php
2026-05-13 17:11:09 +02:00

130 lines
4.0 KiB
PHP

<section class="content" id="serviceApp">
<form action="{{ $pageURL }}" method="post" enctype="multipart/form-data">
@csrf
@component('admin::blocks.card_language', ['languages' => $languages])
<div class="tab-content" id="block-tabContent">
@foreach($languages as $lang)
<div class="tab-pane fade show @if($loop->first) active @endif"
id="{{ $lang->iso }}"
role="tabpanel"
aria-labelledby="tab-{{ $lang->iso }}">
<div class="row">
<div class="col col-md-6">
<div class="form-group">
<label class="control-label">{{ trans('admin.HEADLINE') }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<img src="{{ config('cp.admin_path') }}/images/flags/languages/16/{{ $lang->iso }}.png" alt="">
</span>
</div>
<input class="form-control" type="text" name="prevod[{{ $lang->iso }}][headline]" value="{{ $translation[$lang->iso]['headline'] ?? null}}">
</div> <!-- end .input-group -->
</div> <!-- end .form-group -->
<label class="label-control">{{trans('admin.CONTENT')}} 1</label>
<textarea name="prevod[{{ $lang->iso }}][content1]"
class="tinymce2"
style="width:100%;height:150px;">{{ $translation[$lang->iso]['content1'] ?? null }}
</textarea>
<label class="label-control">{{trans('admin.CONTENT')}} 2</label>
<textarea name="prevod[{{ $lang->iso }}][content2]"
class="tinymce2"
style="width:100%;height:150px;">{{ $translation[$lang->iso]['content2'] ?? null }}
</textarea>
</div> <!-- end .col -->
<div class="col col-md-6">
<label class="label-control">{{trans('admin.CONTENT')}} 3</label>
<textarea name="prevod[{{ $lang->iso }}][content3]"
class="tinymce2"
style="width:100%;height:100px;">{{ $translation[$lang->iso]['content3'] ?? null }}
</textarea>
<label class="label-control">{{trans('admin.CONTENT')}} 4</label>
<textarea name="prevod[{{ $lang->iso }}][content4]"
class="tinymce2"
style="width:100%;height:100px;">{{ $translation[$lang->iso]['content4'] ?? null }}
</textarea>
<label class="label-control">{{trans('admin.CONTENT')}} 5</label>
<textarea name="prevod[{{ $lang->iso }}][content5]"
class="tinymce2"
style="width:100%;height:100px;">{{
$translation[$lang->iso]['content5'] ?? null }}
</textarea>
</div> <!-- end .col -->
</div> <!-- end .row -->
<hr>
</div> <!-- end .tab-pane -->
@endforeach
<label>
<input type="hidden" name="active" value="N">
<input type="checkbox" class="minimal" name="active" value="Y"
@if (isset($table->active))
@if($table->active == 'Y')
checked
@endif
@endif
> {{ trans('admin.ACTIVE') }}<br>
</label>
@include('plugin.services::form.layout')
<div class="text-center">
<button type="submit" class="btn btn-success"><i class="fa fa-save fa-fw"></i> {{ trans('admin.SAVE') }}</button>
</div>
</div> <!-- end .tab-content -->
@endcomponent
</form>
</section>
@section('header-addon')
@append
@section('footer-addon')
<script>
$(document).on("change", ".thumbPreview", function(evt) {
var lang = $(this).data('lang');
var files = evt.target.files;
var f = files[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
$('.quickPreview-' + lang).html('<img src="' + e.target.result + '" title="' + theFile.name + '" class="img-responsive">');
};
})(f);
reader.readAsDataURL(f);
});
var app = new Vue({
el: '#serviceApp',
data: {
content1: null,
content2: null,
content3: null,
content4: null,
content5: null,
},
methods: {
}
});
</script>
@append