update v 1.0.7.5
This commit is contained in:
@@ -30,75 +30,73 @@ class="active"
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\FormController@store','method' => 'post']) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Label -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('label') ? 'has-error' : '' }}">
|
||||
{!! Form::label('label',Lang::get('lang.label')) !!}
|
||||
{!! $errors->first('label', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('label',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head type -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('type', [''=>'Select a Type','types'=>$type->lists('type','id')] ,null,['class' => 'form-control'] ) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Label -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('label') ? 'has-error' : '' }}">
|
||||
{!! Form::label('label',Lang::get('lang.label')) !!}
|
||||
{!! $errors->first('label', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('label',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head type -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('type', [''=>'Select a Type','types'=>$type->lists('type','id')] ,null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Vissibility -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
|
||||
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('visibility', [''=>'Select a Visibility','visibilities' =>$visibility->lists('visibility','id')],null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head variable -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('variable',Lang::get('lang.variable')) !!}
|
||||
{!! Form::text('variable',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- instruction: textarea -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('instruction',Lang::get('lang.instruction')) !!}
|
||||
{!! Form::textarea('instruction',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
|
||||
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('visibility', [''=>'Select a Visibility','visibilities' =>$visibility->lists('visibility','id')],null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head variable -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('variable',Lang::get('lang.variable')) !!}
|
||||
{!! Form::text('variable',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- instruction: textarea -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('instruction',Lang::get('lang.instruction')) !!}
|
||||
{!! Form::textarea('instruction',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /table -->
|
||||
<!-- /table -->
|
||||
|
||||
<!-- txt area -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- txt area -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
|
@@ -31,75 +31,75 @@ class="active"
|
||||
<!-- open a form -->
|
||||
{!! Form::model($forms,['url' => 'form/'.$forms->id,'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Label -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('label') ? 'has-error' : '' }}">
|
||||
{!! Form::label('label',Lang::get('lang.label')) !!}
|
||||
{!! $errors->first('label', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('label',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head type -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('type', [''=>'Select a Type','types'=>$type->lists('type','id')] ,null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Vissibility -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
|
||||
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('visibility', [''=>'Select a Visibility','visibilities' =>$visibility->lists('visibility','id')],null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head variable -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('variable',Lang::get('lang.variable')) !!}
|
||||
{!! Form::text('variable',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- instruction: textarea -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('instruction',Lang::get('lang.instruction')) !!}
|
||||
{!! Form::textarea('instruction',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Label -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('label') ? 'has-error' : '' }}">
|
||||
{!! Form::label('label',Lang::get('lang.label')) !!}
|
||||
{!! $errors->first('label', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('label',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head type -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('type', [''=>'Select a Type','types'=>$type->lists('type','id')] ,null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Vissibility -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
|
||||
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('visibility', [''=>'Select a Visibility','visibilities' =>$visibility->lists('visibility','id')],null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head variable -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('variable',Lang::get('lang.variable')) !!}
|
||||
{!! Form::text('variable',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- instruction: textarea -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('instruction',Lang::get('lang.instruction')) !!}
|
||||
{!! Form::textarea('instruction',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /table -->
|
||||
<!-- /table -->
|
||||
|
||||
<!-- txt area -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- txt area -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -16,124 +16,112 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.forms') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- -->
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{!! Lang::get('lang.instructions') !!}</h3>
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.instructions_on_creating_form') !!}.</div>
|
||||
</div>
|
||||
|
||||
<hr style="margin-top:0px;margin-bottom:0px;">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
</div>
|
||||
{!! Form::open(['route'=>'forms.store']) !!}
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div></div></div>
|
||||
<div class="form-group">
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="col-md-4">
|
||||
<h4 style="text-align: center">{!! Lang::get('lang.form_name') !!}:</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="formname" class="form-control">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.create') !!}</h3>
|
||||
</div>
|
||||
</div></div>
|
||||
<hr style="margin-top:0px;margin-bottom:0px;">
|
||||
<div class="form-group">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{!! Lang::get('lang.adding_fields') !!}</h3>
|
||||
</div>
|
||||
<div class="callout callout-default col-md-4"> {!! Lang::get('lang.click_add_fields_button_to_add_fields') !!} </div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary addField" value="Show Div" onclick="showDiv()" ><i class="fa fa-plus"></i> {!! Lang::get('lang.add_fields') !!}</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.instructions') !!}</h3>
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.instructions_on_creating_form') !!}.</div>
|
||||
</div>
|
||||
<div class="box-body with-border">
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b><br>
|
||||
|
||||
<li class="error-message-padding" >{{Session::get('fails')}}</li>
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
{!! Form::open(['route'=>'forms.store']) !!}
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="col-md-4">
|
||||
<h4 style="text-align: center">{!! Lang::get('lang.form_name') !!}: <span class="text-red"> *</span></h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="formname" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="box-title">{!! Lang::get('lang.adding_fields') !!}</h3>
|
||||
<div class="callout callout-default col-md-4"> {!! Lang::get('lang.click_add_fields_button_to_add_fields') !!} </div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary addField" value="Show Div" onclick="showDiv()" ><i class="fa fa-plus"></i> {!! Lang::get('lang.add_fields') !!}</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="box-body" id="welcomeDiv" style="display:none;">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>{!! Lang::get('lang.label') !!} </th>
|
||||
<th>{!! Lang::get('lang.name') !!} </th>
|
||||
<th>{!! Lang::get('lang.type') !!} </th>
|
||||
<th>{!! Lang::get('lang.values(selected_fields)') !!} </th>
|
||||
<th>{!! Lang::get('lang.required') !!} </th>
|
||||
<th>{!! Lang::get('lang.action') !!} </th>
|
||||
</thead>
|
||||
<tbody class="inputField">
|
||||
<tr></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="box-body" id="welcomeDiv" style="display:none;">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>{!! Lang::get('lang.label') !!} </th>
|
||||
<th>{!! Lang::get('lang.name') !!} </th>
|
||||
<th>{!! Lang::get('lang.type') !!} </th>
|
||||
<th>{!! Lang::get('lang.values(selected_fields)') !!} </th>
|
||||
<th>{!! Lang::get('lang.required') !!} </th>
|
||||
<th>{!! Lang::get('lang.Action') !!} </th>
|
||||
</thead>
|
||||
<tbody class="inputField">
|
||||
<tr></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" class="btn btn-primary" value="{!! Lang::get('lang.save_form') !!}">
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
function showDiv() {
|
||||
document.getElementById('welcomeDiv').style.display = "block";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var max_fields = 10;
|
||||
var wrapper = $(".inputField");
|
||||
var add_button = $(".addField");
|
||||
|
||||
var x = 1;
|
||||
$(add_button).click(function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
if(x < max_fields){
|
||||
x++;
|
||||
$(wrapper).append('<tr><td><input type="text" name="label[]"></td><td><input type="text" name="name[]"></td><td><select name="type[]"><option>text</option><option>email</option><option>password</option><option>textarea</option><option>select</option><option>radio</option><option>checkbox</option><option>submit</option></select></td><td><textarea name="value[]"></textarea></td><td>{!! Lang::get("lang.yes") !!} <input type=radio name="required['+x+'][]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required['+x+'][]" value=0></td><td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td></tr>');
|
||||
}
|
||||
document.getElementById('welcomeDiv').style.display = "block";
|
||||
}
|
||||
$(document).ready(function() {
|
||||
var max_fields = 10;
|
||||
var wrapper = $(".inputField");
|
||||
var add_button = $(".addField");
|
||||
var x = 1;
|
||||
$(add_button).click(function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
if (x < max_fields) {
|
||||
x++;
|
||||
$(wrapper).append('<tr><td><input type="text" class="form-control" name="label[]"></td><td><input type="text" class="form-control" name="name[]"></td><td><select name="type[]" class="form-control"><option>text</option><option>email</option><option>password</option><option>textarea</option><option>select</option><option>radio</option><option>checkbox</option><option>submit</option></select></td><td><textarea name="value[]" class="form-control"></textarea></td><td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[' + x + '][]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[' + x + '][]" value=0></td><td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td></tr>');
|
||||
}
|
||||
});
|
||||
$(wrapper).on("click", ".remove_field", function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
});
|
||||
|
||||
$(wrapper).on("click",".remove_field", function(e)
|
||||
{
|
||||
e.preventDefault(); $(this).closest('tr').remove(); x--;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
|
@@ -22,78 +22,65 @@ class="active"
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- -->
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
{!! Lang::get('lang.forms') !!}
|
||||
</div>
|
||||
<a href="{!! url('forms/create') !!}" class="pull-right"><button class="btn btn-primary">{!! Lang::get('lang.create_form') !!}</button></a>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{!! Lang::get('lang.form_name') !!}</th>
|
||||
<th>{!! Lang::get('lang.action') !!}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$forms = App\Model\helpdesk\Form\Forms::all();
|
||||
?>
|
||||
@foreach($forms as $form)
|
||||
|
||||
<tr>
|
||||
|
||||
<td>{!! $form->formname !!}</td>
|
||||
|
||||
|
||||
<td>{!! link_to_route('forms.show', Lang::get('lang.view_this_form') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$form->id}}delete">{!! Lang::get('lang.delete_from') !!}</button>
|
||||
|
||||
<div class="modal fade" id="{{$form->id}}delete">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">{!! Lang::get('lang.delete') !!}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{!! Lang::get('lang.are_you_sure_you_want_to_delete') !!} ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{!! Lang::get('lang.close') !!}</button>
|
||||
{!! link_to_route('forms.delete', Lang::get('lang.delete'),[$form->id],['id'=>'delete','class'=>'btn btn-danger btn-sm']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
{!! Lang::get('lang.forms') !!}
|
||||
</div>
|
||||
<a href="{!! url('forms/create') !!}" class="pull-right"><button class="btn btn-primary">{!! Lang::get('lang.create_form') !!}</button></a>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{!! Lang::get('lang.form_name') !!}</th>
|
||||
<th>{!! Lang::get('lang.action') !!}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$forms = App\Model\helpdesk\Form\Forms::all();
|
||||
?>
|
||||
@foreach($forms as $form)
|
||||
<tr>
|
||||
<td>{!! $form->formname !!}</td>
|
||||
<td>{!! link_to_route('forms.show', Lang::get('lang.view_this_form') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$form->id}}delete">{!! Lang::get('lang.delete_from') !!}</button>
|
||||
<div class="modal fade" id="{{$form->id}}delete">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">{!! Lang::get('lang.delete') !!}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{!! Lang::get('lang.are_you_sure_you_want_to_delete') !!} ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">{!! Lang::get('lang.close') !!}</button>
|
||||
{!! link_to_route('forms.delete', Lang::get('lang.delete'),[$form->id],['id'=>'delete','class'=>'btn btn-danger btn-sm']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
</div>
|
||||
@stop
|
@@ -12,79 +12,75 @@ active
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.forms') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b> <br>
|
||||
<li class="error-message-padding">{{Session::get('fails')}}</li>
|
||||
</div>
|
||||
@endif
|
||||
<!-- -->
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<?php $id = App\Model\helpdesk\Form\Forms::where('id',$id)->first(); ?>
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_name') !!} : {!! $id->formname !!}</h3>
|
||||
|
||||
<?php $id = App\Model\helpdesk\Form\Forms::where('id', $id)->first(); ?>
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_name') !!} : {!! $id->formname !!}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<?php
|
||||
$i=$id->id;
|
||||
$values = App\Model\helpdesk\Form\Fields::where('forms_id', '=', $i)->get();
|
||||
foreach($values as $value) {
|
||||
if($value->type == "select") {
|
||||
|
||||
$data = $value->value;
|
||||
$value = explode(',', $data);
|
||||
echo '<select class="form-control">';
|
||||
foreach($value as $option) {
|
||||
echo '<option>'.$option.'</option>';
|
||||
<div class="box-body">
|
||||
<?php
|
||||
$i = $id->id;
|
||||
$form_datas = App\Model\helpdesk\Form\Fields::where('forms_id', '=', $i)->get();
|
||||
foreach ($form_datas as $form_data) {
|
||||
if ($form_data->type == "select") {
|
||||
$form_fields = explode(',', $form_data->value);
|
||||
$var = "";
|
||||
foreach ($form_fields as $form_field) {
|
||||
$var .= '<option value="' . $form_field . '">' . $form_field . '</option>';
|
||||
}
|
||||
echo '<label>' . ucfirst($form_data->label) . '</label><select class="form-control" name="' . $form_data->name . '">' . $var . '</select>';
|
||||
} elseif ($form_data->type == "radio") {
|
||||
$type2 = $form_data->value;
|
||||
$vals = explode(',', $type2);
|
||||
echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
|
||||
foreach ($vals as $val) {
|
||||
echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '"> ' . $form_data->name . ' ';
|
||||
}
|
||||
} elseif ($form_data->type == "textarea") {
|
||||
$type3 = $form_data->value;
|
||||
$v = explode(',', $type3);
|
||||
echo '<label>' . $form_data->label . '</label></br><textarea rows="' . $v[0] . '" cols="' . $v[1] . '"></textarea></br></br>';
|
||||
} elseif ($form_data->type == "checkbox") {
|
||||
$type4 = $form_data->value;
|
||||
$checks = explode(',', $type4);
|
||||
echo '<label>' . ucfirst($form_data->label) . '</label><br/>';
|
||||
foreach ($checks as $check) {
|
||||
echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '">  ' . $check;
|
||||
}
|
||||
} else {
|
||||
echo '<label>' . ucfirst($form_data->label) . '</label><input type="' . $form_data->type . '" class="form-control" name="' . $form_data->name . '" /></br></br>';
|
||||
}
|
||||
echo '</select></br></br>';
|
||||
} elseif ($value->type == "radio" ) {
|
||||
|
||||
$type2 = $value->value;
|
||||
$val = explode(',', $type2);
|
||||
|
||||
echo '<label class="radio-inline">'.$value->label.'</label>   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[0].'
|
||||
   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[1].'</br></br>';
|
||||
|
||||
} elseif($value->type == "textarea" ) {
|
||||
$type3 = $value->value;
|
||||
$v = explode(',', $type3);
|
||||
echo '<label>'.$value->label.'</label></br><textarea rows="'.$v[0].'" cols="'.$v[1].'"></textarea></br></br>';
|
||||
|
||||
|
||||
} elseif($value->type == "checkbox" ) {
|
||||
|
||||
$type4 = $value->value;
|
||||
$check = explode(',', $type4);
|
||||
echo '<label class="radio-inline">'.$value->label.'   <input type="'.$value->type.'" name="'.$value->name.'">  '.$check[0].'</label>
|
||||
<label class="radio-inline"><input type="'.$value->type.'" name="'.$value->name.'">  '.$check[1].'</label></br></br>';
|
||||
|
||||
} else {
|
||||
|
||||
echo '<label>'.$value->label.'</label><input type="'.$value->type.'" class="form-control" name="'.$value->name.'" /></br></br>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
</div>
|
||||
@stop
|
@@ -16,162 +16,147 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.help_topic') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\HelptopicController@store', 'method' => 'post']) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.create')}}</h2><div class="pull-right">
|
||||
{!! Form::submit(Lang::get('lang.save'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body table-responsive no-padding" style="overflow:hidden">
|
||||
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('ticket_status') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ticket_status',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Type : Radio : required : Public|private -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('type','1',true) !!} {{Lang::get('lang.public')}}
|
||||
{!! Form::radio('type','0') !!} {{Lang::get('lang.private')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Topic text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('topic') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('topic',Lang::get('lang.topic')) !!}
|
||||
{!! $errors->first('topic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('topic',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Parent Topic: Drop down: value from helptopic table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('parent_topic') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('parent_topic',Lang::get('lang.parent_topic')) !!}
|
||||
{!! $errors->first('parent_topic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('parent_topic', [''=>'Select a Parent Topic','Help Topics'=>$topics->lists('topic','topic')],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Custom Form: Drop down: value from form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('custom_form') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('custom_form',Lang::get('lang.Custom_form')) !!}
|
||||
{!! $errors->first('custom_form', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('custom_form', [''=>'Select a Form','Custom Forms'=>$forms->lists('formname','id')],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Department: Drop down: value Department form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('department') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('department',Lang::get('lang.department')) !!}
|
||||
{!! $errors->first('department', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('department', [''=>'Select a Department','Departments'=>$departments->lists('name','id')],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\HelptopicController@store', 'method' => 'post']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{Lang::get('lang.create')}}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('type'))
|
||||
<li class="error-message-padding">{!! $errors->first('type', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('topic'))
|
||||
<li class="error-message-padding">{!! $errors->first('topic', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('parent_topic'))
|
||||
<li class="error-message-padding">{!! $errors->first('parent_topic', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('custom_form'))
|
||||
<li class="error-message-padding">{!! $errors->first('custom_form', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('department'))
|
||||
<li class="error-message-padding">{!! $errors->first('department', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('sla_plan'))
|
||||
<li class="error-message-padding">{!! $errors->first('sla_plan', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('auto_assign'))
|
||||
<li class="error-message-padding">{!! $errors->first('auto_assign', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<div class="box-body table-responsive no-padding" style="overflow:hidden">
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('ticket_status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('ticket_status',Lang::get('lang.status')) !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Type : Radio : required : Public|private -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! Form::radio('type','1',true) !!} {{Lang::get('lang.public')}}
|
||||
{!! Form::radio('type','0') !!} {{Lang::get('lang.private')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Topic text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('topic',Lang::get('lang.topic')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('topic',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Parent Topic: Drop down: value from helptopic table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('parent_topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('parent_topic',Lang::get('lang.parent_topic')) !!}
|
||||
{!!Form::select('parent_topic', [''=>Lang::get('lang.select_a_parent_topic'),Lang::get('lang.help_topic')=>$topics->lists('topic','topic')->toArray()],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Custom Form: Drop down: value from form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('custom_form') ? 'has-error' : '' }}">
|
||||
{!! Form::label('custom_form',Lang::get('lang.Custom_form')) !!}
|
||||
{!!Form::select('custom_form', [''=>Lang::get('lang.select_a_form'),Lang::get('lang.custom_form')=>$forms->lists('formname','id')->toArray()],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Department: Drop down: value Department form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('department') ? 'has-error' : '' }}">
|
||||
{!! Form::label('department',Lang::get('lang.department')) !!}
|
||||
{!!Form::select('department', [''=>Lang::get('lang.select_a_department'),Lang::get('lang.departments')=>$departments->lists('name','id')->toArray()],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Priority: Drop down: value from Priority table -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!} <span class="text-red"> *</span>
|
||||
{!!Form::select('priority', [''=>Lang::get('lang.select_a_priority'),Lang::get('lang.priorities')=>$priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- SLA Plan: Drop down: value SLA Plan table-->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('sla_plan') ? 'has-error' : '' }}">
|
||||
{!! Form::label('sla_plan',Lang::get('lang.SLA_plan')) !!}
|
||||
{!!Form::select('sla_plan', [''=>Lang::get('lang.select_a_sla_plan'),Lang::get('lang.sla_plans')=>$slas->lists('name','id')->toArray()],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auto-assign To: Drop Down: value from Agent table -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('auto_assign') ? 'has-error' : '' }}">
|
||||
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
|
||||
{!!Form::select('auto_assign', [''=>Lang::get('lang.select_an_agent'),Lang::get('lang.agents')=>$agents->lists('first_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auto-response: checkbox : Disable new ticket auto-response -->
|
||||
<div class="row">
|
||||
<!-- intrnal Notes : Textarea : -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Priority: Drop down: value from Priority table -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!}
|
||||
{!! $errors->first('priority', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('priority', [''=>'Select a Proirity','Priorities'=>$priority->lists('priority_desc','priority_id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- SLA Plan: Drop down: value SLA Plan table-->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('sla_plan') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('sla_plan',Lang::get('lang.SLA_plan')) !!}
|
||||
{!! $errors->first('sla_plan', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('sla_plan', [''=>'Select a SLA Plan','SLA Plans'=>$slas->lists('name','id')],1,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Auto-assign To: Drop Down: value from Agent table -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('auto_assign') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
|
||||
{!! $errors->first('auto_assign', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('first_name','id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Auto-response: checkbox : Disable new ticket auto-response -->
|
||||
<div class="row">
|
||||
|
||||
<!-- intrnal Notes : Textarea : -->
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- close form -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@stop
|
||||
|
@@ -16,143 +16,148 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.help_topic') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($topics,['url' => 'helptopic/'.$topics->id, 'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.edit')}}</h2><div class="pull-right">
|
||||
{!! Form::submit(Lang::get('lang.save'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
{!! Form::model($topics,['url' => 'helptopic/'.$topics->id, 'method' => 'PATCH']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{Lang::get('lang.edit')}}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('type'))
|
||||
<li class="error-message-padding">{!! $errors->first('type', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('topic'))
|
||||
<li class="error-message-padding">{!! $errors->first('topic', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('parent_topic'))
|
||||
<li class="error-message-padding">{!! $errors->first('parent_topic', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('custom_form'))
|
||||
<li class="error-message-padding">{!! $errors->first('custom_form', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('department'))
|
||||
<li class="error-message-padding">{!! $errors->first('department', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('sla_plan'))
|
||||
<li class="error-message-padding">{!! $errors->first('sla_plan', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('auto_assign'))
|
||||
<li class="error-message-padding">{!! $errors->first('auto_assign', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('ticket_status') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ticket_status',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Type : Radio : required : Public|private -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('type','1',true) !!} {{Lang::get('lang.public')}}
|
||||
{!! Form::radio('type','0') !!} {{Lang::get('lang.private')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Topic text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('topic') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('topic',Lang::get('lang.topic')) !!}
|
||||
{!! $errors->first('topic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('topic',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Parent Topic: Drop down: value from helptopic table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('parent_topic') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('parent_topic',Lang::get('lang.parent_topic')) !!}
|
||||
{!! $errors->first('parent_topic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('parent_topic', [''=>'Select a Parent Topic','Help Topics'=>$topics->lists('topic','id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom Form: Drop down: value from form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('custom_form') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('custom_form',Lang::get('lang.Custom_form')) !!}
|
||||
{!! $errors->first('custom_form', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('custom_form', [''=>'Select a Form','Custom Forms'=>$forms->lists('formname','id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Department: Drop down: value Department form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('department') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('department',Lang::get('lang.department')) !!}
|
||||
{!! $errors->first('department', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('department', [''=>'Select a Department','Departments'=>$departments->lists('name','id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('ticket_status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('ticket_status',Lang::get('lang.status')) !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Type : Radio : required : Public|private -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! Form::radio('type','1',true) !!} {{Lang::get('lang.public')}}
|
||||
{!! Form::radio('type','0') !!} {{Lang::get('lang.private')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Topic text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('topic',Lang::get('lang.topic')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('topic',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Parent Topic: Drop down: value from helptopic table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('parent_topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('parent_topic',Lang::get('lang.parent_topic')) !!}
|
||||
{!!Form::select('parent_topic', [''=>Lang::get('lang.select_a_parent_topic'),Lang::get('lang.help_topic')=>$topics->lists('topic','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Custom Form: Drop down: value from form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('custom_form') ? 'has-error' : '' }}">
|
||||
{!! Form::label('custom_form',Lang::get('lang.Custom_form')) !!}
|
||||
{!!Form::select('custom_form', [''=>Lang::get('lang.select_a_form'),Lang::get('lang.custom_form')=>$forms->lists('formname','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Department: Drop down: value Department form table -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('department') ? 'has-error' : '' }}">
|
||||
{!! Form::label('department',Lang::get('lang.department')) !!}
|
||||
{!!Form::select('department', [''=>Lang::get('lang.select_a_department'),Lang::get('lang.departments')=>$departments->lists('name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Priority: Drop down: value from Priority table -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!} <span class="text-red"> *</span>
|
||||
{!!Form::select('priority', [''=>Lang::get('lang.select_a_priority'),Lang::get('lang.priorities')=>$priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- SLA Plan: Drop down: value SLA Plan table-->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('sla_plan') ? 'has-error' : '' }}">
|
||||
{!! Form::label('sla_plan',Lang::get('lang.SLA_plan')) !!}
|
||||
{!!Form::select('sla_plan', [''=>Lang::get('lang.select_a_sla_plan'),Lang::get('lang.sla_plans')=>$slas->lists('name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auto-assign To: Drop Down: value from Agent table -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('auto_assign') ? 'has-error' : '' }}">
|
||||
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
|
||||
{!!Form::select('auto_assign', [''=>Lang::get('lang.select_an_agent'),Lang::get('lang.agents')=>$agents->lists('first_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auto-response: checkbox : Disable new ticket auto-response -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- intrnal Notes : Textarea : -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Submit button -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="sys_help_tpoic" @if($sys_help_topic->help_topic == $topics->id) checked disabled @endif> {{ Lang::get('lang.make-default-helptopic')}}
|
||||
</div>
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Priority: Drop down: value from Priority table -->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!}
|
||||
{!!Form::select('priority', [''=>'Select a Proirity','Priorities'=>$priority->lists('priority_desc','priority_id')],null,['class' => 'form-control']) !!}
|
||||
{!! $errors->first('priority', '<spam class="help-block">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- SLA Plan: Drop down: value SLA Plan table-->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('sla_plan') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('sla_plan',Lang::get('lang.SLA_plan')) !!}
|
||||
|
||||
{!!Form::select('sla_plan', [''=>'Select a SLA Plan','SLA Plans'=>$slas->lists('name','id')],null,['class' => 'form-control']) !!}
|
||||
{!! $errors->first('sla_plan', '<spam class="help-block">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Auto-assign To: Drop Down: value from Agent table -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('auto_assign') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('auto_assign',Lang::get('lang.auto_assign')) !!}
|
||||
{!! $errors->first('auto_assign', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('auto_assign', [''=>'Select an Agent','Agents'=>$agents->lists('first_name','id')],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Auto-response: checkbox : Disable new ticket auto-response -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- intrnal Notes : Textarea : -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit button -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- close form -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@stop
|
||||
@stop
|
@@ -28,124 +28,111 @@ class="active"
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<div class="box box-primary">
|
||||
<div class="form-group">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.help_topic')}}</h2><a href="{{route('helptopic.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_help_topic')}}</a></div>
|
||||
<div class="box-body table-responsive">
|
||||
|
||||
<!-- check whether success or not -->
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('success') !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{Lang::get('lang.help_topic')}}</h3>
|
||||
<a href="{{route('helptopic.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_help_topic')}}</a>
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
<div class="box-body table-responsive">
|
||||
<!-- check whether success or not -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('success') !!}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-bordered dataTable">
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.topic')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.status')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.type')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.priority')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.department')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.last_updated')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
</tr>
|
||||
<?php
|
||||
$default_helptopic = App\Model\helpdesk\Settings\Ticket::where('id', '=', '1')->first();
|
||||
$default_helptopic = $default_helptopic->help_topic;
|
||||
?>
|
||||
<!-- Foreach @var$topics as @var topic -->
|
||||
@foreach($topics as $topic)
|
||||
<tr style="padding-bottom:-30px">
|
||||
<!-- topic Name with Link to Edit page along Id -->
|
||||
<td><a href="{{route('helptopic.edit',$topic->id)}}">{!! $topic->topic !!}
|
||||
@if($topic->id == $default_helptopic)
|
||||
( Default )
|
||||
<?php
|
||||
$disable = 'disabled';
|
||||
?>
|
||||
@else
|
||||
<?php
|
||||
$disable = '';
|
||||
?>
|
||||
@endif
|
||||
</a></td>
|
||||
|
||||
<!-- topic Status : if status==1 active -->
|
||||
<td>
|
||||
@if($topic->status=='1')
|
||||
<span style="color:green">{!! Lang::get('lang.active') !!}</span>
|
||||
@else
|
||||
<span style="color:red">{!! Lang::get('lang.disable') !!}</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<!-- Type -->
|
||||
|
||||
<td>
|
||||
@if($topic->type=='1')
|
||||
<span style="color:green">{!! Lang::get('lang.public') !!}</span>
|
||||
@else
|
||||
<span style="color:red">{!! Lang::get('lang.private') !!}</span>
|
||||
@endif
|
||||
</td>
|
||||
<!-- Priority -->
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $topic->priority)->first(); ?>
|
||||
<td>{!! $priority->priority_desc !!}</td>
|
||||
<!-- Department -->
|
||||
@if($topic->department != null)
|
||||
<?php
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', $topic->department)->first();
|
||||
$dept = $dept->name;
|
||||
?>
|
||||
@elseif($topic->department == null)
|
||||
<?php $dept = ""; ?>
|
||||
@endif
|
||||
<td> {!! $dept !!} </td>
|
||||
<!-- Last Updated -->
|
||||
<td> {!! UTC::usertimezone($topic->updated_at) !!} </td>
|
||||
<!-- Deleting Fields -->
|
||||
<td>
|
||||
{!! Form::open(['route'=>['helptopic.destroy', $topic->id],'method'=>'DELETE']) !!}
|
||||
<a href="{{route('helptopic.edit',$topic->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-trash" style="color:black;"> </i> {!! Lang::get('lang.edit') !!}</a>
|
||||
<!-- To pop up a confirm Message -->
|
||||
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> '.Lang::get('lang.delete'),
|
||||
['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat '.$disable,
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
<!-- Set a link to Create Page -->
|
||||
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table class="table table-bordered dataTable" style="overflow:hidden;">
|
||||
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.topic')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.status')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.type')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.priority')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.department')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.last_updated')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$default_helptopic = App\Model\helpdesk\Settings\Ticket::where('id','=','1')->first();
|
||||
$default_helptopic = $default_helptopic->help_topic;
|
||||
|
||||
?>
|
||||
|
||||
<!-- Foreach @var$topics as @var topic -->
|
||||
@foreach($topics as $topic)
|
||||
<tr style="padding-bottom:-30px">
|
||||
|
||||
<!-- topic Name with Link to Edit page along Id -->
|
||||
<td><a href="{{route('helptopic.edit',$topic->id)}}">{!! $topic->topic !!}
|
||||
@if($topic->id == $default_helptopic)
|
||||
( Default )
|
||||
<?php
|
||||
$disable = 'disabled';
|
||||
?>
|
||||
@else
|
||||
<?php
|
||||
$disable = '';
|
||||
?>
|
||||
@endif
|
||||
</a></td>
|
||||
|
||||
<!-- topic Status : if status==1 active -->
|
||||
<td>
|
||||
@if($topic->status=='1')
|
||||
<span style="color:green">Active</span>
|
||||
@else
|
||||
<span style="color:red">Disable</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<!-- Type -->
|
||||
|
||||
<td>
|
||||
@if($topic->type=='1')
|
||||
<span style="color:green">Public</span>
|
||||
@else
|
||||
<span style="color:red">Private</span>
|
||||
@endif
|
||||
</td>
|
||||
<!-- Priority -->
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id','=',$topic->priority)->first(); ?>
|
||||
<td>{!! $priority->priority_desc !!}</td>
|
||||
<!-- Department -->
|
||||
@if($topic->department != null)
|
||||
<?php $dept = App\Model\helpdesk\Agent\Department::where('id', '=', $topic->department)->first();
|
||||
$dept = $dept->name; ?>
|
||||
@elseif($topic->department == null)
|
||||
<?php $dept = ""; ?>
|
||||
@endif
|
||||
<td> {!! $dept !!} </td>
|
||||
<!-- Last Updated -->
|
||||
<td> {!! UTC::usertimezone($topic->updated_at) !!} </td>
|
||||
<!-- Deleting Fields -->
|
||||
<td>
|
||||
{!! Form::open(['route'=>['helptopic.destroy', $topic->id],'method'=>'DELETE']) !!}
|
||||
<a href="{{route('helptopic.edit',$topic->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-trash" style="color:black;"> </i> Edit</a>
|
||||
<!-- To pop up a confirm Message -->
|
||||
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
|
||||
['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat '.$disable,
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
<!-- Set a link to Create Page -->
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
@stop
|
@@ -16,89 +16,80 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.sla_plan') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\SlaController@store', 'method' => 'post']) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
|
||||
|
||||
<!-- Name text form Required -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden;">
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!}
|
||||
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('grace_period') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
|
||||
{!! $errors->first('grace_period', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\SlaController@store', 'method' => 'post']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">{{Lang::get('lang.create')}}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('name'))
|
||||
<li class="error-message-padding">{!! $errors->first('name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('grace_period'))
|
||||
<li class="error-message-padding">{!! $errors->first('grace_period', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('grace_period') ? 'has-error' : '' }}">
|
||||
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
|
||||
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- close form -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@stop
|
||||
@stop
|
@@ -16,89 +16,86 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.sla_plan') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($slas,['url' => 'sla/'.$slas->id, 'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.edit')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
|
||||
|
||||
<!-- Name text form Required -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden;">
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!}
|
||||
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::model($slas,['url' => 'sla/'.$slas->id, 'method' => 'PATCH']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">{{Lang::get('lang.edit')}}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('name'))
|
||||
<li class="error-message-padding">{!! $errors->first('name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('grace_period'))
|
||||
<li class="error-message-padding">{!! $errors->first('grace_period', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- Name text form Required -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden;">
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('grace_period') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
|
||||
{!! $errors->first('grace_period', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('grace_period') ? 'has-error' : '' }}">
|
||||
{!! Form::label('grace_period',Lang::get('lang.grace_period')) !!}
|
||||
{!! Form::select('grace_period',['6 Hours'=>'6 Hours', '12 Hours'=>'12 Hours', '18 Hours'=>'18 Hours', '24 Hours'=>'24 Hours', '36 Hours'=>'36 Hours', '48 Hours'=>'48 Hours'],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}
|
||||
{!! Form::radio('status','1',true) !!} {{Lang::get('lang.active')}}
|
||||
{!! Form::radio('status','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="sys_sla" @if($slas->id == $sla->sla) checked disabled @endif> {{ Lang::get('lang.make-default-sla')}}
|
||||
</div>
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- close form -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@stop
|
||||
|
@@ -39,7 +39,6 @@ class="active"
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('success') !!}
|
||||
</div>
|
||||
@@ -47,10 +46,9 @@ class="active"
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
<i class="fa fa-ban"></i><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b><br>
|
||||
<li class="error-message-padding">{!! Session::get('fails') !!}</li>
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('errors'))
|
||||
@@ -77,44 +75,43 @@ class="active"
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group {!! $errors->has('name') ? 'has-error' : '' !!}">
|
||||
<label for="inputName" class="col-sm-2 control-label">{!! Lang::get('lang.name') !!}</label>
|
||||
<label for="inputName" class="col-sm-2 control-label">{!! Lang::get('lang.name') !!} <span class="text-red"> *</span></label>
|
||||
<div class="col-sm-6">
|
||||
{!! Form::text('name',null,['class' => 'form-control', 'placeholder' => 'Name', 'id' => 'name']) !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control', 'placeholder' => Lang::get('lang.name'), 'id' => 'name']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('status') ? 'has-error' : '' !!}">
|
||||
<label class="col-sm-2 control-label"> {!! Lang::get('lang.status') !!}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="radio" id="inputEmail2" name="status" value="1" > <label class="control-label" for="inputEmail2">Active</label>
|
||||
<input type="radio" id="inputEmail1" name="status" value="0" checked> <label class="control-label" for="inputEmail1">Inactive</label>
|
||||
<input type="radio" id="inputEmail2" name="status" value="1" > <label class="control-label" for="inputEmail2">{!! Lang::get('lang.active') !!}</label>
|
||||
<input type="radio" id="inputEmail1" name="status" value="0" checked> <label class="control-label" for="inputEmail1">{!! Lang::get('lang.inactive') !!}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('execution_order') ? 'has-error' : '' !!}">
|
||||
<div>
|
||||
<label for="Exceution" class="col-sm-2 control-label">{!! Lang::get('lang.exceution_order') !!}</label>
|
||||
<label for="Exceution" class="col-sm-2 control-label">{!! Lang::get('lang.execution_order') !!} <span class="text-red"> *</span></label>
|
||||
<div class="col-sm-6">
|
||||
{!! Form::input('number', 'execution_order',null,['class' => 'form-control', 'placeholder' => 'Exceution Order', 'id' => 'execution_order', 'min' => '0']) !!}
|
||||
{!! Form::input('number', 'execution_order',null,['class' => 'form-control', 'placeholder' => Lang::get('lang.execution_order'), 'id' => 'execution_order', 'min' => '0']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('target_channel') ? 'has-error' : '' !!}">
|
||||
<label class="col-sm-2 control-label">{!! Lang::get('lang.target_channel') !!}</label>
|
||||
<label class="col-sm-2 control-label">{!! Lang::get('lang.target_channel') !!} <span class="text-red"> *</span></label>
|
||||
<div class="col-sm-6">
|
||||
{!! Form::select('target_channel', [''=> '-- Select a Channel --', 'A-0' => 'Any', 'A-1' => 'Web Forms', 'A-4' => 'API Calls', 'A-2' => 'Emails'], null,['class' => 'form-control', 'id' => 'execution_order']) !!}
|
||||
{!! Form::select('target_channel', [''=> '-- '.Lang::get('lang.select_a_channel').' --', 'A-0' => 'Any', 'A-1' => 'Web Forms', 'A-4' => 'API Calls', 'A-2' => 'Emails'], null,['class' => 'form-control', 'id' => 'execution_order']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#open" data-toggle="tab">{!! Lang::get('lang.workflow_rules') !!}</a>
|
||||
<li class="active"><a href="#open" data-toggle="tab">{!! Lang::get('lang.workflow_rules') !!} <span class="text-red"> *</span></a>
|
||||
</li>
|
||||
<li><a href="#close" data-toggle="tab">{!! Lang::get('lang.workflow_action') !!}</a>
|
||||
<li><a href="#close" data-toggle="tab">{!! Lang::get('lang.workflow_action') !!} <span class="text-red"> *</span></a>
|
||||
</li>
|
||||
<li><a href="#delect" data-toggle="tab">{!! Lang::get('lang.internal_notes') !!}</a>
|
||||
<li><a href="#delect" data-toggle="tab">{!! Lang::get('lang.internal_notes') !!} </a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@@ -126,9 +123,9 @@ class="active"
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{!! Lang::get('lang.rules') !!}</td>
|
||||
<td>{!! Lang::get('lang.condition') !!}</td>
|
||||
<td>{!! Lang::get('lang.statement') !!}</td>
|
||||
<td>{!! Lang::get('lang.rules') !!} <span class="text-red"> *</span></td>
|
||||
<td>{!! Lang::get('lang.condition') !!} <span class="text-red"> *</span></td>
|
||||
<td>{!! Lang::get('lang.statement') !!} <span class="text-red"> *</span></td>
|
||||
<td>{!! Lang::get('lang.action') !!}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -136,24 +133,24 @@ class="active"
|
||||
<tr id="firstdata">
|
||||
<td>
|
||||
<select class="form-control" name="rule[0][a]" required>
|
||||
<option value="">-- Select One --</option>
|
||||
<option value="email">Email</option>
|
||||
<option value="email_name">Email name</option>
|
||||
<option value="subject">Subject</option>
|
||||
<option value="message">Message/Body</option>
|
||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||
<option value="email">{!! Lang::get('lang.email') !!}</option>
|
||||
<option value="email_name">{!! Lang::get('lang.email_name') !!}</option>
|
||||
<option value="subject">{!! Lang::get('lang.subject') !!}</option>
|
||||
<option value="message">{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="col-md-3">
|
||||
<select class="form-control" name="rule[0][b]" required>
|
||||
<option value="">-- Select One --</option>
|
||||
<option value="equal">Equal to</option>
|
||||
<option value="not_equal">Not equal to</option>
|
||||
<option value="contains">Contains</option>
|
||||
<option value="dn_contain">Does Not Contain</option>
|
||||
<option value="starts">Starts With</option>
|
||||
<option value="ends">Ends With</option>
|
||||
<!-- <option value="match">Match Regular Expressions</option>
|
||||
<option value="not_match">Does not match Regular Expression</option>-->
|
||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||
<option value="equal">{!! Lang::get('lang.equal_to') !!}</option>
|
||||
<option value="not_equal">{!! Lang::get('lang.not_equal_to') !!}</option>
|
||||
<option value="contains">{!! Lang::get('lang.contains') !!}</option>
|
||||
<option value="dn_contain">{!! Lang::get('lang.does_not_contain') !!}</option>
|
||||
<option value="starts">{!! Lang::get('lang.starts_with') !!}</option>
|
||||
<option value="ends">{!! Lang::get('lang.ends_with') !!}</option>
|
||||
<!-- <option value="match">Match Regular Expressions</option>
|
||||
<option value="not_match">Does not match Regular Expression</option>-->
|
||||
</select>
|
||||
</td>
|
||||
<td class="col-md-3">
|
||||
@@ -190,8 +187,8 @@ class="active"
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{!! Lang::get('lang.condition') !!}</td>
|
||||
<td>{!! Lang::get('lang.rules') !!}</td>
|
||||
<td>{!! Lang::get('lang.condition') !!} <span class="text-red"> *</span></td>
|
||||
<td>{!! Lang::get('lang.rules') !!} <span class="text-red"> *</span></td>
|
||||
<td>{!! Lang::get('lang.action') !!}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -199,16 +196,16 @@ class="active"
|
||||
<tr id="firstdata1">
|
||||
<td>
|
||||
<select class="form-control" onChange="selectdata(0)" id="selected0" name="action[0][a]" required>
|
||||
<option value="">Select an Action</option>
|
||||
<option value="">-- {!! Lang::get('lang.select_an_action') !!} --</option>
|
||||
<optgroup label="Ticket">
|
||||
<option value="reject">Reject Ticket</option>
|
||||
<option value="department">Set Department</option>
|
||||
<option value="priority">Set Priority</option>
|
||||
<option value="sla">Set SLA Plan</option>
|
||||
<option value="team">Assign Team</option>
|
||||
<option value="agent">Assign Agent</option>
|
||||
<option value="helptopic">Set Help Topic</option>
|
||||
<option value="status">Set Ticket Status</option>
|
||||
<option value="reject">{!! Lang::get('lang.reject_ticket') !!}</option>
|
||||
<option value="department">{!! Lang::get('lang.set_department') !!}</option>
|
||||
<option value="priority">{!! Lang::get('lang.set_priority') !!}</option>
|
||||
<option value="sla">{!! Lang::get('lang.set_sla_plan') !!}</option>
|
||||
<option value="team">{!! Lang::get('lang.assign_team') !!}</option>
|
||||
<option value="agent">{!! Lang::get('lang.assign_agent') !!}</option>
|
||||
<option value="helptopic">{!! Lang::get('lang.set_help_topic') !!}</option>
|
||||
<option value="status">{!! Lang::get('lang.set_ticket_status') !!}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</td>
|
||||
@@ -256,7 +253,6 @@ class="active"
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
@@ -290,16 +286,16 @@ class="active"
|
||||
$('.buttons').append('<tr id="firstdata1">' +
|
||||
'<td>' +
|
||||
'<select class="form-control" onChange="selectdata(' + n + ')" name="action[' + n + '][a]" id="selected' + n + '" required>' +
|
||||
'<option value="">Select an Action</option>' +
|
||||
'<option value="">-- {!! Lang::get("lang.select_an_action") !!} --</option>' +
|
||||
'<optgroup label="Ticket">' +
|
||||
'<option value="reject">Reject Ticket</option>' +
|
||||
'<option value="department">Set Department</option>' +
|
||||
'<option value="priority">Set Priority</option>' +
|
||||
'<option value="sla">Set SLA Plan</option>' +
|
||||
'<option value="team">Assign Team</option>' +
|
||||
'<option value="agent">Assign Agent</option>' +
|
||||
'<option value="helptopic">Set Help Topic</option>' +
|
||||
'<option value="status">Set Ticket Status</option>' +
|
||||
'<option value="reject">{!! Lang::get("lang.reject_ticket") !!} </option>' +
|
||||
'<option value="department">{!! Lang::get("lang.set_department") !!} </option>' +
|
||||
'<option value="priority">{!! Lang::get("lang.set_priority") !!} </option>' +
|
||||
'<option value="sla">{!! Lang::get("lang.set_sla_plan") !!} </option>' +
|
||||
'<option value="team">{!! Lang::get("lang.assign_team") !!} </option>' +
|
||||
'<option value="agent">{!! Lang::get("lang.assign_agent") !!} </option>' +
|
||||
'<option value="helptopic">{!! Lang::get("lang.set_help_topic") !!} </option>' +
|
||||
'<option value="status">{!! Lang::get("lang.set_ticket_status") !!} </option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td id="fill' + n + '">' +
|
||||
@@ -330,22 +326,22 @@ class="active"
|
||||
$('.button1').append('<tr>' +
|
||||
'<td>' +
|
||||
'<select class="form-control" name="rule[' + n + '][a]" required>' +
|
||||
'<option>-- Select One --</option>' +
|
||||
'<option value="email">Email</option>' +
|
||||
'<option value="email_name">Email name</option>' +
|
||||
'<option value="subject">Subject</option>' +
|
||||
'<option value="message">Message/Body</option>' +
|
||||
'<option>-- {!! Lang::get("lang.select_one") !!} --</option>' +
|
||||
'<option value="email">{!! Lang::get("lang.email") !!}</option>' +
|
||||
'<option value="email_name">{!! Lang::get("lang.email_name") !!}</option>' +
|
||||
'<option value="subject">{!! Lang::get("lang.subject") !!}</option>' +
|
||||
'<option value="message">{!! Lang::get("lang.message") !!}/{!! Lang::get("lang.body") !!}</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3">' +
|
||||
'<select class="form-control" name="rule[' + n + '][b]" required>' +
|
||||
'<option value="">-- Select One --</option>' +
|
||||
'<option value="equal">Equal to</option>' +
|
||||
'<option value="not_equal">Not equal to</option>' +
|
||||
'<option value="contains">Contains</option>' +
|
||||
'<option value="dn_contain">Does Not Contain</option>' +
|
||||
'<option value="starts">Starts With</option>' +
|
||||
'<option value="ends">Ends With</option>' +
|
||||
'<option value="">-- {!! Lang::get("lang.select_one") !!} --</option>' +
|
||||
'<option value="equal">{!! Lang::get("lang.equal_to") !!}</option>' +
|
||||
'<option value="not_equal">{!! Lang::get("lang.not_equal_to") !!}</option>' +
|
||||
'<option value="contains">{!! Lang::get("lang.contains") !!}</option>' +
|
||||
'<option value="dn_contain">{!! Lang::get("lang.does_not_contain") !!}</option>' +
|
||||
'<option value="starts">{!! Lang::get("lang.starts_with") !!}</option>' +
|
||||
'<option value="ends">{!! Lang::get("lang.ends_with") !!}</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3"> <input class="form-control" type="text" name="rule[' + n + '][c]" required> </td>' +
|
||||
@@ -362,19 +358,19 @@ class="active"
|
||||
});
|
||||
|
||||
function selectdata(id) {
|
||||
var selected_data = document.getElementById('selected'+id).value;
|
||||
$.ajax({
|
||||
url: "{!! url('workflow/action-rule') !!}" + "/" + id,
|
||||
type: "get",
|
||||
data: {option: selected_data},
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
//adds the echoed response to our container
|
||||
$("#fill" + id).html(data);
|
||||
}
|
||||
});
|
||||
var selected_data = document.getElementById('selected' + id).value;
|
||||
$.ajax({
|
||||
url: "{!! url('workflow/action-rule') !!}" + "/" + id,
|
||||
type: "get",
|
||||
data: {option: selected_data},
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
//adds the echoed response to our container
|
||||
$("#fill" + id).html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class="active"
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{!! URL::route('setting') !!}"><i class="fa fa-dashboard"></i> {!! Lang::get('lang.home') !!}</a></li>
|
||||
<li><a href="{!! URL::route('workflow') !!}">{!! Lang::get('lang.ticket_workflow') !!}</a></li>
|
||||
<li class="active"><a href="{!! URL::route('workflow.edit') !!}">{!! Lang::get('lang.edit_workflow') !!}</a></li>
|
||||
<li class="active"><a href="">{!! Lang::get('lang.edit_workflow') !!}</a></li>
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
@@ -39,7 +39,6 @@ class="active"
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@@ -47,16 +46,15 @@ class="active"
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="fa fa-ban"></i><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b><br>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('errors'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('name'))
|
||||
@@ -77,33 +75,39 @@ class="active"
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group {!! $errors->has('name') ? 'has-error' : '' !!}">
|
||||
<label for="inputName" class="col-sm-2 control-label">Name</label>
|
||||
<label for="inputName" class="col-sm-2 control-label">{!! Lang::get('lang.name') !!}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" placeholder="Name" id="name" name="name" value="{!! $workflow->name !!}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('status') ? 'has-error' : '' !!}">
|
||||
<label class="col-sm-2 control-label"> Status</label>
|
||||
<label class="col-sm-2 control-label"> {!! lang::get('lang.status') !!}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="radio" id="inputEmail2" name="status" value="1" <?php if($workflow->status == 1) { echo "checked"; } ?> > <label class="control-label" for="inputEmail2">Active</label>
|
||||
<input type="radio" id="inputEmail1" name="status" value="0" <?php if($workflow->status == 0) { echo "checked"; } ?> > <label class="control-label" for="inputEmail1">Inactive</label>
|
||||
<input type="radio" id="inputEmail2" name="status" value="1" <?php
|
||||
if ($workflow->status == 1) {
|
||||
echo "checked";
|
||||
}
|
||||
?> > <label class="control-label" for="inputEmail2">{!! Lang::get('lang.active') !!}</label>
|
||||
<input type="radio" id="inputEmail1" name="status" value="0" <?php
|
||||
if ($workflow->status == 0) {
|
||||
echo "checked";
|
||||
}
|
||||
?> > <label class="control-label" for="inputEmail1">{!! Lang::get('lang.inactive') !!}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('execution_order') ? 'has-error' : '' !!}">
|
||||
<div>
|
||||
<label for="Exceution" class="col-sm-2 control-label">Exceution Order</label>
|
||||
<label for="Exceution" class="col-sm-2 control-label">{!! Lang::get('lang.execution_order') !!}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="number" class="form-control" id="execution_order" name="execution_order" placeholder="Exceution Order" value="{!! $workflow->order !!}" required>
|
||||
<input type="number" class="form-control" id="execution_order" name="execution_order" placeholder="{!! Lang::get('lang.execution_order') !!}" value="{!! $workflow->order !!}" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {!! $errors->has('target_channel') ? 'has-error' : '' !!}">
|
||||
<label class="col-sm-2 control-label">Target Channel</label>
|
||||
|
||||
<label class="col-sm-2 control-label">{!! Lang::get('target_channel') !!}</label>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<select class="form-control" name="target_channel" required>
|
||||
<option value=""> -- Select a Channel -- </option>
|
||||
<option value=""> -- {!! Lang::get('lang.select_a_channel') !!} -- </option>
|
||||
<option value="A-0" <?php
|
||||
if ($workflow->target == "A-0") {
|
||||
echo "selected='selected'";
|
||||
@@ -115,33 +119,31 @@ class="active"
|
||||
}
|
||||
?> >Web Forms</option>
|
||||
<option value="A-4" <?php
|
||||
if ($workflow->target == "A-4") {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >API Calls</option>
|
||||
if ($workflow->target == "A-4") {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >API Calls</option>
|
||||
<option value="A-2" <?php
|
||||
if ($workflow->target == "A-2") {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >Emails</option>
|
||||
|
||||
if ($workflow->target == "A-2") {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >Emails</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#open" data-toggle="tab">Workflow Rules</a>
|
||||
<li class="active"><a href="#open" data-toggle="tab">{!! Lang::get('lang.workflow_rules') !!}</a>
|
||||
</li>
|
||||
<li><a href="#close" data-toggle="tab">Workflow Action</a>
|
||||
<li><a href="#close" data-toggle="tab">{!! Lang::get('lang.workflow_action') !!}</a>
|
||||
</li>
|
||||
<li><a href="#delect" data-toggle="tab">Internal Notes</a>
|
||||
<li><a href="#delect" data-toggle="tab">{!! Lang::get('lang.internal_notes') !!}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@@ -153,10 +155,10 @@ class="active"
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Rules</td>
|
||||
<td>Condition</td>
|
||||
<td>Statement</td>
|
||||
<td>Action</td>
|
||||
<td>{!! Lang::get('lang.rules') !!}</td>
|
||||
<td>{!! Lang::get('lang.condition') !!}</td>
|
||||
<td>{!! Lang::get('lang.statement') !!}</td>
|
||||
<td>{!! Lang::get('lang.action') !!}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="button1">
|
||||
@@ -166,24 +168,72 @@ class="active"
|
||||
<tr id="firstdata{!! $j !!}">
|
||||
<td>
|
||||
<select class="form-control" name="rule[{!! $j-1 !!}][a]" required>
|
||||
<option value="">-- Select One --</option>
|
||||
<option value="email" <?php if($workflow_rule->matching_scenario == 'email'){ echo "selected='selected'"; } ?> >Email</option>
|
||||
<option value="email_name" <?php if($workflow_rule->matching_scenario == 'email_name'){ echo "selected='selected'"; } ?> >Email name</option>
|
||||
<option value="subject" <?php if($workflow_rule->matching_scenario == 'subject'){ echo "selected='selected'"; } ?>>Subject</option>
|
||||
<option value="message" <?php if($workflow_rule->matching_scenario == 'message'){ echo "selected='selected'"; } ?> >Message/Body</option>
|
||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||
<option value="email" <?php
|
||||
if ($workflow_rule->matching_scenario == 'email') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email') !!}</option>
|
||||
<option value="email_name" <?php
|
||||
if ($workflow_rule->matching_scenario == 'email_name') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email_name') !!}</option>
|
||||
<option value="subject" <?php
|
||||
if ($workflow_rule->matching_scenario == 'subject') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?>>{!! Lang::get('lang.subject') !!}</option>
|
||||
<option value="message" <?php
|
||||
if ($workflow_rule->matching_scenario == 'message') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="col-md-3">
|
||||
<select class="form-control" name="rule[{!! $j-1 !!}][b]" required>
|
||||
<option value="">-- Select One --</option>
|
||||
<option value="equal" <?php if($workflow_rule->matching_relation == 'equal'){ echo "selected='selected'"; } ?> >Equal to</option>
|
||||
<option value="not_equal" <?php if($workflow_rule->matching_relation == 'not_equal'){ echo "selected='selected'"; } ?> >Not equal to</option>
|
||||
<option value="contains" <?php if($workflow_rule->matching_relation == 'contains'){ echo "selected='selected'"; } ?> >Contains</option>
|
||||
<option value="dn_contain" <?php if($workflow_rule->matching_relation == 'dn_contain'){ echo "selected='selected'"; } ?> >Does Not Contain</option>
|
||||
<option value="starts" <?php if($workflow_rule->matching_relation == 'starts'){ echo "selected='selected'"; } ?> >Starts With</option>
|
||||
<option value="ends" <?php if($workflow_rule->matching_relation == 'ends'){ echo "selected='selected'"; } ?> >Ends With</option>
|
||||
<!-- <option value="match" <?php if($workflow_rule->matching_relation == 'match'){ echo "selected='selected'"; } ?> >Match Regular Expressions</option>
|
||||
<option value="not_match" <?php if($workflow_rule->matching_relation == 'not_match'){ echo "selected='selected'"; } ?> >Does not match Regular Expression</option>-->
|
||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||
<option value="equal" <?php
|
||||
if ($workflow_rule->matching_relation == 'equal') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.equal_to') !!}</option>
|
||||
<option value="not_equal" <?php
|
||||
if ($workflow_rule->matching_relation == 'not_equal') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.not_equal_to') !!}</option>
|
||||
<option value="contains" <?php
|
||||
if ($workflow_rule->matching_relation == 'contains') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.contains') !!}</option>
|
||||
<option value="dn_contain" <?php
|
||||
if ($workflow_rule->matching_relation == 'dn_contain') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.does_not_contain') !!}</option>
|
||||
<option value="starts" <?php
|
||||
if ($workflow_rule->matching_relation == 'starts') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.starts_with') !!}</option>
|
||||
<option value="ends" <?php
|
||||
if ($workflow_rule->matching_relation == 'ends') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.ends_with') !!}</option>
|
||||
<!-- <option value="match" <?php
|
||||
if ($workflow_rule->matching_relation == 'match') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >Match Regular Expressions</option>
|
||||
<option value="not_match" <?php
|
||||
if ($workflow_rule->matching_relation == 'not_match') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >Does not match Regular Expression</option>-->
|
||||
</select>
|
||||
</td>
|
||||
<td class="col-md-3">
|
||||
@@ -192,7 +242,7 @@ class="active"
|
||||
<td style="text-align: center">
|
||||
<div class="tools">
|
||||
<span class="btnRemove1" data-toggle="modal" data-target="#">
|
||||
<a data-toggle="tooltip" data-placement="top" title="Delete" onclick="document.getElementById('firstdata{!! $j !!}').innerHTML = ''">
|
||||
<a data-toggle="tooltip" data-placement="top" title="{!! Lang::get('lang.delete') !!}" onclick="document.getElementById('firstdata{!! $j !!}').innerHTML = ''">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</span>
|
||||
@@ -203,10 +253,8 @@ class="active"
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row" style="padding: 10px 15px 0px">
|
||||
|
||||
<div class="pull-right" >
|
||||
|
||||
<a class="btn btn-primary btnAdd1">Add</a>
|
||||
<a class="btn btn-primary btnAdd1">{!! Lang::get('lang.add') !!}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -223,9 +271,9 @@ class="active"
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Condition</td>
|
||||
<td>Rule</td>
|
||||
<td>Action</td>
|
||||
<td>{!! Lang::get('lang.condition') !!}</td>
|
||||
<td>{!! Lang::get('lang.rules') !!}</td>
|
||||
<td>{!! Lang::get('lang.action') !!}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="buttons">
|
||||
@@ -235,118 +283,149 @@ class="active"
|
||||
<tr id="seconddata{!! $i !!}">
|
||||
<td>
|
||||
<select class="form-control" onChange="selectdata({!! $i !!})" id="selected{!! $i !!}" name="action[{!! $i !!}][a]" required>
|
||||
<option value="">Select an Action</option>
|
||||
<option value="">-- {!! Lang::get('lang.select_an_action') !!} --</option>
|
||||
<optgroup label="Ticket">
|
||||
<option value="reject" <?php if($workflow_action->condition == 'reject'){ echo "selected='selected'"; } ?> >Reject Ticket</option>
|
||||
<option value="department" <?php if($workflow_action->condition == 'department'){ echo "selected='selected'"; } ?> >Set Department</option>
|
||||
<option value="priority" <?php if($workflow_action->condition == 'priority'){ echo "selected='selected'"; } ?> >Set Priority</option>
|
||||
<option value="sla" <?php if($workflow_action->condition == 'sla'){ echo "selected='selected'"; } ?> >Set SLA Plan</option>
|
||||
<option value="team" <?php if($workflow_action->condition == 'team'){ echo "selected='selected'"; } ?> >Assign Team</option>
|
||||
<option value="agent" <?php if($workflow_action->condition == 'agent'){ echo "selected='selected'"; } ?> >Assign Agent</option>
|
||||
<option value="helptopic" <?php if($workflow_action->condition == 'helptopic'){ echo "selected='selected'"; } ?> >Set Help Topic</option>
|
||||
<option value="status" <?php if($workflow_action->condition == 'status'){ echo "selected='selected'"; } ?> >Set Ticket Status</option>
|
||||
<option value="reject" <?php
|
||||
if ($workflow_action->condition == 'reject') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.reject_ticket') !!}</option>
|
||||
<option value="department" <?php
|
||||
if ($workflow_action->condition == 'department') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.set_department') !!}</option>
|
||||
<option value="priority" <?php
|
||||
if ($workflow_action->condition == 'priority') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.set_priority') !!}</option>
|
||||
<option value="sla" <?php
|
||||
if ($workflow_action->condition == 'sla') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.set_sla_plan') !!}</option>
|
||||
<option value="team" <?php
|
||||
if ($workflow_action->condition == 'team') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.assign_team') !!}</option>
|
||||
<option value="agent" <?php
|
||||
if ($workflow_action->condition == 'agent') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.assign_agent') !!}</option>
|
||||
<option value="helptopic" <?php
|
||||
if ($workflow_action->condition == 'helptopic') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.set_help_topic') !!}</option>
|
||||
<option value="status" <?php
|
||||
if ($workflow_action->condition == 'status') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.set_ticket_status') !!}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</td>
|
||||
<td id="fill{!! $i !!}">
|
||||
<?php
|
||||
if($workflow_action->condition == 'reject')
|
||||
{
|
||||
echo "<input type='hidden' name='action[". $i ."][b]' class='form-control' value='reject'><span text-red>Reject</span>";
|
||||
<?php
|
||||
if ($workflow_action->condition == 'reject') {
|
||||
echo "<input type='hidden' name='action[" . $i . "][b]' class='form-control' value='reject'><span text-red>Reject</span>";
|
||||
} elseif ($workflow_action->condition == 'department') {
|
||||
$departments = App\Model\helpdesk\Agent\Department::all();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($departments as $department) {
|
||||
if($workflow_action->action == $department->id) {
|
||||
if ($workflow_action->action == $department->id) {
|
||||
$depart = "selected";
|
||||
} else {
|
||||
$depart = "";
|
||||
}
|
||||
$var .= "<option value='" . $department->id . "' ".$depart.">" . $department->name . "</option>";
|
||||
$var .= "<option value='" . $department->id . "' " . $depart . ">" . $department->name . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'priority') {
|
||||
$priorities = App\Model\helpdesk\Ticket\Ticket_Priority::all();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($priorities as $priority) {
|
||||
if($workflow_action->action == $priority->priority_id) {
|
||||
if ($workflow_action->action == $priority->priority_id) {
|
||||
$priority1 = "selected";
|
||||
} else {
|
||||
$priority1 = "";
|
||||
}
|
||||
$var .= "<option value='" . $priority->priority_id . "' ".$priority1.">" . $priority->priority_desc . "</option>";
|
||||
$var .= "<option value='" . $priority->priority_id . "' " . $priority1 . ">" . $priority->priority_desc . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'sla') {
|
||||
$sla_plans = App\Model\helpdesk\Manage\Sla_plan::where('status', '=', 1)->get();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($sla_plans as $sla_plan) {
|
||||
if($workflow_action->action == $sla_plan->id) {
|
||||
if ($workflow_action->action == $sla_plan->id) {
|
||||
$sla = "selected";
|
||||
} else {
|
||||
$sla = "";
|
||||
}
|
||||
$var .= "<option value='" . $sla_plan->id . "' ". $sla .">" . $sla_plan->grace_period . "</option>";
|
||||
$var .= "<option value='" . $sla_plan->id . "' " . $sla . ">" . $sla_plan->grace_period . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'team') {
|
||||
$teams = App\Model\helpdesk\Agent\Teams::where('status', '=', 1)->get();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($teams as $team) {
|
||||
if($workflow_action->action == $team->id) {
|
||||
if ($workflow_action->action == $team->id) {
|
||||
$team1 = "selected";
|
||||
} else {
|
||||
$team1 = "";
|
||||
}
|
||||
$var .= "<option value='" . $team->id . "' ".$team1.">" . $team->name . "</option>";
|
||||
$var .= "<option value='" . $team->id . "' " . $team1 . ">" . $team->name . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'agent') {
|
||||
$users = App\User::where('role', '!=', 'user')->where('active', '=', 1)->get();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($users as $user) {
|
||||
if($workflow_action->action == $user->id) {
|
||||
if ($workflow_action->action == $user->id) {
|
||||
$user1 = "selected";
|
||||
} else {
|
||||
$user1 = "";
|
||||
}
|
||||
$var .= "<option value='" . $user->id . "' ".$user1.">" . $user->first_name . " " . $user->last_name . "</option>";
|
||||
$var .= "<option value='" . $user->id . "' " . $user1 . ">" . $user->first_name . " " . $user->last_name . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'helptopic') {
|
||||
$help_topics = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($help_topics as $help_topic) {
|
||||
if($workflow_action->action == $help_topic->id) {
|
||||
if ($workflow_action->action == $help_topic->id) {
|
||||
$help_topic1 = "selected";
|
||||
} else {
|
||||
$help_topic1 = "";
|
||||
}
|
||||
$var .= "<option value='" . $help_topic->id . "' ".$help_topic1.">" . $help_topic->topic . "</option>";
|
||||
$var .= "<option value='" . $help_topic->id . "' " . $help_topic1 . ">" . $help_topic->topic . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
} elseif ($workflow_action->condition == 'status') {
|
||||
$ticket_status = App\Model\helpdesk\Ticket\Ticket_Status::all();
|
||||
$var = "<select name='action[". $i ."][b]' class='form-control' required>";
|
||||
$var = "<select name='action[" . $i . "][b]' class='form-control' required>";
|
||||
foreach ($ticket_status as $status) {
|
||||
if($workflow_action->action == $status->id) {
|
||||
if ($workflow_action->action == $status->id) {
|
||||
$status1 = "selected";
|
||||
} else {
|
||||
$status1 = "";
|
||||
}
|
||||
$var .= "<option value='" . $status->id . "' ".$status1.">" . $status->name . "</option>";
|
||||
$var .= "<option value='" . $status->id . "' " . $status1 . ">" . $status->name . "</option>";
|
||||
}
|
||||
$var .= "</select>";
|
||||
echo $var;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<div class="tools">
|
||||
@@ -363,7 +442,7 @@ class="active"
|
||||
</table>
|
||||
<div class="row" style="padding: 10px 15px 0px">
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary btnAdd">Add</a>
|
||||
<a class="btn btn-primary btnAdd">{!! Lang::get('lang.add') !!}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -374,7 +453,7 @@ class="active"
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="delect">
|
||||
<div>
|
||||
<textarea name="internal_note" class="textarea" placeholder="Relax your mind, we are there for you...!" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
|
||||
<textarea name="internal_note" class="textarea" placeholder="Please Enter an internal note for your team!" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
@@ -382,7 +461,7 @@ class="active"
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="box-footer">
|
||||
<input type="submit" class="btn btn-primary" value="SUBMIT">
|
||||
<input type="submit" class="btn btn-primary" value="{!! Lang::get('lang.submit') !!}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
@@ -391,129 +470,123 @@ class="active"
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
$('#example2').DataTable({
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
$('#example2').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
function getSelectVal(val) {
|
||||
|
||||
|
||||
function getSelectVal(val) {
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "",
|
||||
data: 'select_box=' + val,
|
||||
success: function(data) {
|
||||
$("#select-list").html(data);
|
||||
url: "",
|
||||
data: 'select_box=' + val,
|
||||
success: function(data) {
|
||||
$("#select-list").html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var x = 0;
|
||||
var n = {!! $i !!};
|
||||
$('.btnAdd').click(function() {
|
||||
n++;
|
||||
var x = 0;
|
||||
var n = {!! $i !!};
|
||||
$('.btnAdd').click(function() {
|
||||
n++;
|
||||
$('.buttons').append('<tr id="firstdata1">' +
|
||||
'<td>' +
|
||||
'<select class="form-control" onChange="selectdata(' + n + ')" name="action[' + n + '][a]" id="selected' + n + '" required>' +
|
||||
'<option value="">Select an Action</option>' +
|
||||
'<optgroup label="Ticket">' +
|
||||
'<option value="reject">Reject Ticket</option>' +
|
||||
'<option value="department">Set Department</option>' +
|
||||
'<option value="priority">Set Priority</option>' +
|
||||
'<option value="sla">Set SLA Plan</option>' +
|
||||
'<option value="team">Assign Team</option>' +
|
||||
'<option value="agent">Assign Agent</option>' +
|
||||
'<option value="helptopic">Set Help Topic</option>' +
|
||||
'<option value="status">Set Ticket Status</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td id="fill' + n + '">' +
|
||||
'</td>' +
|
||||
'<td style="text-align: center">' +
|
||||
'<div class="tools">' +
|
||||
'<span class="btnRemove" data-toggle="modal" data-target="#">' +
|
||||
'<a data-toggle="tooltip" data-placement="top" title="Delete">' +
|
||||
'<i class="fa fa-trash-o"></i>' +
|
||||
'</a>' +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
'</td>' +
|
||||
'</tr>'); // end append
|
||||
'<td>' +
|
||||
'<select class="form-control" onChange="selectdata(' + n + ')" name="action[' + n + '][a]" id="selected' + n + '" required>' +
|
||||
'<option value="">-- {!! Lang::get("lang.select_an_action") !!} --</option>' +
|
||||
'<optgroup label="Ticket">' +
|
||||
'<option value="reject">{!! Lang::get("lang.reject_ticket") !!}</option>' +
|
||||
'<option value="department">{!! Lang::get("lang.set_department") !!}</option>' +
|
||||
'<option value="priority">{!! Lang::get("lang.set_priority") !!}</option>' +
|
||||
'<option value="sla">{!! Lang::get("lang.set_sla_plan") !!}</option>' +
|
||||
'<option value="team">{!! Lang::get("lang.assign_team") !!}</option>' +
|
||||
'<option value="agent">{!! Lang::get("lang.assign_agent") !!} </option>' +
|
||||
'<option value="helptopic">{!! Lang::get("lang.set_help_topic") !!} </option>' +
|
||||
'<option value="status">{!! Lang::get("lang.set_ticket_status") !!} </option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td id="fill' + n + '">' +
|
||||
'</td>' +
|
||||
'<td style="text-align: center">' +
|
||||
'<div class="tools">' +
|
||||
'<span class="btnRemove" data-toggle="modal" data-target="#">' +
|
||||
'<a data-toggle="tooltip" data-placement="top" title="Delete">' +
|
||||
'<i class="fa fa-trash-o"></i>' +
|
||||
'</a>' +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
'</td>' +
|
||||
'</tr>'); // end append
|
||||
$('div .btnRemove').last().click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
});
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
var x = 0;
|
||||
var n = {!! $j !!};
|
||||
$('.btnAdd1').click(function() {
|
||||
n++;
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
var x = 0;
|
||||
var n = {!! $j !!};
|
||||
$('.btnAdd1').click(function() {
|
||||
n++;
|
||||
$('.button1').append('<tr>' +
|
||||
'<td>' +
|
||||
'<select class="form-control" name="rule[' + n + '][a]" required>' +
|
||||
'<option>-- Select One --</option>' +
|
||||
'<option value="email">Email</option>' +
|
||||
'<option value="email_name">Email name</option>' +
|
||||
'<option value="subject">Subject</option>' +
|
||||
'<option value="message">Message/Body</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3">' +
|
||||
'<select class="form-control" name="rule[' + n + '][b]" required>' +
|
||||
'<option value="">-- Select One --</option>' +
|
||||
'<option value="equal">Equal to</option>' +
|
||||
'<option value="not_equal">Not equal to</option>' +
|
||||
'<option value="contains">Contains</option>' +
|
||||
'<option value="dn_contain">Does Not Contain</option>' +
|
||||
'<option value="starts">Starts With</option>' +
|
||||
'<option value="ends">Ends With</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3"> <input class="form-control" type="text" name="rule[' + n + '][c]" required> </td>' +
|
||||
'<td style="text-align: center">' +
|
||||
'<div class="tools"> <span class="btnRemove1" data-toggle="modal" data-target="#"><a data-toggle="tooltip" data-placement="top" title="Delete"><i class="fa fa-trash-o"></i></a></span> </div>' +
|
||||
'</td>' +
|
||||
'</tr>'); // end append
|
||||
'<td>' +
|
||||
'<select class="form-control" name="rule[' + n + '][a]" required>' +
|
||||
'<option>-- {!! Lang::get("lang.select_one") !!} --</option>' +
|
||||
'<option value="email">{!! Lang::get("lang.email") !!}</option>' +
|
||||
'<option value="email_name">{!! Lang::get("lang.email_name") !!}</option>' +
|
||||
'<option value="subject">{!! Lang::get("lang.subject") !!}</option>' +
|
||||
'<option value="message">{!! Lang::get("lang.message") !!}/{!! Lang::get("lang.body") !!}</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3">' +
|
||||
'<select class="form-control" name="rule[' + n + '][b]" required>' +
|
||||
'<option value="">-- {!! Lang::get("lang.select_one") !!} --</option>' +
|
||||
'<option value="equal">{!! Lang::get("lang.equal_to") !!}</option>' +
|
||||
'<option value="not_equal">{!! Lang::get("lang.not_equal_to") !!}</option>' +
|
||||
'<option value="contains">{!! Lang::get("lang.contains") !!}</option>' +
|
||||
'<option value="dn_contain">{!! Lang::get("lang.does_not_contain") !!}</option>' +
|
||||
'<option value="starts">{!! Lang::get("lang.starts_with") !!}</option>' +
|
||||
'<option value="ends">{!! Lang::get("lang.ends_with") !!}</option>' +
|
||||
'</select>' +
|
||||
'</td>' +
|
||||
'<td class="col-md-3"> <input class="form-control" type="text" name="rule[' + n + '][c]" required> </td>' +
|
||||
'<td style="text-align: center">' +
|
||||
'<div class="tools"> <span class="btnRemove1" data-toggle="modal" data-target="#"><a data-toggle="tooltip" data-placement="top" title="Delete"><i class="fa fa-trash-o"></i></a></span> </div>' +
|
||||
'</td>' +
|
||||
'</tr>'); // end append
|
||||
$('div .btnRemove1').last().click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
});
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
|
||||
|
||||
function selectdata(id) {
|
||||
var selected_data = document.getElementById('selected' + id).value;
|
||||
$.ajax({
|
||||
url: "{!! url('workflow/action-rule') !!}" + "/" + id,
|
||||
type: "get",
|
||||
data: {option: selected_data},
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
//adds the echoed response to our container
|
||||
$("#fill" + id).html(data);
|
||||
});
|
||||
});
|
||||
function selectdata(id) {
|
||||
var selected_data = document.getElementById('selected' + id).value;
|
||||
$.ajax({
|
||||
url: "{!! url('workflow/action-rule') !!}" + "/" + id,
|
||||
type: "get",
|
||||
data: {option: selected_data},
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
//adds the echoed response to our container
|
||||
$("#fill" + id).html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
@@ -20,7 +20,6 @@ class="active"
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@@ -38,7 +37,6 @@ class="active"
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('success') !!}
|
||||
</div>
|
||||
@@ -47,7 +45,7 @@ class="active"
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Fail!</b>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
</div>
|
||||
@@ -64,16 +62,12 @@ class="active"
|
||||
->setUrl(route('workflow.list')) // this is the route where data will be retrieved
|
||||
->render() !!}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<!-- <div class="box box-footer"> -->
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
|
Reference in New Issue
Block a user