up new code
up new code
This commit is contained in:
@@ -23,6 +23,7 @@ use App\Model\helpdesk\Utility\CountryCode;
|
|||||||
use App\User;
|
use App\User;
|
||||||
use App\Model\helpdesk\Agent\Location;
|
use App\Model\helpdesk\Agent\Location;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use App\Model\helpdesk\Agent\Department;
|
||||||
// classes
|
// classes
|
||||||
use Form;
|
use Form;
|
||||||
use GeoIP;
|
use GeoIP;
|
||||||
@@ -66,6 +67,7 @@ class FormController extends Controller
|
|||||||
public function getForm(Help_topic $topic, CountryCode $code)
|
public function getForm(Help_topic $topic, CountryCode $code)
|
||||||
{
|
{
|
||||||
$locations = Location::all();
|
$locations = Location::all();
|
||||||
|
$departments = Department::all();
|
||||||
if (\Config::get('database.install') == '%0%') {
|
if (\Config::get('database.install') == '%0%') {
|
||||||
return \Redirect::route('licence');
|
return \Redirect::route('licence');
|
||||||
}
|
}
|
||||||
@@ -87,7 +89,7 @@ class FormController extends Controller
|
|||||||
|
|
||||||
[$max_size_in_bytes, $max_size_in_actual] = $this->fileUploadController->file_upload_max_size();
|
[$max_size_in_bytes, $max_size_in_actual] = $this->fileUploadController->file_upload_max_size();
|
||||||
|
|
||||||
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'email_mandatory', 'max_size_in_bytes', 'max_size_in_actual', 'locations'))->with('phonecode', $phonecode);
|
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'email_mandatory', 'max_size_in_bytes', 'max_size_in_actual', 'locations', 'departments'))->with('phonecode', $phonecode);
|
||||||
} else {
|
} else {
|
||||||
return \Redirect::route('home');
|
return \Redirect::route('home');
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ namespace App\Model\helpdesk\Ticket;
|
|||||||
|
|
||||||
use App\BaseModel;
|
use App\BaseModel;
|
||||||
use App\Model\helpdesk\Agent\Location;
|
use App\Model\helpdesk\Agent\Location;
|
||||||
|
use App\Model\helpdesk\Agent\Department;
|
||||||
|
|
||||||
class Tickets extends BaseModel
|
class Tickets extends BaseModel
|
||||||
{
|
{
|
||||||
@@ -38,7 +39,8 @@ class Tickets extends BaseModel
|
|||||||
'created_at',
|
'created_at',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
'assigned_to',
|
'assigned_to',
|
||||||
'locationid' // <-- Thêm locationid vào đây
|
'locationid', // <-- Thêm locationid vào đây
|
||||||
|
'submitdep_id'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Các quan hệ cũ...
|
// Các quan hệ cũ...
|
||||||
@@ -71,7 +73,10 @@ class Tickets extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Location::class, 'locationid', 'locationid');
|
return $this->belongsTo(Location::class, 'locationid', 'locationid');
|
||||||
}
|
}
|
||||||
|
public function submitDepartment()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Department::class, 'submitdept_id');
|
||||||
|
}
|
||||||
public function extraFields()
|
public function extraFields()
|
||||||
{
|
{
|
||||||
$id = $this->attributes['id'];
|
$id = $this->attributes['id'];
|
||||||
|
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('tickets', function (Blueprint $table) {
|
||||||
|
$table->unsignedInteger('submitdept_id')->nullable()->after('id');
|
||||||
|
$table->foreign('submitdept_id')->references('id')->on('department')->onDelete('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('tickets', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['submitdept_id']);
|
||||||
|
$table->dropColumn('submitdept_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
@@ -7,35 +7,26 @@
|
|||||||
@section('submit')
|
@section('submit')
|
||||||
class = "nav-item active"
|
class = "nav-item active"
|
||||||
@stop
|
@stop
|
||||||
<!-- breadcrumbs -->
|
|
||||||
@section('breadcrumb')
|
@section('breadcrumb')
|
||||||
{{-- <div class="site-hero clearfix"> --}}
|
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
<style>
|
<style>
|
||||||
.words {
|
.words {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
/* Adjust the value to increase or decrease the gap between list items */
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<li class="breadcrumb-item"><i class="fas fa-home"></i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
<li class="breadcrumb-item"><i class="fas fa-home"></i> {!! Lang::get('lang.you_are_here') !!} : </li>
|
||||||
<li><a class="words" href="{{ url('/') }}">{!! Lang::get('lang.home') !!}</a></li>
|
<li><a class="words" href="{{ url('/') }}">{!! Lang::get('lang.home') !!}</a></li>
|
||||||
<li class="words" style="margin-right: 10px">></li>
|
<li class="words">></li>
|
||||||
|
|
||||||
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
|
<li><a href="{!! URL::route('form') !!}">{!! Lang::get('lang.submit_a_ticket') !!}</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
|
||||||
@stop
|
@stop
|
||||||
<!-- /breadcrumbs -->
|
|
||||||
@section('check')
|
@section('check')
|
||||||
|
|
||||||
<div id="sidebar" class="site-sidebar col-md-3">
|
<div id="sidebar" class="site-sidebar col-md-3">
|
||||||
|
|
||||||
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
||||||
|
|
||||||
<section id="section-categories" class="section">
|
<section id="section-categories" class="section">
|
||||||
|
|
||||||
<h2 class="section-title h4 clearfix">
|
<h2 class="section-title h4 clearfix">
|
||||||
|
|
||||||
<i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}?
|
<i class="line"></i>{!! Lang::get('lang.have_a_ticket') !!}?
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
@@ -56,8 +47,10 @@
|
|||||||
{!! Form::open(['url' => 'checkmyticket', 'method' => 'POST']) !!}
|
{!! Form::open(['url' => 'checkmyticket', 'method' => 'POST']) !!}
|
||||||
{!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
{!! Form::label('email', Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
||||||
{!! Form::text('email_address', null, ['class' => 'form-control form-group']) !!}
|
{!! Form::text('email_address', null, ['class' => 'form-control form-group']) !!}
|
||||||
|
|
||||||
{!! Form::label('ticket_number', Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span>
|
{!! Form::label('ticket_number', Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span>
|
||||||
{!! Form::text('ticket_number', null, ['class' => 'form-control form-group']) !!}
|
{!! Form::text('ticket_number', null, ['class' => 'form-control form-group']) !!}
|
||||||
|
|
||||||
<button type="submit" class="btn btn-info"
|
<button type="submit" class="btn btn-info"
|
||||||
style="border-color: rgb(0,192,239); background-color: rgb(0,154,186)!important; color:white">
|
style="border-color: rgb(0,192,239); background-color: rgb(0,154,186)!important; color:white">
|
||||||
<i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!}
|
<i class="fas fa-save"></i> {!! Lang::get('lang.check_ticket_status') !!}
|
||||||
@@ -66,11 +59,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- #sidebar -->
|
</div>
|
||||||
@stop
|
@stop
|
||||||
<!-- content -->
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
|
@section('content')
|
||||||
<div id="content" class="site-content col-md-9">
|
<div id="content" class="site-content col-md-9">
|
||||||
|
|
||||||
@if (Session::has('message'))
|
@if (Session::has('message'))
|
||||||
@@ -80,6 +72,7 @@
|
|||||||
{!! Session::get('message') !!}
|
{!! Session::get('message') !!}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (count($errors) > 0)
|
@if (count($errors) > 0)
|
||||||
@if (Session::has('check'))
|
@if (Session::has('check'))
|
||||||
<?php goto a; ?>
|
<?php goto a; ?>
|
||||||
@@ -104,51 +97,39 @@
|
|||||||
$encrypted_token = $encrypter->encrypt(csrf_token());
|
$encrypted_token = $encrypter->encrypt(csrf_token());
|
||||||
?>
|
?>
|
||||||
<input id="token" type="hidden" value="{{ $encrypted_token }}">
|
<input id="token" type="hidden" value="{{ $encrypted_token }}">
|
||||||
|
|
||||||
{!! Form::open(['route' => 'client.form.post', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
|
{!! Form::open(['route' => 'client.form.post', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!}
|
||||||
|
|
||||||
<article class="hentry">
|
<article class="hentry">
|
||||||
|
|
||||||
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
<div id="form-border" class="comment-respond form-border" style="background:#fff">
|
||||||
|
|
||||||
<section id="section-categories">
|
<section id="section-categories">
|
||||||
|
|
||||||
<h2 class="section-title h4 clearfix mb-0">
|
<h2 class="section-title h4 clearfix mb-0">
|
||||||
|
|
||||||
<i class="line" style="border-color: rgb(0,154,186);"></i>{!! Lang::get('lang.submit_a_ticket') !!}
|
<i class="line" style="border-color: rgb(0,154,186);"></i>{!! Lang::get('lang.submit_a_ticket') !!}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
|
|
||||||
@if (Auth::user())
|
@if (Auth::user())
|
||||||
{!! Form::hidden('Name', Auth::user()->user_name, ['class' => 'form-control']) !!}
|
{!! Form::hidden('Name', Auth::user()->user_name) !!}
|
||||||
|
{!! Form::hidden('Email', Auth::user()->email) !!}
|
||||||
|
{!! Form::hidden('mobile', Auth::user()->mobile) !!}
|
||||||
|
{!! Form::hidden('Code', Auth::user()->country_code) !!}
|
||||||
|
{!! Form::hidden('Phone', Auth::user()->phone_number) !!}
|
||||||
@else
|
@else
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Name', Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
{!! Form::label('Name', Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
||||||
{!! Form::text('Name', null, ['class' => 'form-control']) !!}
|
{!! Form::text('Name', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (Auth::user())
|
|
||||||
|
|
||||||
{!! Form::hidden('Email', Auth::user()->email, ['class' => 'form-control']) !!}
|
|
||||||
@else
|
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Email', Lang::get('lang.email')) !!}
|
{!! Form::label('Email', Lang::get('lang.email')) !!}
|
||||||
@if ($email_mandatory->status == 1 || $email_mandatory->status == '1')
|
@if ($email_mandatory->status == 1)
|
||||||
<span class="text-red"> *</span>
|
<span class="text-red"> *</span>
|
||||||
@endif
|
@endif
|
||||||
{!! Form::email('Email', null, ['class' => 'form-control']) !!}
|
{!! Form::email('Email', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (!Auth::user())
|
|
||||||
|
|
||||||
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Code', Lang::get('lang.country-code')) !!}
|
{!! Form::label('Code', Lang::get('lang.country-code')) !!}
|
||||||
@if ($email_mandatory->status == 0 || $email_mandatory->status == '0')
|
|
||||||
<span class="text-red"> *</span>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{!! Form::text('Code', null, [
|
{!! Form::text('Code', null, [
|
||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'placeholder' => $phonecode,
|
'placeholder' => $phonecode,
|
||||||
@@ -157,71 +138,39 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
|
{!! Form::label('mobile', Lang::get('lang.mobile_number')) !!}
|
||||||
@if ($email_mandatory->status == 0 || $email_mandatory->status == '0')
|
|
||||||
<span class="text-red"> *</span>
|
|
||||||
@endif
|
|
||||||
{!! Form::text('mobile', null, ['class' => 'form-control']) !!}
|
{!! Form::text('mobile', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Phone', Lang::get('lang.phone')) !!}
|
{!! Form::label('Phone', Lang::get('lang.phone')) !!}
|
||||||
{!! Form::text('Phone', null, ['class' => 'form-control']) !!}
|
{!! Form::text('Phone', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
@else
|
|
||||||
{!! Form::hidden('mobile', Auth::user()->mobile, ['class' => 'form-control']) !!}
|
|
||||||
{!! Form::hidden('Code', Auth::user()->country_code, ['class' => 'form-control']) !!}
|
|
||||||
{!! Form::hidden('Phone', Auth::user()->phone_number, ['class' => 'form-control']) !!}
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
|
|
||||||
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
|
|
||||||
<?php
|
|
||||||
$forms = App\Model\helpdesk\Form\Forms::get();
|
|
||||||
$helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get();
|
|
||||||
//
|
|
||||||
?><!---->
|
|
||||||
<select name="helptopic" class="form-control" id="selectid">
|
|
||||||
|
|
||||||
|
<!-- Help Topic + Priority cùng row -->
|
||||||
|
<div class="col-md-12 form-group row">
|
||||||
|
<label class="col-md-2 col-form-label">{{ Lang::get('lang.choose_a_help_topic') }}</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', 1)->get(); ?>
|
||||||
|
<select name="helptopic" class="form-control">
|
||||||
@foreach ($helptopic as $topic)
|
@foreach ($helptopic as $topic)
|
||||||
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
|
<option value="{{ $topic->id }}">{{ $topic->topic }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<!-- priority -->
|
|
||||||
<?php
|
|
||||||
$Priority = App\Model\helpdesk\Settings\CommonSettings::select('status')->where('option_name', '=', 'user_priority')->first();
|
|
||||||
$user_Priority = $Priority->status;
|
|
||||||
?>
|
|
||||||
|
|
||||||
@if (Auth::user())
|
<label class="col-md-2 col-form-label">{{ Lang::get('lang.priority') }}</label>
|
||||||
|
<div class="col-md-4">
|
||||||
@if (Auth::user()->active == 1)
|
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', 1)->get(); ?>
|
||||||
@if ($user_Priority == 1)
|
{!! Form::select('priority', $Priority->pluck('priority_desc', 'priority_id')->toArray(), null, [
|
||||||
<div class="col-md-12 form-group">
|
'class' => 'form-control',
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-1">
|
|
||||||
<label>{!! Lang::get('lang.priority') !!}:</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', '=', 1)->get(); ?>
|
|
||||||
{!! Form::select('priority', ['Priority' => $Priority->pluck('priority_desc', 'priority_id')->toArray()], null, [
|
|
||||||
'class' => 'form-control select',
|
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endif
|
<!-- Location + Department -->
|
||||||
@endif
|
<div class="col-md-12 form-group row">
|
||||||
@endif
|
<label for="location" class="col-md-2 col-form-label">Location</label>
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
<div class="col-md-4">
|
||||||
{!! Form::label('Subject', Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
|
||||||
{!! Form::text('Subject', null, ['class' => 'form-control']) !!}
|
|
||||||
</div>
|
|
||||||
<div class="form-group row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<label for="location">Vị trí:</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-7">
|
|
||||||
<select name="location" class="form-control">
|
<select name="location" class="form-control">
|
||||||
<option value="">-- Chọn vị trí --</option>
|
<option value="">-- Chọn vị trí --</option>
|
||||||
@foreach ($locations as $loc)
|
@foreach ($locations as $loc)
|
||||||
@@ -232,83 +181,53 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label for="submitdept_id" class="col-md-2 col-form-label">Department</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<select name="submitdept_id" class="form-control" id="submitdept_id">
|
||||||
|
@foreach ($departments as $dept)
|
||||||
|
<option value="{{ $dept->id }}"
|
||||||
|
{{ Auth::user()->dept_id == $dept->id ? 'selected' : '' }}>
|
||||||
|
{{ $dept->name }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Subject -->
|
||||||
|
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Subject', Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
||||||
|
{!! Form::text('Subject', null, ['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Message -->
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}">
|
<div class="col-md-12 form-group {{ $errors->has('Details') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Details', Lang::get('lang.message')) !!}<span class="text-red"> *</span>
|
{!! Form::label('Details', Lang::get('lang.message')) !!}<span class="text-red"> *</span>
|
||||||
{!! Form::textarea('Details', null, ['class' => 'form-control']) !!}
|
{!! Form::textarea('Details', null, ['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Attachment -->
|
||||||
<div class="col-md-12 form-group">
|
<div class="col-md-12 form-group">
|
||||||
<input type="file" name="attachment[]" multiple /><br />
|
<input type="file" name="attachment[]" multiple /><br />
|
||||||
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Event fire --}}
|
{{-- Event fire --}}
|
||||||
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
|
<?php \Illuminate\Support\Facades\Event::dispatch(new App\Events\ClientTicketForm()); ?>
|
||||||
<div class="col-md-12" id="response"> </div>
|
|
||||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
<!-- Submit Button -->
|
||||||
<div class="col-md-12 form-group">
|
<div class="col-md-12 form-group">
|
||||||
{!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), [
|
{!! Form::button('<i class="fas fa-save"></i> ' . Lang::get('lang.submit'), [
|
||||||
'type' => 'submit',
|
'type' => 'submit',
|
||||||
'class' => 'btn btn-info float-right',
|
'class' => 'btn btn-primary',
|
||||||
'style' => 'style="border-color: rgb(0, 192, 239); background-color: rgb(0, 154, 186); color: white;',
|
|
||||||
'onclick' => 'this.disabled=true;this.innerHTML="Sending, please wait...";this.form.submit();',
|
|
||||||
'data-v-fce8d630',
|
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" id="response"> </div>
|
|
||||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
|
||||||
|
|
||||||
{!! Form::close() !!}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
{!! Form::close() !!}
|
||||||
</div>
|
</div>
|
||||||
<!--
|
|
||||||
|====================================================
|
|
||||||
| SELECTED FORM STORED IN SCRIPT
|
|
||||||
|====================================================
|
|
||||||
-->
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
var helpTopic = $("#selectid").val();
|
|
||||||
send(helpTopic);
|
|
||||||
$("#selectid").on("change", function() {
|
|
||||||
helpTopic = $("#selectid").val();
|
|
||||||
send(helpTopic);
|
|
||||||
});
|
|
||||||
|
|
||||||
function send(helpTopic) {
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ url('/get-helptopic-form') }}",
|
|
||||||
data: {
|
|
||||||
'helptopic': helpTopic
|
|
||||||
},
|
|
||||||
type: "GET",
|
|
||||||
dataType: "html",
|
|
||||||
success: function(response) {
|
|
||||||
$("#response").html(response);
|
|
||||||
},
|
|
||||||
error: function(response) {
|
|
||||||
$("#response").html(response);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
//Add text editor
|
|
||||||
$("textarea").summernote({
|
|
||||||
height: 300,
|
|
||||||
tabsize: 2,
|
|
||||||
toolbar: [
|
|
||||||
['style', ['bold', 'italic', 'underline', 'clear']],
|
|
||||||
['font', ['strikethrough', 'superscript', 'subscript']],
|
|
||||||
['fontsize', ['fontsize']],
|
|
||||||
['color', ['color']],
|
|
||||||
['para', ['ul', 'ol', 'paragraph']],
|
|
||||||
['height', ['height']]
|
|
||||||
]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@stop
|
@stop
|
||||||
|
Reference in New Issue
Block a user