/home/u503560585/public_html/resources/views/dashboard/service/edit.blade.php
@extends('dashboard.layouts.master')
@section('title', __('backend.serviceSite'))
@push("after-styles")
@endpush
@section('content')
<div class="padding">
<div class="box">
<div class="box-header dker">
<h3><i class="material-icons"></i> {{ __('backend.bannerServiceDive') }}</h3>
<small>
<a href="{{ route('adminHome') }}">{{ __('backend.home') }}</a> /
<a href="">{{ __('backend.serviceSite') }}</a>
</small>
</div>
<div class="box-tool">
<ul class="nav">
<li class="nav-item inline">
<a class="nav-link" href="{{route('Services')}}">
<i class="material-icons md-18">×</i>
</a>
</li>
</ul>
</div>
<div class="box-body">
{{Form::open(['route'=>['ServicesUpdate', $ServiceSite->id],'method'=>'POST', 'files' => true ])}}
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Type
</label>
<div class="col-sm-10">
<select class="form-control" name="type_service" id="type_service">
<option {{ $ServiceSite->type_service == 1 ? 'selected' : '' }} value="1">Include Image</option>
<option {{ $ServiceSite->type_service == 2 ? 'selected' : '' }} value="2">Content</option>
</select>
</div>
</div>
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Service Title EN
</label>
<div class="col-sm-10">
{!! Form::text('title_en',$ServiceSite->title_en, array('placeholder' => '','class' => 'form-control','required'=>'',)) !!}
</div>
</div>
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Service Title AR
</label>
<div class="col-sm-10">
{!! Form::text('title_ar',$ServiceSite->title_ar, array('placeholder' => '','class' => 'form-control')) !!}
</div>
</div>
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Service Detail EN
</label>
<div class="col-sm-10">
{!! Form::textarea('details_en',$ServiceSite->details_en, array('placeholder' => '','class' => 'form-control', 'rows' => 4)) !!}
</div>
</div>
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Service Detail AR
</label>
<div class="col-sm-10">
{!! Form::textarea('details_ar',$ServiceSite->details_ar, array('placeholder' => '','class' => 'form-control', 'rows' => 4)) !!}
</div>
</div>
<div class="form-group row content_1">
<label
class="col-sm-2 form-control-label">Service Image EN
</label>
<div class="col-sm-10">
<img width="100" height="100" src="{{$ServiceSite->file_en}}" />
<input type="file" name="file_en" class="form-control" />
</div>
</div>
<div class="form-group row content_1">
<label
class="col-sm-2 form-control-label">Service Image AR
</label>
<div class="col-sm-10">
<img width="100" height="100" src="{{$ServiceSite->file_ar}}" />
<input type="file" name="file_ar" class="form-control" />
</div>
</div>
<div class="form-group row content_1">
<label
class="col-sm-2 form-control-label">Service Link
</label>
<div class="col-sm-10">
{!! Form::text('link_url',$ServiceSite->link_url, array('placeholder' => '','class' => 'form-control',)) !!}
</div>
</div>
<div class="form-group row content_2">
<label
class="col-sm-2 form-control-label">Content
</label>
<div class="col-sm-10">
<textarea name="sub_content[]" class="form-control"></textarea>
<button type="button" class="btn btn-info js-add-sub-content">Add</button>
</div>
</div>
<div class="form-group row">
<label
class="col-sm-2 form-control-label">Status
</label>
<div class="col-sm-10">
<div class="radio">
<label class="ui-check ui-check-md">
<input id="status1" class="has-value" checked="checked" name="status" type="radio" value="1">
<i class="dark-white"></i>
Active
</label>
<label class="ui-check ui-check-md">
<input id="status2" class="has-value" name="status" type="radio" value="0">
<i class="dark-white"></i>
Not Active
</label>
</div>
</div>
<div class="form-group row m-t-md">
<div class="offset-sm-2 col-sm-10">
<button type="submit" class="btn btn-primary m-t"><i class="material-icons">
</i> {!! __('backend.edit') !!}</button>
<a href="{{route("Services")}}"
class="btn btn-default m-t"><i class="material-icons">
</i> {!! __('backend.cancel') !!}</a>
</div>
</div>
{{Form::close()}}
</div>
</div>
</div>
@endsection
@push("after-scripts")
<script>
$(() => {
const typeService = $("#type_service").val();
console.log(typeService);
if(typeService == 1) {
$(".content_1").show();
$(".content_2").hide();
}else{
$(".content_1").hide();
$(".content_2").show();
}
$("#type_service").on("change", (e) =>{
if(e.target.value == 1) {
$(".content_1").show();
$(".content_2").hide();
}else{
$(".content_1").hide();
$(".content_2").show();
}
});
$(".js-add-sub-content").on('click', function(e) {
$(this).before( `<textarea name="sub_content[]" class="m-t-sm form-control"></textarea>`);
})
});
</script>
@endpush
@LwBee Strong Bypass
Upload File
Create New File