update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -60,6 +60,9 @@ class="active"
|
||||
@if($errors->first('phone_number'))
|
||||
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('country_code'))
|
||||
<li class="error-message-padding">{!! $errors->first('country_code', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('mobile'))
|
||||
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
|
||||
@endif
|
||||
@@ -120,9 +123,9 @@ class="active"
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!--country code-->
|
||||
<div class="col-xs-1 form-group {{ Session::has('country_code') ? 'has-error' : '' }}">
|
||||
<div class="col-xs-1 form-group {{ $errors->has('country_code') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
|
||||
{!! Form::label('country_code',Lang::get('lang.country-code')) !!} @if($send_otp->status ==1)<span class="text-red"> *</span>@endif
|
||||
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
|
||||
</div>
|
||||
@@ -133,7 +136,7 @@ class="active"
|
||||
</div>
|
||||
<!-- Mobile -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}@if($send_otp->status ==1)<span class="text-red"> *</span>@endif
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.departments')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -88,7 +88,7 @@ class="active"
|
||||
<!-- manager -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('manager') ? 'has-error' : '' }}">
|
||||
{!! Form::label('manager',Lang::get('lang.manager')) !!}
|
||||
{!!Form::select('manager',[''=>Lang::get('lang.select_a_manager'),Lang::get('lang.manager')=>$user->lists('user_name','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('manager',[''=>Lang::get('lang.select_a_manager'),Lang::get('lang.manager')=>$user->lists('full_name','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.departments')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -88,7 +88,7 @@ class="active"
|
||||
<!-- manager -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('manager') ? 'has-error' : '' }}">
|
||||
{!! Form::label('manager',Lang::get('lang.manager')) !!}
|
||||
{!!Form::select('manager',[null=>Lang::get('lang.select_a_manager'),Lang::get('lang.manager')=>$user->lists('user_name','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('manager',[null=>Lang::get('lang.select_a_manager'),Lang::get('lang.manager')=>$user->lists('full_name','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.departments')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -88,7 +88,7 @@ class="active"
|
||||
$manager = "";
|
||||
} else {
|
||||
$manager = App\User::whereId($department->manager)->first();
|
||||
$manager = $manager->user_name;
|
||||
$manager = $manager->full_name;
|
||||
}
|
||||
|
||||
if ($department->sla == null) {
|
||||
|
||||
@@ -16,7 +16,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.teams')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -61,8 +61,7 @@ class="active"
|
||||
<!-- team lead -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('team_lead') ? 'has-error' : '' }}">
|
||||
{!! Form::label('team_lead',Lang::get('lang.team_lead')) !!}
|
||||
<?php $user = App\User::where('role', 'admin')->orWhere('role', 'agent')->get(); ?>
|
||||
{!! Form::select('team_lead',[''=>Lang::get('lang.select_a_team_lead'), Lang::get('lang.members')=>$user->lists('user_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
{!! Form::select('team_lead',[''=>Lang::get('lang.select_a_team_lead'), Lang::get('lang.members')=>$user->lists('full_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- status -->
|
||||
|
||||
@@ -16,7 +16,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.teams')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -60,8 +60,7 @@ class="active"
|
||||
<!-- team lead -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('team_lead') ? 'has-error' : '' }}">
|
||||
{!! Form::label('team_lead',Lang::get('lang.team_lead')) !!}
|
||||
<?php $user = App\User::where('role', 'admin')->orWhere('role', 'agent')->get(); ?>
|
||||
{!! Form::select('team_lead',[''=>Lang::get('lang.select_a_team_lead'), Lang::get('lang.members')=>$user->lists('user_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
{!! Form::select('team_lead',[''=>Lang::get('lang.select_a_team_lead'), Lang::get('lang.members')=>$user->lists('full_name','id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- status -->
|
||||
|
||||
@@ -16,7 +16,7 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.staffs')}}</h1>
|
||||
<h1>{{Lang::get('lang.teams')}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@@ -60,7 +60,7 @@ class="active"
|
||||
</tr>
|
||||
@foreach($teams as $team)
|
||||
<tr>
|
||||
<td><a href="{{route('teams.edit', $team->id)}}"> {{$team->name }}</a></td>
|
||||
<td><a href="{{route('teams.show', $team->id)}}"> {{$team->name }}</a></td>
|
||||
<td>
|
||||
@if($team->status=='1')
|
||||
<span style="color:green">{{Lang::get('lang.active')}}</span>
|
||||
@@ -72,15 +72,26 @@ class="active"
|
||||
$team_lead = "";
|
||||
} else {
|
||||
$users = App\User::whereId($team->team_lead)->first();
|
||||
$team_lead = $users->first_name . " " . $users->last_name;
|
||||
$team_lead = $users->full_name;
|
||||
}
|
||||
?>
|
||||
<td>{{count($assign_team_agent->where('team_id',$team->id))}}</td>
|
||||
<td>{{ $team_lead }}</td>
|
||||
<td>
|
||||
{!! Form::open(['route'=>['teams.destroy', $team->id],'method'=>'DELETE']) !!}
|
||||
|
||||
<!-- To pop up a confirm Message -->
|
||||
@if ($team->status == 0)
|
||||
<a href="{{route('teams.show', $team->id)}}" class="btn btn-success btn-xs btn-flat" disabled='disabled'><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.show') !!}</a>
|
||||
|
||||
@endif
|
||||
@if ($team->status == 1)
|
||||
<a href="{{route('teams.show', $team->id)}}" class="btn btn-success btn-xs btn-flat" ><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.show') !!}</a>
|
||||
|
||||
@endif
|
||||
|
||||
<a href="{{route('teams.edit', $team->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.edit') !!}</a>
|
||||
|
||||
{!! 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',
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Staffs')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('staffs-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('teams')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{$teams->name}}</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-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<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>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
</div>
|
||||
@endif
|
||||
<!-- <input type="text" name="show_id" value="{{$id}}"> -->
|
||||
<?php
|
||||
if($team_lead_name= App\User::whereId($teams->team_lead)->first())
|
||||
{
|
||||
$team_lead = $team_lead_name->first_name . " " . $team_lead_name->last_name;
|
||||
// $assign_team_agent=App\Model\helpdesk\Agent\Assign_team_agent::all();
|
||||
// $total_members = $assign_team_agent->where('team_id',$id)->count();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
@if($team_lead_name)
|
||||
<span class="lead border-right">{!! Lang::get('lang.team_lead') !!} : {!! $team_lead !!} </span>
|
||||
@endif
|
||||
<span class="lead border-left">{!! Lang::get('lang.status') !!} : <?php if($teams->status == 1) { $stat = Lang::get('lang.active'); } elseif($teams->status == 0) { $stat = Lang::get('lang.inactive'); } ?>{!! $stat !!} </span>
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{URL::route('teams.index')}}" class="btn btn-primary"><i class="fa fa-arrow-left" aria-hidden="true"></i> {{Lang::get('lang.go_back')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="show_id" value={{$id}}>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
Lang::get('lang.user_name'),
|
||||
Lang::get('lang.name'),
|
||||
Lang::get('lang.status'),
|
||||
Lang::get('lang.group'),
|
||||
Lang::get('lang.depertment'),
|
||||
Lang::get('lang.role')
|
||||
)
|
||||
->setUrl(route('teams.getshow.list', $id)) // this is the route where data will be retrieved
|
||||
->render()
|
||||
!!}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
@@ -34,6 +34,7 @@ class="active"
|
||||
<h3 class="box-title">{!! Lang::get('lang.email_information_and_settings') !!}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="head"></div>
|
||||
<div id="alert" style="display:none;">
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
@@ -134,7 +135,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {!! $errors->has('fetching_encryption') ? 'has-error' : ''!!}" id="fetching_encryption_error">
|
||||
{!! Form::label('fetching_encryption',Lang::get('lang.encryption')) !!}
|
||||
{!! $errors->first('fetching_encryption', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('fetching_encryption',[''=>'-----Select-----', 'none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select', 'id' => 'fetching_encryption']) !!}
|
||||
{!!Form::select('fetching_encryption',[''=>'-----Select-----','ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select', 'id' => 'fetching_encryption']) !!}
|
||||
</div>
|
||||
<div class="col-xs-2 form-group {!! $errors->has('imap_authentication') ? 'has-error' : ''!!}" id="imap_authentication_error">
|
||||
{!! Form::label('fetching_authentication',Lang::get('lang.authentication')) !!}
|
||||
@@ -169,7 +170,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_protocol') ? 'has-error' : ''!!}" id="sending_protocol_error">
|
||||
{!! Form::label('sending_protocol',Lang::get('lang.transfer_protocol')) !!}
|
||||
{!! $errors->first('sending_protocol', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('sending_protocol',['smtp'=>'SMTP', 'mail' => 'PHP-MAIL'],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('sending_protocol',[''=>'Select','Drives'=>$services],null,['class' => 'form-control select','id'=>'service']) !!}
|
||||
</div>
|
||||
<!-- sending hoost -->
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_host') ? 'has-error' : ''!!}" id="sending_host_error">
|
||||
@@ -187,7 +188,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_encryption') ? 'has-error' : ''!!}" id="sending_encryption_error">
|
||||
{!! Form::label('sending_encryption',Lang::get('lang.encryption')) !!}
|
||||
{!! $errors->first('sending_encryption', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('sending_encryption',[''=>'-----Select-----', 'none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('sending_encryption',[''=>'-----Select-----','ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
<div class="col-xs-2 form-group {!! $errors->has('smtp_authentication') ? 'has-error' : ''!!}" id="smtp_authentication_error">
|
||||
{!! Form::label('sending_authentication',Lang::get('lang.authentication')) !!}
|
||||
@@ -198,6 +199,7 @@ class="active"
|
||||
<input type="checkbox" name="smtp_validate" id="smtp_validate"> {!! Lang::get('lang.validate_certificates_from_tls_or_ssl_server') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="response"></div>
|
||||
<!-- Internal notes -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
@@ -235,237 +237,70 @@ class="active"
|
||||
|
||||
<script type="text/javascript">
|
||||
//submit form
|
||||
$('#form').on('submit', function() {
|
||||
$('#form').on('submit', function () {
|
||||
var form_data = $(this).serialize();
|
||||
$("#spin").addClass("fa-spin");
|
||||
var email_address = document.getElementById('email_address').value;
|
||||
var email_name = document.getElementById('email_name').value;
|
||||
var department = document.getElementById('department').value;
|
||||
var priority = document.getElementById('priority').value;
|
||||
var help_topic = document.getElementById('help_topic').value;
|
||||
var password = document.getElementById('password').value;
|
||||
var fetching_status = $('input#fetching_status[type="checkbox"]:checked', this).val();
|
||||
var fetching_protocol = document.getElementById('fetching_protocol').value;
|
||||
var fetching_host = document.getElementById('fetching_host').value;
|
||||
var fetching_port = document.getElementById('fetching_port').value;
|
||||
var fetching_encryption = document.getElementById('fetching_encryption').value;
|
||||
var sending_status = $('input#sending_status[type="checkbox"]:checked', this).val();
|
||||
var sending_protocol = document.getElementById('sending_protocol').value;
|
||||
var sending_host = document.getElementById('sending_host').value;
|
||||
var sending_port = document.getElementById('sending_port').value;
|
||||
var sending_encryption = document.getElementById('sending_encryption').value;
|
||||
|
||||
var filter_number = /^([0-9])/;
|
||||
var error_list = [];
|
||||
var error = "";
|
||||
// checking for validation of email
|
||||
if (email_address) {
|
||||
var filter_email = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
if (!filter_email.test(email_address)) {
|
||||
var error = "Please provide a valid email address";
|
||||
error_list.push(error);
|
||||
$("#email_address_error").addClass("has-error");
|
||||
}
|
||||
} else if (email_address == "") {
|
||||
var error = "Email Address is a required field";
|
||||
error_list.push(error);
|
||||
$("#email_address_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of email name
|
||||
if (email_name == "") {
|
||||
var error = "Email Name is a required field";
|
||||
error_list.push(error);
|
||||
$("#email_name_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of department
|
||||
if (department == "") {
|
||||
} else if (department) {
|
||||
if (!filter_number.test(department)) {
|
||||
var error = "Please provide a valid department";
|
||||
error_list.push(error);
|
||||
$("#department_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of priority
|
||||
if (priority == "") {
|
||||
} else if (priority) {
|
||||
if (!filter_number.test(priority)) {
|
||||
var error = "Please provide a valid priority";
|
||||
error_list.push(error);
|
||||
$("#priority_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of help topic
|
||||
if (help_topic == "") {
|
||||
} else if (priority) {
|
||||
if (!filter_number.test(priority)) {
|
||||
var error = "Please provide a valid priority";
|
||||
error_list.push(error);
|
||||
$("#priority_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of password
|
||||
if (password == "") {
|
||||
var error = "Password is a required field";
|
||||
error_list.push(error);
|
||||
$("#password_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of fetching host
|
||||
if (fetching_status == 'on') {
|
||||
if (fetching_host == "") {
|
||||
var error = "Fetching Host is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_host_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_host_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of fetching port
|
||||
if (fetching_port == "") {
|
||||
var error = "Fetching Port is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_port_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_port_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of mailbox protocol
|
||||
if (fetching_encryption == "") {
|
||||
var error = "Fetching Encryption is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_encryption_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_encryption_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of mailbox protocol
|
||||
if (fetching_protocol == "") {
|
||||
var error = "Fetching Protocol is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_protocol_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_protocol_error").removeClass("has-error");
|
||||
}
|
||||
|
||||
} else {
|
||||
// checking for validation of fetching port
|
||||
if (fetching_port) {
|
||||
if (!filter_number.test(fetching_port)) {
|
||||
var error = "The Fetching Port Number must be an integer";
|
||||
error_list.push(error);
|
||||
$("#fetching_port_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
}
|
||||
// checking for validation of sending status
|
||||
if (sending_status == 'on') {
|
||||
if (sending_protocol == 'smtp') {
|
||||
// checking for validation of sending host
|
||||
if (sending_host == "") {
|
||||
var error = "Sending Host is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_host_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending port
|
||||
if (sending_port == "") {
|
||||
var error = "Sending Port is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_port_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending encryption
|
||||
if (sending_encryption == "") {
|
||||
var error = "Sending Encryption is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_encryption_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending protocol
|
||||
if (sending_protocol == "") {
|
||||
var error = "Transfer Protocol is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_protocol_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
} else if(sending_protocol == 'mail') {
|
||||
$("#sending_host_error").val('');
|
||||
$("#sending_port_error").val('');
|
||||
$("#sending_encryption_error").val('');
|
||||
$("#sending_protocol_error").val('');
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
} else {
|
||||
// checking for validation of fetching port
|
||||
if (sending_port) {
|
||||
if (!filter_number.test(sending_port)) {
|
||||
var error = "The Sending Port Number must be an integer";
|
||||
error_list.push(error);
|
||||
$("#sending_port_error").addClass("has-error");
|
||||
}
|
||||
} else {
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
}
|
||||
// executing error chatch
|
||||
if (error) {
|
||||
var ssss = "";
|
||||
$.each(error_list, function(key, value) {
|
||||
ssss += "<li class='error-message-padding'>" + value + "</li>";
|
||||
});
|
||||
if (ssss) {
|
||||
var error_result = "<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><div id='alert-message'>" + ssss + "</div></div>";
|
||||
$('#alert').empty();
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
$("#spin").removeClass("fa-spin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Ajax communicating to backend for further Checking/Saving the details
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{!! route('validating.email.settings') !!}",
|
||||
dataType: "html",
|
||||
dataType: "json",
|
||||
data: form_data,
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
$('#alert').empty();
|
||||
$("#click").trigger("click");
|
||||
},
|
||||
success: function(response) {
|
||||
if (response == 1) {
|
||||
$("#close").trigger("click");
|
||||
var error_result = "<div class='alert alert-success alert-dismissable'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button><div id='alert-message'>Your details saved successfully</div></div>";
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
} else {
|
||||
$("#close").trigger("click");
|
||||
var error_result = "<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><div id='alert-message'>" + response + "</div></div>";
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
}
|
||||
},
|
||||
error: function(response) {
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
$("#close").trigger("click");
|
||||
var errorsHtml = "<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><div id='alert-message'>Unable to process the details </div></div>";
|
||||
$('#alert').empty();
|
||||
$('#alert').html(errorsHtml);
|
||||
$('#alert').show();
|
||||
return false;
|
||||
var res = "";
|
||||
$.each(json.result, function (idx, topic) {
|
||||
if (idx === "success") {
|
||||
res = "<div class='alert alert-success'>" + topic + "</div>";
|
||||
}
|
||||
if (idx === "fails") {
|
||||
res = "<div class='alert alert-danger'>" + topic + "</div>";
|
||||
}
|
||||
});
|
||||
|
||||
$("#head").html(res);
|
||||
$('html, body').animate({scrollTop: $("#form").offset().top}, 500);
|
||||
},
|
||||
error: function (json) {
|
||||
console.log(json);
|
||||
$("#close").trigger("click");
|
||||
var res = "";
|
||||
$.each(json.responseJSON, function (idx, topic) {
|
||||
res += "<li>" + topic + "</li>";
|
||||
});
|
||||
$("#head").html("<div class='alert alert-danger'><strong>Whoops!</strong> There were some problems with your input.<br><br><ul>" + res + "</ul></div>");
|
||||
$('html, body').animate({scrollTop: $("#form").offset().top}, 500);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var serviceid = $("#service").val();
|
||||
send(serviceid);
|
||||
$("#service").on('change', function () {
|
||||
serviceid = $("#service").val();
|
||||
send(serviceid);
|
||||
});
|
||||
function send(serviceid) {
|
||||
$.ajax({
|
||||
url: "{{url('mail/config/service')}}",
|
||||
dataType: "html",
|
||||
data: {'service': serviceid},
|
||||
success: function (response) {
|
||||
$("#response").html(response);
|
||||
},
|
||||
error: function (response) {
|
||||
$("#response").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -35,6 +35,7 @@ class="active"
|
||||
<h3 class="box-title">{!! Lang::get('lang.email_information_and_settings') !!}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="head"></div>
|
||||
<div id="alert" style="display:none;">
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
@@ -60,7 +61,7 @@ class="active"
|
||||
<div class="col-xs-4 form-group {!! $errors->has('password') ? 'has-error' : ''!!}" id="password_error">
|
||||
{!! Form::label('password',Lang::get('lang.password')) !!} <span class="text-red"> *</span>
|
||||
{!! $errors->first('password', '<spam class="help-block">:message</spam>') !!}
|
||||
<input type="password" name="password" class="form-control" id="password" value={!! Crypt::decrypt($emails->password) !!} >
|
||||
<input type="password" name="password" class="form-control" id="password" value={!! $emails->password !!} >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,23 +145,19 @@ class="active"
|
||||
{!! $errors->first('fetching_encryption', '<spam class="help-block">:message</spam>') !!}
|
||||
<select name="fetching_encryption" class='form-control' id='fetching_encryption'>
|
||||
<option value=""> -----Select----- </option>
|
||||
|
||||
<option <?php
|
||||
if ($emails->fetching_encryption == 'none') {
|
||||
echo 'selected="selected"';
|
||||
}
|
||||
?> value="none">None</option>
|
||||
<option <?php
|
||||
if ($emails->fetching_encryption == '/ssl/novalidate-cert' || $emails->fetching_encryption === '/ssl/validate-cert') {
|
||||
if ($emails->fetching_encryption == 'ssl' || $emails->fetching_encryption === 'ssl') {
|
||||
echo 'selected="selected"';
|
||||
}
|
||||
?> value="ssl">SSL</option>
|
||||
<option <?php
|
||||
if ($emails->fetching_encryption == '/tls/novalidate-cert' || $emails->fetching_encryption === '/tls/validate-cert') {
|
||||
if ($emails->fetching_encryption == 'tls' || $emails->fetching_encryption === 'tls') {
|
||||
echo 'selected="selected"';
|
||||
}
|
||||
?> value="tls">TLS</option>
|
||||
<option <?php
|
||||
if ($emails->fetching_encryption == '/starttls/novalidate-cert' || $emails->fetching_encryption === '/starttls/validate-cert') {
|
||||
if ($emails->fetching_encryption == 'starttls' || $emails->fetching_encryption === 'starttls') {
|
||||
echo 'selected="selected"';
|
||||
}
|
||||
?> value="starttls">STARTTLS</option>
|
||||
@@ -203,7 +200,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_protocol') ? 'has-error' : ''!!}" id="sending_protocol_error">
|
||||
{!! Form::label('sending_protocol',Lang::get('lang.transfer_protocol')) !!}
|
||||
{!! $errors->first('sending_protocol', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('sending_protocol',['smtp'=>'SMTP', 'mail' => 'PHP-MAIL'],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('sending_protocol',[''=>'Select','Drives'=>$services],$emails->getCurrentDrive(),['class' => 'form-control select','id'=>'service']) !!}
|
||||
</div>
|
||||
<!-- sending hoost -->
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_host') ? 'has-error' : ''!!}" id="sending_host_error">
|
||||
@@ -221,7 +218,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {!! $errors->has('sending_encryption') ? 'has-error' : ''!!}" id="sending_encryption_error">
|
||||
{!! Form::label('sending_encryption',Lang::get('lang.encryption')) !!}
|
||||
{!! $errors->first('sending_encryption', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('sending_encryption',[''=>'-----Select-----', 'none' => 'None', 'ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select']) !!}
|
||||
{!!Form::select('sending_encryption',[''=>'-----Select-----','ssl' => 'SSL', 'tls' => 'TLS', 'starttls' => 'STARTTLS'],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
<div class="col-xs-2 form-group {!! $errors->has('smtp_authentication') ? 'has-error' : ''!!}" id="smtp_authentication_error">
|
||||
{!! Form::label('sending_authentication',Lang::get('lang.authentication')) !!}
|
||||
@@ -232,6 +229,7 @@ class="active"
|
||||
<input type="checkbox" name="smtp_validate" id="smtp_validate"> {!! Lang::get('lang.validate_certificates_from_tls_or_ssl_server') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div id="response"></div>
|
||||
<!-- Internal notes -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
@@ -268,241 +266,71 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<button style="display:none" data-toggle="modal" data-target="#loadingpopup" id="click"></button>
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
//submit form
|
||||
$('#form').on('submit', function() {
|
||||
$('#form').on('submit', function () {
|
||||
var form_data = $(this).serialize();
|
||||
$("#spin").addClass("fa-spin");
|
||||
var email_address = document.getElementById('email_address').value;
|
||||
var email_name = document.getElementById('email_name').value;
|
||||
var department = document.getElementById('department').value;
|
||||
var priority = document.getElementById('priority').value;
|
||||
var help_topic = document.getElementById('help_topic').value;
|
||||
var password = document.getElementById('password').value;
|
||||
var fetching_status = $('input#fetching_status[type="checkbox"]:checked', this).val();
|
||||
var fetching_protocol = document.getElementById('fetching_protocol').value;
|
||||
var fetching_host = document.getElementById('fetching_host').value;
|
||||
var fetching_port = document.getElementById('fetching_port').value;
|
||||
var fetching_encryption = document.getElementById('fetching_encryption').value;
|
||||
var sending_status = $('input#sending_status[type="checkbox"]:checked', this).val();
|
||||
var sending_protocol = document.getElementById('sending_protocol').value;
|
||||
var sending_host = document.getElementById('sending_host').value;
|
||||
var sending_port = document.getElementById('sending_port').value;
|
||||
var sending_encryption = document.getElementById('sending_encryption').value;
|
||||
|
||||
var filter_number = /^([0-9])/;
|
||||
var error_list = [];
|
||||
var error = "";
|
||||
// checking for validation of email
|
||||
if (email_address) {
|
||||
var filter_email = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
if (!filter_email.test(email_address)) {
|
||||
var error = "Please provide a valid email address";
|
||||
error_list.push(error);
|
||||
$("#email_address_error").addClass("has-error");
|
||||
}
|
||||
} else if (email_address == "") {
|
||||
var error = "Email Address is a required field";
|
||||
error_list.push(error);
|
||||
$("#email_address_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of email name
|
||||
if (email_name == "") {
|
||||
var error = "Email Name is a required field";
|
||||
error_list.push(error);
|
||||
$("#email_name_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of department
|
||||
if (department == "") {
|
||||
} else if (department) {
|
||||
if (!filter_number.test(department)) {
|
||||
var error = "Please provide a valid department";
|
||||
error_list.push(error);
|
||||
$("#department_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of priority
|
||||
if (priority == "") {
|
||||
} else if (priority) {
|
||||
if (!filter_number.test(priority)) {
|
||||
var error = "Please provide a valid priority";
|
||||
error_list.push(error);
|
||||
$("#priority_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of help topic
|
||||
if (help_topic == "") {
|
||||
} else if (priority) {
|
||||
if (!filter_number.test(priority)) {
|
||||
var error = "Please provide a valid priority";
|
||||
error_list.push(error);
|
||||
$("#priority_error").addClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of password
|
||||
if (password == "") {
|
||||
var error = "Password is a required field";
|
||||
error_list.push(error);
|
||||
$("#password_error").addClass("has-error");
|
||||
}
|
||||
// checking for validation of fetching host
|
||||
if (fetching_status == 'on') {
|
||||
if (fetching_host == "") {
|
||||
var error = "Fetching Host is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_host_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_host_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of fetching port
|
||||
if (fetching_port == "") {
|
||||
var error = "Fetching Port is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_port_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_port_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of mailbox protocol
|
||||
if (fetching_encryption == "") {
|
||||
var error = "Fetching Encryption is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_encryption_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_encryption_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of mailbox protocol
|
||||
if (fetching_protocol == "") {
|
||||
var error = "Fetching Protocol is a required field";
|
||||
error_list.push(error);
|
||||
$("#fetching_protocol_error").addClass("has-error");
|
||||
} else {
|
||||
$("#fetching_protocol_error").removeClass("has-error");
|
||||
}
|
||||
} else {
|
||||
// checking for validation of fetching port
|
||||
if (fetching_port) {
|
||||
if (!filter_number.test(fetching_port)) {
|
||||
var error = "The Fetching Port Number must be an integer";
|
||||
error_list.push(error);
|
||||
$("#fetching_port_error").addClass("has-error");
|
||||
}
|
||||
} else {
|
||||
$("#fetching_port_error").removeClass("has-error");
|
||||
}
|
||||
}
|
||||
// checking for validation of sending status
|
||||
// checking for validation of sending status
|
||||
if (sending_status == 'on') {
|
||||
if (sending_protocol == 'smtp') {
|
||||
// checking for validation of sending host
|
||||
if (sending_host == "") {
|
||||
var error = "Sending Host is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_host_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending port
|
||||
if (sending_port == "") {
|
||||
var error = "Sending Port is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_port_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending encryption
|
||||
if (sending_encryption == "") {
|
||||
var error = "Sending Encryption is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_encryption_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
}
|
||||
// checking for validation of sending protocol
|
||||
if (sending_protocol == "") {
|
||||
var error = "Transfer Protocol is a required field";
|
||||
error_list.push(error);
|
||||
$("#sending_protocol_error").addClass("has-error");
|
||||
} else {
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
} else if(sending_protocol == 'mail') {
|
||||
$("#sending_host_error").val('');
|
||||
$("#sending_port_error").val('');
|
||||
$("#sending_encryption_error").val('');
|
||||
$("#sending_protocol_error").val('');
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
} else {
|
||||
// checking for validation of fetching port
|
||||
if (sending_port) {
|
||||
if (!filter_number.test(sending_port)) {
|
||||
var error = "The Sending Port Number must be an integer";
|
||||
error_list.push(error);
|
||||
$("#sending_port_error").addClass("has-error");
|
||||
}
|
||||
} else {
|
||||
$("#sending_host_error").removeClass("has-error");
|
||||
$("#sending_port_error").removeClass("has-error");
|
||||
$("#sending_encryption_error").removeClass("has-error");
|
||||
$("#sending_protocol_error").removeClass("has-error");
|
||||
}
|
||||
}
|
||||
// executing error chatch
|
||||
if (error) {
|
||||
var ssss = "";
|
||||
$.each(error_list, function(key, value) {
|
||||
ssss += "<li class='error-message-padding'>" + value + "</li>";
|
||||
});
|
||||
if (ssss) {
|
||||
var error_result = "<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><div id='alert-message'>" + ssss + "</div></div>";
|
||||
$('#alert').empty();
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
$("#spin").removeClass("fa-spin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Ajax communicating to backend for further Checking/Saving the details
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{!! route('validating.email.settings.update', $emails->id ) !!}",
|
||||
dataType: "html",
|
||||
dataType: "json",
|
||||
data: form_data,
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
},
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
$('#alert').empty();
|
||||
$("#click").trigger("click");
|
||||
},
|
||||
success: function(response) {
|
||||
if (response == 1) {
|
||||
$("#close").trigger("click");
|
||||
var error_result = "<div class='alert alert-success alert-dismissable'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button><div id='alert-message'>Your details saved successfully</div></div>";
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
} else {
|
||||
$("#close").trigger("click");
|
||||
var error_result = "<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><div id='alert-message'>" + response + "</div></div>";
|
||||
$('#alert').html(error_result);
|
||||
$('#alert').show();
|
||||
}
|
||||
success: function (json) {
|
||||
console.log(json.result);
|
||||
$("#close").trigger("click");
|
||||
var res = "";
|
||||
$.each(json.result, function (idx, topic) {
|
||||
if (idx === "success") {
|
||||
res = "<div class='alert alert-success'>" + topic + "</div>";
|
||||
}
|
||||
if (idx === "fails") {
|
||||
res = "<div class='alert alert-danger'>" + topic + "</div>";
|
||||
}
|
||||
});
|
||||
|
||||
$("#head").html(res);
|
||||
$('html, body').animate({scrollTop: $("#form").offset().top}, 500);
|
||||
},
|
||||
error: function (json) {
|
||||
$("#close").trigger("click");
|
||||
var res = "";
|
||||
$.each(json.responseJSON, function (idx, topic) {
|
||||
res += "<li>" + topic + "</li>";
|
||||
});
|
||||
$("#head").html("<div class='alert alert-danger'><strong>Whoops!</strong> There were some problems with your input.<br><br><ul>" + res + "</ul></div>");
|
||||
$('html, body').animate({scrollTop: $("#form").offset().top}, 500);
|
||||
}
|
||||
// ,
|
||||
// error: function (response) {
|
||||
// $("#close").trigger("click");
|
||||
// var errorsHtml = "<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><div id='alert-message'>Unable to process the details </div></div>";
|
||||
// $('#alert').empty();
|
||||
// $('#alert').html(errorsHtml);
|
||||
// $('#alert').show();
|
||||
// return false;
|
||||
// }
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var serviceid = $("#service").val();
|
||||
send(serviceid);
|
||||
$("#service").on('change', function () {
|
||||
serviceid = $("#service").val();
|
||||
send(serviceid);
|
||||
});
|
||||
function send(serviceid) {
|
||||
$.ajax({
|
||||
url: "{{url('mail/config/service')}}",
|
||||
dataType: "html",
|
||||
data: {'service': serviceid,'emailid':{{$emails->id}}},
|
||||
success: function (response) {
|
||||
$("#response").html(response);
|
||||
},
|
||||
error: function (response) {
|
||||
$("#response").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('form')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{$form->formname}}</h1>
|
||||
@stop
|
||||
@section('content')
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
@foreach($fields as $field)
|
||||
<?php
|
||||
$form = App\Http\Controllers\Admin\helpdesk\FormController::getForm($field);
|
||||
?>
|
||||
<div class="col-md-10">
|
||||
{!! $form !!}
|
||||
</div>
|
||||
@if($field->values()->get()->count()>0)
|
||||
<div class="col-md-2">
|
||||
@include('themes.default1.admin.helpdesk.manage.form.childpopup')
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@@ -0,0 +1,34 @@
|
||||
<a href="#child" data-toggle="modal" class="btn btn-primary" data-target="#child{{$field->id}}">Add Child</a>
|
||||
<div class="modal fade" id="child{{$field->id}}">
|
||||
<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"></h4>
|
||||
{!! Form::model($field,['url'=>'forms/field/'.$field->id.'/child','method'=>'POST']) !!}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- Form -->
|
||||
<div class="row">
|
||||
@forelse($field->values()->get() as $value)
|
||||
<div class="col-md-12">
|
||||
<b>{{$value->field_value}}</b>
|
||||
{!! Form::select($value->id,[''=>'Select','Forms'=>$select_forms],$value->childId(),['class'=>'form-control']) !!}
|
||||
</div>
|
||||
@empty
|
||||
<div class="col-md-12">
|
||||
<p>No values</p>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
|
||||
<input type="submit" class="btn btn-primary" value="{{Lang::get('lang.save')}}">
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /Form -->
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
@@ -32,9 +32,11 @@ class="active"
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\FormController@store','method' => 'post']) !!}
|
||||
<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">
|
||||
|
||||
@@ -8,7 +8,7 @@ active
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('form')
|
||||
@section('forms')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@@ -16,91 +16,148 @@ 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')
|
||||
<!-- 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>
|
||||
|
||||
<!-- /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 class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.edit') !!}</h3>
|
||||
</div>
|
||||
<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 (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</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-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
{!! Form::model($form,['route'=>['forms.update',$form->id],'method'=>'PATCH']) !!}
|
||||
<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">
|
||||
{!! Form::text('formname',null,['class'=>'form-control']) !!}
|
||||
<!--<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">
|
||||
<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">
|
||||
|
||||
@forelse($fields as $key=>$field)
|
||||
|
||||
<tr>
|
||||
<td><input type="text" name="label[]" value="{{$field->label}}" class="form-control"></td>
|
||||
<td><input type="text" name="name[]" value="{{$field->name}}" class="form-control"></td>
|
||||
|
||||
<td>{!! Form::select('type[]',['text'=>'text','email'=>'email','password'=>'password','textarea'=>'textarea','select'=>'select','radio'=>'radio','checkbox'=>'checkbox','hidden'=>'hidden'],$field->type,['class'=>'form-control']) !!}</td>
|
||||
<td><input type="text" name="value[]" value="{{$field->valuesAsString()}}" class="form-control"></td>
|
||||
|
||||
<td>{!! Lang::get("lang.yes") !!} {!! Form::radio('required['.$key.']',1,true) !!} {!! Lang::get("lang.no") !!} {!! Form::radio('required['.$key.']',0,$field->nonRequiredFieldForCheck()) !!}</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>
|
||||
@empty
|
||||
|
||||
@endforelse
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" class="btn btn-primary" value="{!! Lang::get('lang.save_form') !!}">
|
||||
</div>
|
||||
</div>
|
||||
</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>\n\
|
||||
<td><input type="text" class="form-control" name="label[]"></td>\n\
|
||||
<td><input type="text" class="form-control" name="name[]"></td>\n\
|
||||
<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>hidden</option></select>\n\
|
||||
</td><td><input type="text" name="value[]" class="form-control"></td>\n\
|
||||
<td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[]" value=0></td>\n\
|
||||
<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--;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
|
||||
@@ -36,20 +36,33 @@ class="active"
|
||||
<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 (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</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')}}
|
||||
{{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>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
@@ -77,7 +90,7 @@ class="active"
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="box-body" id="welcomeDiv" style="display:none;">
|
||||
<div class="box-body" id="welcomeDiv">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>{!! Lang::get('lang.label') !!} </th>
|
||||
@@ -88,7 +101,27 @@ class="active"
|
||||
<th>{!! Lang::get('lang.action') !!} </th>
|
||||
</thead>
|
||||
<tbody class="inputField">
|
||||
<tr></tr>
|
||||
|
||||
<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>hidden</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="value[]" class="form-control"></td>
|
||||
<td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[0]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[0]" 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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -106,13 +139,13 @@ class="active"
|
||||
var max_fields = 10;
|
||||
var wrapper = $(".inputField");
|
||||
var add_button = $(".addField");
|
||||
var x = 1;
|
||||
var x = 0;
|
||||
$(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></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).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>hidden</option></select></td><td><input type="text" name="value[]" class="form-control"></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)
|
||||
|
||||
@@ -57,8 +57,19 @@ class="active"
|
||||
@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>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.edit', Lang::get('lang.edit') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.show', Lang::get('lang.view_this_form') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.add.child', 'Add Child' ,[$form->id],['id'=>'add-child','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$form->id}}delete">{!! Lang::get('lang.delete_from') !!}</button>
|
||||
</div>
|
||||
<div class="modal fade" id="{{$form->id}}delete">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -43,44 +43,40 @@ class="active"
|
||||
<!-- -->
|
||||
<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>
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_name') !!} : {!! $form->formname !!}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@foreach($fields as $field)
|
||||
<?php
|
||||
$i = $id->id;
|
||||
$form_datas = App\Model\helpdesk\Form\Fields::where('forms_id', '=', $i)->get();
|
||||
// dd($form_datas);
|
||||
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 . '"> ' . $val . ' ';
|
||||
}
|
||||
} elseif ($form_data->type == "textarea") {
|
||||
$type3 = $form_data->value;
|
||||
echo '<label>' . $form_data->label . '</label></br><textarea name="'.$form_data->name.'" class="form-control" style="height:15%;"></textarea>';
|
||||
} elseif ($form_data->type == "checkbox") {
|
||||
$type4 = $form_data->value;
|
||||
$checks = explode(',', $type4);
|
||||
echo '<br/><br/><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 . '" />';
|
||||
$form = App\Http\Controllers\Admin\helpdesk\FormController::getForm($field);
|
||||
?>
|
||||
|
||||
{!! $form !!}
|
||||
|
||||
<!-- <script>
|
||||
$("[name='{{$field->name}}']").on('change', function () {
|
||||
var valueid = $("[name='{{$field->name}}']").val();
|
||||
alert(valueid);
|
||||
send(valueid);
|
||||
});
|
||||
function send(valueid) {
|
||||
$.ajax({
|
||||
url: "{{url('forms/render/child/'.$field->id)}}",
|
||||
dataType: "html",
|
||||
data: {'valueid': valueid},
|
||||
success: function (response) {
|
||||
$("#{{$field->name}}").html(response);
|
||||
},
|
||||
error: function (response) {
|
||||
$("#{{$field->name}}").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
?>
|
||||
</script>-->
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
|
||||
<form action="{!!URL::route('priority.create1')!!}" method="post" role="form">
|
||||
<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('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_desc'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_desc', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_color'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_color', ':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('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!} <span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_desc') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_desc',Lang::get('lang.priority_desc')) !!}<span class="text-red"> *</span>
|
||||
<input type="text" name="priority_desc" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Priority Color -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_color') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_color',Lang::get('lang.priority_color')) !!}<span class="text-red"> *</span>
|
||||
<input class="form-control my-colorpicker1 colorpicker-element" id="colorpicker" type="text" name="priority_color">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="status" value="1" checked>{{Lang::get('lang.active')}}
|
||||
<input type="radio" name="status" value="0" >{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Show radio: required: public|private -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('ispublic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('ispublic',Lang::get('lang.visibility')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="ispublic" value="1" checked>public
|
||||
<input type="radio" name="ispublic" value="0" >private
|
||||
</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 class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$("#colorpicker").colorpicker();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- close form -->
|
||||
{!! Form::close() !!}
|
||||
@stop
|
||||
@@ -0,0 +1,133 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
<form action="{!!URL::route('priority.edit1')!!}" method="post" role="form">
|
||||
<input type="hidden" name="priority_id" value="{{$tk_priority->priority_id}}">
|
||||
<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('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_desc'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_desc', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_color'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_color', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('ispublic'))
|
||||
<li class="error-message-padding">{!! $errors->first('ispublic', ':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('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!}<span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority" value="{{ ($tk_priority->priority) }}" >
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_desc') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_desc',Lang::get('lang.priority_desc')) !!} <span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority_desc" value="{{ ($tk_priority->priority_desc) }}">
|
||||
</div>
|
||||
</div></div>
|
||||
<!-- Priority Color -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_color') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_color',Lang::get('lang.priority_color')) !!}<span class="text-red"> *</span>
|
||||
<input class="form-control my-colorpicker1 colorpicker-element" id="colorpicker" value="{{ ($tk_priority->priority_color) }}" type="text" name="priority_color">
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}<span class="text-red"> *</span>
|
||||
<input type="radio" name="status" value="1" {{$tk_priority->status == '1' ? 'checked' : ''}}>{{Lang::get('lang.active')}}
|
||||
<input type="radio" name="status" value="0" {{$tk_priority->status == '0' ? 'checked' : ''}}>{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Show radio: required: public|private -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('ispublic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="ispublic" value="1" {{$tk_priority->ispublic == '1' ? 'checked' : ''}} > {{Lang::get('lang.public')}}
|
||||
<input type="radio" name="ispublic" value="0" {{$tk_priority->ispublic == '0' ? 'checked' : ''}}>{{Lang::get('lang.private')}}
|
||||
</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="default_priority" @if($tk_priority->is_default == $tk_priority->priority_id) checked disabled @endif> {{ Lang::get('lang.make-default-priority')}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
</div>
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- close form -->
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$("#colorpicker").colorpicker();
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,126 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.ticket_priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
@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>
|
||||
@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>
|
||||
@endif
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<span class="lead border-right">{!! Lang::get('lang.priority') !!}</span>
|
||||
<div class="pull-right">
|
||||
<a href="{{route('priority.create')}}" class="btn btn-primary">{{Lang::get('lang.create_ticket_priority')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-header with-border">
|
||||
<span class="lead border-right">{!! Lang::get('lang.user_priority_status') !!}</span>
|
||||
|
||||
|
||||
<div class="btn-group pull-right" id="toggle_event_editing">
|
||||
<button type="button" class="btn {{$user_status->status == '0' ? 'btn-info' : 'btn-default'}} locked_active">Inactive</button>
|
||||
<button type="button" class="btn {{$user_status->status == '1' ? 'btn-info' : 'btn-default'}} unlocked_inactive">Active</button>
|
||||
</div>
|
||||
<!-- <div class="alert alert-info" id="switch_status"></div> -->
|
||||
|
||||
<!-- <a href="{{route('priority.create')}}" class="btn btn-primary">{{Lang::get('lang.create_ticket_priority')}}</a> -->
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.priority_desc'),
|
||||
Lang::get('lang.priority_color'),
|
||||
Lang::get('lang.status'),
|
||||
Lang::get('lang.action'))
|
||||
->setUrl(route('priority.index1')) // this is the route where data will be retrieved
|
||||
->render() !!}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function confirmDelete(priority_id) {
|
||||
var r = confirm('Are you sure?');
|
||||
if (r == true) {
|
||||
// alert('{!! url("ticket_priority") !!}/' + priority_id + '/destroy');
|
||||
window.location = '{!! url("ticket_priority") !!}/' + priority_id + '/destroy';
|
||||
// $url('ticket_priority/' . $model->priority_id . '/destroy')
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#toggle_event_editing button').click(function () {
|
||||
|
||||
var user_settings_priority=1;
|
||||
var user_settings_priority=0;
|
||||
if ($(this).hasClass('locked_active') ) {
|
||||
|
||||
|
||||
user_settings_priority = 0
|
||||
} if ( $(this).hasClass('unlocked_inactive')) {
|
||||
|
||||
user_settings_priority = 1;
|
||||
}
|
||||
|
||||
/* reverse locking status */
|
||||
$('#toggle_event_editing button').eq(0).toggleClass('locked_inactive locked_active btn-default btn-info');
|
||||
$('#toggle_event_editing button').eq(1).toggleClass('unlocked_inactive unlocked_active btn-info btn-default');
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '{{route("user.priority.index")}}',
|
||||
data: {user_settings_priority: user_settings_priority},
|
||||
success: function (result) {
|
||||
// with('success', Lang::get('lang.approval_settings-created-successfully'));
|
||||
// alert("Hi, testing");
|
||||
alert(result);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -136,7 +136,6 @@ class="active"
|
||||
<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="email_to">{!! Lang::get('lang.email_to') !!}</option>
|
||||
<option value="subject">{!! Lang::get('lang.subject') !!}</option>
|
||||
<option value="message">{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
||||
</select>
|
||||
|
||||
@@ -179,11 +179,6 @@ class="active"
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email_name') !!}</option>
|
||||
<option value="email_to" <?php
|
||||
if ($workflow_rule->matching_scenario == 'email_to') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email_to') !!}</option>
|
||||
<option value="subject" <?php
|
||||
if ($workflow_rule->matching_scenario == 'subject') {
|
||||
echo "selected='selected'";
|
||||
|
||||
@@ -70,11 +70,6 @@ class="active"
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<script>
|
||||
function confirm_delete() {
|
||||
return confirm('are you sure?');
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
$('#example2').DataTable({
|
||||
@@ -86,6 +81,5 @@ class="active"
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Emails')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('email-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('queue')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{$queue->name}}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</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-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
{!! Lang::get('lang.queues') !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{!! Form::open(['url'=>'queue/'.$queue->id,'method'=>'post','id'=>'form']) !!}
|
||||
<div id="response">
|
||||
|
||||
</div>
|
||||
{!! Form::submit('save',['class'=>'btn btn-primary']) !!}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
var queueid = '{{$queue->id}}';
|
||||
$.ajax({
|
||||
url: "{{url('form/queue')}}",
|
||||
dataType: "html",
|
||||
data: {'queueid': queueid},
|
||||
success: function (response) {
|
||||
$("#response").html(response);
|
||||
},
|
||||
error: function (response) {
|
||||
$("#response").html(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,79 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('forms')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.queue')}}</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-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">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
{!! Lang::get('lang.queues') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{!! Lang::get('lang.name') !!}</th>
|
||||
<th>{!! Lang::get('lang.status') !!}</th>
|
||||
<th>{!! Lang::get('lang.action') !!}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($queues as $queue)
|
||||
<tr>
|
||||
<td>{!! $queue->getName() !!}</td>
|
||||
<td>{!! $queue->getStatus() !!}</td>
|
||||
<td>{!! $queue->getAction() !!}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td>No Records</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@@ -155,6 +155,18 @@
|
||||
<p class="box-title" >{!! Lang::get('lang.email-settings') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
<div class="settingdivblue">
|
||||
<a href="{{url('queue')}}">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-upload fa-stack-1x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="box-title" >{!! Lang::get('lang.queues') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--col-md-2-->
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
@@ -240,8 +252,35 @@
|
||||
<p class="box-title" >{!! Lang::get('lang.workflow') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- priority -->
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
<div class="settingdivblue">
|
||||
<a href="{{url('ticket_priority')}}">
|
||||
<span class="fa-stack fa-2x">
|
||||
|
||||
<i class="fa fa-asterisk fa-stack-1x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="box-title" >{!! Lang::get('lang.priority') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--/.col-md-2-->
|
||||
<!--/.col-md-2-->
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
<div class="settingdivblue">
|
||||
<a href="{{url('url/settings')}}">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-server fa-stack-1x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="box-title" >Url</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--/.col-md-2-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
@@ -508,6 +547,19 @@
|
||||
<p class="box-title" >{!! Lang::get('lang.social') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
<div class="settingdivblue">
|
||||
<a href="{{ url('social/media') }}">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-medium fa-stack-1x"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="box-title" >Social media integration</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--/.col-md-2-->
|
||||
</div>
|
||||
</div>
|
||||
@@ -573,6 +625,34 @@
|
||||
</div>
|
||||
<!-- ./box-body -->
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Logs</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!--/.col-md-2-->
|
||||
<div class="col-md-2 col-sm-6">
|
||||
<div class="settingiconblue">
|
||||
<div class="settingdivblue">
|
||||
<a href="{{ url('logs') }}">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-lock"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="box-title" >Logs</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--/.col-md-2-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- ./box-body -->
|
||||
</div>
|
||||
<?php \Event::fire('service.desk.admin.settings', array()); ?>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
@@ -0,0 +1,108 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('Approval')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.settings') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{Lang::get('lang.approval_settings')}}</h3>
|
||||
</div>
|
||||
<!-- check whether success or not -->
|
||||
<div class="box-body table-responsive"style="overflow:hidden;">
|
||||
@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>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b> {!! Lang::get('lang.alert') !!} ! </b>
|
||||
<li class="error-message-padding">{!!Session::get('fails')!!}</li>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<!-- Default System Email: DROPDOWN value from emails table : Required -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 no-padding">
|
||||
<div class="form-group">
|
||||
{!! Form::label('del_noti', Lang::get('lang.close_all_ticket_for_approval')) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="btn-group" id="toggle_event_editing">
|
||||
<button type="button" class="btn {{$approval_status->status == '0' ? 'btn-info' : 'btn-default'}} locked_active">OFF</button>
|
||||
<button type="button" class="btn {{$approval_status->status == '1' ? 'btn-info' : 'btn-default'}} unlocked_inactive">ON</button>
|
||||
</div>
|
||||
<!-- <div class="alert alert-info" id="switch_status"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#toggle_event_editing button').click(function () {
|
||||
|
||||
var settings_approval=1;
|
||||
var settings_approval=0;
|
||||
if ($(this).hasClass('locked_active') ) {
|
||||
|
||||
|
||||
settings_approval = 0
|
||||
} if ( $(this).hasClass('unlocked_inactive')) {
|
||||
|
||||
settings_approval = 1;
|
||||
}
|
||||
|
||||
/* reverse locking status */
|
||||
$('#toggle_event_editing button').eq(0).toggleClass('locked_inactive locked_active btn-default btn-info');
|
||||
$('#toggle_event_editing button').eq(1).toggleClass('unlocked_inactive unlocked_active btn-info btn-default');
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '{{route("settingsUpdateApproval.settings")}}',
|
||||
data: {settings_approval: settings_approval},
|
||||
success: function (result) {
|
||||
// with('success', Lang::get('lang.approval_settings-created-successfully'));
|
||||
// alert("Hi, testing");
|
||||
alert(result);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,242 @@
|
||||
{!! Form::model($emails,['url' => 'post-scheduler', 'method' => 'PATCH']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{Lang::get('lang.cron_settings')}}</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive"style="overflow:hidden;">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if($warn!=="")
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!!$warn!!}
|
||||
</div>
|
||||
@endif
|
||||
<!-- 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
|
||||
<!-- <div class="alert alert-dismissable" style="background: #F3F3F3">
|
||||
<i class="fa fa-info-circle"></i> Please set this command in your cron
|
||||
{!! $command !!}
|
||||
</div>-->
|
||||
|
||||
<div class="alert alert-dismissable" style="background: #F3F3F3">
|
||||
<i class="fa fa-info-circle"></i> Please set this command in your cron
|
||||
{!! $shared !!}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-dismissable" style="background: #F3F3F3">
|
||||
<i class="fa fa-info-circle"></i> {!!Lang::get('lang.crone-url-message')!!}
|
||||
<a href="http://ladybirdweb.com/support/show/cron-job-scheduling" style="color:black" target="blank">{!!Lang::get('lang.click')!!}</a> {!!Lang::get('lang.check-cron-set')!!}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="info-box">
|
||||
<!-- Apply any bg-* class to to the icon to color it -->
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-cloud-download"></i></span>
|
||||
<div class="info-box-content">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('email_fetching',Lang::get('lang.email_fetch')) !!}<br>
|
||||
{!! Form::checkbox('email_fetching',1,$condition->checkActiveJob()['fetching'],['id'=>'email_fetching']) !!} {{Lang::get('lang.fetch_auto-corn')}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="fetching">
|
||||
{!! Form::select('fetching-commands',$commands,$condition->getConditionValue('fetching')['condition'],['class'=>'form-control','id'=>'fetching-command']) !!}
|
||||
<div id='fetching-daily-at'>
|
||||
{!! Form::text('fetching-dailyAt',$condition->getConditionValue('fetching')['at'],['class'=>'form-control']) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.info-box-content -->
|
||||
|
||||
</div><!-- /.info-box -->
|
||||
<div class="col-md-6">
|
||||
<div class="info-box">
|
||||
<!-- Apply any bg-* class to to the icon to color it -->
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-cloud-upload"></i></span>
|
||||
<div class="info-box-content">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('notification_cron',Lang::get('lang.notification-email')) !!}<br>
|
||||
{!! Form::checkbox('notification_cron',1,$condition->checkActiveJob()['notification'],['id'=>'notification_cron']) !!} {{Lang::get('lang.cron_notification')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="notification">
|
||||
{!! Form::select('notification-commands',$commands,$condition->getConditionValue('notification')['condition'],['class'=>'form-control','id'=>'notification-command']) !!}
|
||||
<div id='notification-daily-at'>
|
||||
{!! Form::text('notification-dailyAt',$condition->getConditionValue('notification')['at'],['class'=>'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.info-box-content -->
|
||||
</div><!-- /.info-box -->
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="info-box">
|
||||
<!-- Apply any bg-* class to to the icon to color it -->
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-check-circle"></i></span>
|
||||
<div class="info-box-content">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('condition',Lang::get('lang.auto_close_workflow')) !!}<br>
|
||||
{!! Form::checkbox('condition',1,$condition->checkActiveJob()['work'],['id'=>'auto_close']) !!}
|
||||
{{Lang::get('lang.enable_workflow')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="workflow">
|
||||
{!! Form::select('work-commands',$commands,$condition->getConditionValue('work')['condition'],['class'=>'form-control','id'=>'workflow-command']) !!}
|
||||
<div id='workflow-daily-at'>
|
||||
{!! Form::text('workflow-dailyAt',$condition->getConditionValue('work')['at'],['class'=>'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.info-box-content -->
|
||||
</div><!-- /.info-box -->
|
||||
</div>
|
||||
<!-- Follow up notification -->
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var checked = $("#email_fetching").is(':checked');
|
||||
check(checked, 'email_fetching');
|
||||
$("#email_fetching").on('click', function () {
|
||||
checked = $("#email_fetching").is(':checked');
|
||||
check(checked);
|
||||
});
|
||||
var command = $("#fetching-command").val();
|
||||
showDailyAt(command);
|
||||
$("#fetching-command").on('change', function () {
|
||||
command = $("#fetching-command").val();
|
||||
showDailyAt(command);
|
||||
});
|
||||
function check(checked, id) {
|
||||
if (checked) {
|
||||
$("#fetching").show();
|
||||
} else {
|
||||
$("#fetching").hide();
|
||||
}
|
||||
}
|
||||
function showDailyAt(command) {
|
||||
if (command === 'dailyAt') {
|
||||
$("#fetching-daily-at").show();
|
||||
} else {
|
||||
$("#fetching-daily-at").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
var checked = $("#notification_cron").is(':checked');
|
||||
check(checked, 'notification_cron');
|
||||
$("#notification_cron").on('click', function () {
|
||||
checked = $("#notification_cron").is(':checked');
|
||||
check(checked);
|
||||
});
|
||||
var command = $("#notification-command").val();
|
||||
showDailyAt(command);
|
||||
$("#notification-command").on('change', function () {
|
||||
command = $("#notification-command").val();
|
||||
showDailyAt(command);
|
||||
});
|
||||
function check(checked, id) {
|
||||
if (checked) {
|
||||
$("#notification").show();
|
||||
} else {
|
||||
$("#notification").hide();
|
||||
}
|
||||
}
|
||||
function showDailyAt(command) {
|
||||
if (command === 'dailyAt') {
|
||||
$("#notification-daily-at").show();
|
||||
} else {
|
||||
$("#notification-daily-at").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
var checked = $("#auto_close").is(':checked');
|
||||
check(checked, 'auto_close');
|
||||
$("#auto_close").on('click', function () {
|
||||
checked = $("#auto_close").is(':checked');
|
||||
check(checked);
|
||||
});
|
||||
var command = $("#workflow-command").val();
|
||||
showDailyAt(command);
|
||||
$("#workflow-command").on('change', function () {
|
||||
command = $("#workflow-command").val();
|
||||
showDailyAt(command);
|
||||
});
|
||||
function check(checked, id) {
|
||||
if (checked) {
|
||||
$("#workflow").show();
|
||||
} else {
|
||||
$("#workflow").hide();
|
||||
}
|
||||
}
|
||||
function showDailyAt(command) {
|
||||
if (command == 'dailyAt') {
|
||||
$("#workflow-daily-at").show();
|
||||
} else {
|
||||
$("#workflow-daily-at").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
//follow up
|
||||
$(document).ready(function () {
|
||||
var checked = $("#notification_cron1").is(':checked');
|
||||
check(checked, 'notification_cron1');
|
||||
$("#notification_cron1").on('click', function () {
|
||||
checked = $("#notification_cron1").is(':checked');
|
||||
check(checked);
|
||||
});
|
||||
var command = $("#notification-command1").val();
|
||||
showDailyAt(command);
|
||||
$("#notification-command1").on('change', function () {
|
||||
command = $("#notification-command1").val();
|
||||
showDailyAt(command);
|
||||
});
|
||||
function check(checked, id) {
|
||||
if (checked) {
|
||||
$("#notification1").show();
|
||||
} else {
|
||||
$("#notification1").hide();
|
||||
}
|
||||
}
|
||||
function showDailyAt(command) {
|
||||
if (command === 'dailyAt') {
|
||||
$("#notification-daily-at1").show();
|
||||
} else {
|
||||
$("#notification-daily-at1").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,33 +1,3 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('cron')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{ Lang::get('lang.settings') }}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
{!! Form::model($emails,['url' => 'post-scheduler', 'method' => 'PATCH']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
@@ -35,6 +5,22 @@ class="active"
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive"style="overflow:hidden;">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@if($warn!=="")
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!!$warn!!}
|
||||
</div>
|
||||
@endif
|
||||
<!-- check whether success or not -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
@@ -139,5 +125,4 @@ class="active"
|
||||
document.getElementById("p2").innerHTML = path2;
|
||||
document.getElementById("p3").innerHTML = path3;
|
||||
})
|
||||
</script>
|
||||
@stop
|
||||
</script>
|
||||
@@ -0,0 +1,37 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('cron')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{ Lang::get('lang.settings') }}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
|
||||
@if($warn!=="")
|
||||
@include('themes.default1.admin.helpdesk.settings.cron.cron-new')
|
||||
@else
|
||||
@include('themes.default1.admin.helpdesk.settings.cron.cron-new')
|
||||
@endif
|
||||
@stop
|
||||
@@ -81,6 +81,15 @@ class="active"
|
||||
{!!Session::get('fails')!!}
|
||||
</div>
|
||||
@endif
|
||||
@if($info == 1)
|
||||
<div class="alert alert-info alert-dismissable">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
<b></b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Lang::get('lang.plugin-info')}}
|
||||
<ul><li><a href="http://www.faveohelpdesk.com/plugins/" target="_blank">{{Lang::get('lang.click-here')}}</a>{{Lang::get('lang.plugin-info-pro')}}</li></ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<script src="{{asset('lb-faveo/plugins/jQuery/jQuery-2.1.4.min.js')}}" type="text/javascript"></script>
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('access')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h2></h2>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
@section('content')
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Social Media</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<!-- 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
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-responsive table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Provider</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Facebook</td>
|
||||
<td>
|
||||
@if($social->checkActive('facebook')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/facebook')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google</td>
|
||||
<td>
|
||||
@if($social->checkActive('google')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/google')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Github</td>
|
||||
<td>
|
||||
@if($social->checkActive('github')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/github')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Twitter</td>
|
||||
<td>
|
||||
@if($social->checkActive('twitter')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/twitter')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linkedin</td>
|
||||
<td>
|
||||
@if($social->checkActive('linkedin')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/linkedin')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bitbucket</td>
|
||||
<td>
|
||||
@if($social->checkActive('bitbucket')===true)
|
||||
<span style="color: green">Active</span>
|
||||
@else
|
||||
<span style="color: red">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{url('social/media/bitbucket')}}" class="btn btn-primary">Settings</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
@@ -0,0 +1,123 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('access')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h3>Social media settings</h3>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
@section('content')
|
||||
{!! Form::open(['url' => 'social/media/'.$provider, 'method' => 'POST']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ucfirst($provider)}}</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- check whether success or not -->
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!!Session::get('warn')!!}
|
||||
</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
|
||||
<!-- 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
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('client_id') ? 'has-error' : '' }}">
|
||||
{!! Form::label('client_id',Lang::get('lang.client_id')) !!}
|
||||
{!! $errors->first('client_id', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('client_id',$social->getvalueByKey($provider,'client_id'),['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('client_secret') ? 'has-error' : '' }}">
|
||||
{!! Form::label('client_secret',Lang::get('lang.client_secret')) !!}
|
||||
{!! $errors->first('client_secret', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('client_secret',$social->getvalueByKey($provider,'client_secret'),['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('redirect') ? 'has-error' : '' }}">
|
||||
{!! Form::label('redirect',Lang::get('lang.redirect')) !!}
|
||||
{!! $errors->first('redirect', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('redirect',$social->getvalueByKey($provider,'redirect'),['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('status', '<spam class="help-block">:message</spam>') !!}
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p>{!! Form::radio('status',1,$social->checkActive($provider))!!} Active</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p>{!! Form::radio('status',0,$social->checkInactive($provider)) !!} Inactive</p>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<i>Activate login via {{ucfirst($provider)}}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@stop
|
||||
@@ -17,7 +17,7 @@ class="active"
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.list_of_status') !!}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<!--<button class="btn btn-box-tool" data-toggle="modal" data-target="#2create" id="create" title="{!! Lang::get('lang.create') !!}"><i class="fa fa-plus-circle fa-2x"></i></button>-->
|
||||
<button class="btn btn-box-tool" data-toggle="modal" data-target="#2create" id="create" title="{!! Lang::get('lang.create') !!}"><i class="fa fa-plus-circle fa-2x"></i></button>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
@@ -42,7 +42,7 @@ class="active"
|
||||
<tr>
|
||||
<th>{!! Lang::get('lang.name') !!}</th>
|
||||
<th>{!! Lang::get('lang.display_order') !!}</th>
|
||||
<!--<th>{!! Lang::get('lang.action') !!}</th>-->
|
||||
<th>{!! Lang::get('lang.action') !!}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -52,9 +52,9 @@ class="active"
|
||||
<td>{!! $status->name !!}</td>
|
||||
<td>{!! $status->sort !!}</td>
|
||||
<td>
|
||||
<!--<a href="{!! route('status.edit',$status->id) !!}"><button class="btn btn-info btn-sm">{!! Lang::get('lang.edit_details') !!}</button></a>-->
|
||||
<!--<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$status->id}}delete">{!! Lang::get('lang.delete') !!}</button>-->
|
||||
<!-- <div class="modal fade" id="{{$status->id}}delete">
|
||||
<a href="{!! route('status.edit',$status->id) !!}"><button class="btn btn-info btn-sm">{!! Lang::get('lang.edit_details') !!}</button></a>
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$status->id}}delete">{!! Lang::get('lang.delete') !!}</button>
|
||||
<div class="modal fade" id="{{$status->id}}delete">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -70,7 +70,7 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -80,7 +80,7 @@ class="active"
|
||||
</div>
|
||||
|
||||
<!-- create modal -->
|
||||
<!--<div class="modal fade" id="2create">
|
||||
<div class="modal fade" id="2create">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
{!! Form::open(['route'=>'statuss.create']) !!}
|
||||
@@ -91,9 +91,9 @@ class="active"
|
||||
<div class="modal-body">
|
||||
@if(Session::has('errors'))
|
||||
<script type="text/javascript">
|
||||
// $(document).ready(function() {
|
||||
// $("#create").click();
|
||||
// });
|
||||
$(document).ready(function() {
|
||||
$("#create").click();
|
||||
});
|
||||
</script>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
@@ -126,7 +126,6 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
gender
|
||||
{!! Form::label('gender',Lang::get('lang.resolved_status')) !!}
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.status_msg3') !!}</div>
|
||||
<div class="row">
|
||||
@@ -139,7 +138,6 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
Email user
|
||||
{!! Form::label('gender',Lang::get('lang.deleted_status')) !!}
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.status_msg2') !!}</div>
|
||||
<div class="row">
|
||||
@@ -152,7 +150,6 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
Email user
|
||||
{!! Form::label('gender',Lang::get('lang.notify_user')) !!}
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.status_msg1') !!}</div>
|
||||
<div class="row">
|
||||
@@ -172,5 +169,5 @@ class="active"
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
@stop
|
||||
@@ -122,22 +122,22 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('user_set_ticket_status',Lang::get('lang.user_set_ticket_status')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<input type="radio" name="user_set_ticket_status" value="0" @if($common_setting->status == '0')checked="true" @endif>{{Lang::get('lang.no')}}
|
||||
<input type="radio" name="user_set_ticket_status" value="0" @if($common_setting->status == '0')checked="true" @endif> {{Lang::get('lang.no')}}
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input type="radio" name="user_set_ticket_status" value="1" @if($common_setting->status == '1')checked="true" @endif>{{Lang::get('lang.yes')}}
|
||||
<input type="radio" name="user_set_ticket_status" value="1" @if($common_setting->status == '1')checked="true" @endif> {{Lang::get('lang.yes')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-4" data-toggle="tooltip" title="{!! Lang::get('lang.the_rtl_support_is_only_applicable_to_the_outgoing_mails') !!}">
|
||||
<div class="form-group">
|
||||
{!! Form::label('status',Lang::get('lang.rtl')) !!}
|
||||
<div class="row">
|
||||
@@ -147,8 +147,31 @@ class="active"
|
||||
?>
|
||||
<input type="checkbox" name="enable_rtl" @if($rtl->option_value == 1) checked @endif> {{Lang::get('lang.enable')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<code>{!! Lang::get('lang.the_rtl_support_is_only_applicable_to_the_outgoing_mails') !!}</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" data-toggle="tooltip" title="{!! Lang::get('lang.otp_usage_info') !!}">
|
||||
<div class="form-group">
|
||||
{!! Form::label('send_otp',Lang::get('lang.allow_unverified_users_to_create_ticket')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<input type="radio" name="send_otp" value="0" @if($send_otp->status == '0')checked="true" @endif> {{Lang::get('lang.yes')}}
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input type="radio" name="send_otp" value="1" @if($send_otp->status == '1')checked="true" @endif> {{Lang::get('lang.no')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" data-toggle="tooltip" title="{!! Lang::get('lang.email_man_info') !!}">
|
||||
<div class="form-group">
|
||||
{!! Form::label('email_mandatory',Lang::get('lang.make-email-mandatroy')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<input type="radio" name="email_mandatory" value="1" @if($email_mandatory->status == '1')checked="true" @endif> {{Lang::get('lang.yes')}}
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<input type="radio" name="email_mandatory" value="0" @if($email_mandatory->status == '0')checked="true" @endif> {{Lang::get('lang.no')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@ class="active"
|
||||
@endif
|
||||
<div class="row">
|
||||
<!-- Default Status: Required : manual: Dropdowm -->
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.default_status')) !!}
|
||||
<select class="form-control" id="status" name="status">
|
||||
@@ -86,7 +86,7 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<!-- Default Priority: Required : manual : Dropdowm -->
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.default_priority')) !!}
|
||||
{!!Form::select('priority', [''=>'select a priority','Priorities'=>$priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control']) !!}
|
||||
@@ -108,8 +108,8 @@ class="active"
|
||||
{!!Form::select('help_topic', $topics->lists('topic','id'),null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
--><!-- Agent Collision Avoidance Duration: text-number -minutes -->
|
||||
<div class="col-md-4">
|
||||
--><!-- Agent Collision Avoidance Duration: text-number -minutes -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('collision_avoid') ? 'has-error' : '' }}">
|
||||
{!! Form::label('collision_avoid',Lang::get('lang.agent_collision_avoidance_duration')) !!}
|
||||
<div class="input-group">
|
||||
@@ -120,23 +120,90 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('help_topic',Lang::get('lang.lock_ticket_frequency')) !!}
|
||||
|
||||
<select name='lock_ticket_frequency' class="form-control">
|
||||
<option @if($tickets->lock_ticket_frequency == null) selected="true" @endif value="0">{!! Lang::get('lang.no')!!}</option>
|
||||
<option @if($tickets->lock_ticket_frequency == 1) selected="true" @endif value="1">{!! Lang::get('lang.only-once')!!}</option>
|
||||
<option @if($tickets->lock_ticket_frequency == 2) selected="true" @endif value="2">{!! Lang::get('lang.frequently')!!}</option>
|
||||
</select>
|
||||
|
||||
|
||||
<select name='lock_ticket_frequency' class="form-control">
|
||||
<option @if($tickets->lock_ticket_frequency == null) selected="true" @endif value="0">{!! Lang::get('lang.no')!!}</option>
|
||||
<option @if($tickets->lock_ticket_frequency == 1) selected="true" @endif value="1">{!! Lang::get('lang.only-once')!!}</option>
|
||||
<option @if($tickets->lock_ticket_frequency == 2) selected="true" @endif value="2">{!! Lang::get('lang.frequently')!!}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('num_format') ? 'has-error' : '' }}">
|
||||
{!! Form::label('num_format',Lang::get('lang.format')) !!}
|
||||
<a href="#" data-toggle="tooltip" data-placement="right" title="{{Lang::get('lang.ticket-number-format')}}"><i class="fa fa-question-circle" style="padding: 0px;"></i></a>
|
||||
{!! Form::text('num_format',null,['class'=>'form-control','id'=>'format']) !!}
|
||||
|
||||
<div id="result"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('num_sequence') ? 'has-error' : '' }}">
|
||||
{!! Form::label('num_sequence',Lang::get('lang.type')) !!}
|
||||
<a href="#" data-toggle="tooltip" data-placement="right" title="{{Lang::get('lang.ticket-number-type')}}"><i class="fa fa-question-circle" style="padding: 0px;"></i></a>
|
||||
|
||||
{!! Form::select('num_sequence',[''=>'Select','sequence'=>'Sequence','random'=>'Random'],null,['class'=>'form-control','id'=>'type']) !!}
|
||||
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var format = $("#format").val();
|
||||
var type = $("#type").val();
|
||||
send(format, type);
|
||||
$("#format").keyup(function () {
|
||||
format = $("#format").val();
|
||||
type = $("#type").val();
|
||||
send(format, type);
|
||||
});
|
||||
$("#type").on('change', function () {
|
||||
format = $("#format").val();
|
||||
type = $("#type").val();
|
||||
send(format, type);
|
||||
});
|
||||
function send(format, type) {
|
||||
$.ajax({
|
||||
url: "{{url('get-ticket-number')}}",
|
||||
type: "GET",
|
||||
dataType: "html",
|
||||
data: {'format': format, 'type': type},
|
||||
success: function (response) {
|
||||
$("#result").html("Number :<b> " + response + "</b>");
|
||||
},
|
||||
error: function (response) {
|
||||
console.log(response);
|
||||
$("#result").html("<i>Invalid format</i>");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,99 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Settings')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('settings-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('access')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
@section('content')
|
||||
{!! Form::open(['url' => 'url/settings', 'method' => 'PATCH']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">URL Settings</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body table-responsive">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<!-- 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
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('www','WWW/non-WWW') !!}
|
||||
</div>
|
||||
<div class="col-md-4 ">
|
||||
<p> {!! Form::radio('www','yes',$www['www'],['class'=>'option']) !!} WWW</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p> {!! Form::radio('www','no',$www['nonwww'],['class'=>'option']) !!} Non WWW</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 form-group">
|
||||
<div class="form-group">
|
||||
{!! Form::label('option','SSl') !!}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p> {!! Form::radio('ssl','yes',$https['https'],['class'=>'option']) !!} HTTPS</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p> {!! Form::radio('ssl','no',$https['http'],['class'=>'option']) !!} HTTP</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@stop
|
||||
Reference in New Issue
Block a user