update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -189,40 +189,33 @@ foreach ($conversations as $conversation) {
|
||||
$body = $conversation->body;
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
||||
foreach ($attachments as $attachment) {
|
||||
// $i++;
|
||||
try {
|
||||
if ($attachment->type == 'jpg' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||
if($attachment->size > 0) {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
if($image == false) {
|
||||
} else {
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
|
||||
if ($attachment->type == 'pdf') {
|
||||
|
||||
} elseif ($attachment->type == 'docx') {
|
||||
|
||||
} else {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
||||
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
|
||||
|
||||
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||
|
||||
} else {
|
||||
$ini = strpos($string, $start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string, $end, $ini) - $ini;
|
||||
$parsed = substr($string, $ini, $len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2, " ", $body);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
|
||||
}
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||
|
||||
} else {
|
||||
$ini = strpos($string, $start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string, $end, $ini) - $ini;
|
||||
$parsed = substr($string, $ini, $len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2, " ", $body);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$string = $body;
|
||||
@@ -306,29 +299,24 @@ foreach ($conversations as $conversation) {
|
||||
<ul class='mailbox-attachments clearfix'>
|
||||
<?php
|
||||
foreach ($attachments as $attachment) {
|
||||
$size = $attachment->size;
|
||||
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
||||
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
||||
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
||||
if ($attachment->poster == 'ATTACHMENT') {
|
||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
if($image == false) {
|
||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||
} else {
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
||||
}
|
||||
} else {
|
||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||
}
|
||||
$size = $attachment->size;
|
||||
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
||||
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
||||
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
||||
if ($attachment->poster == 'ATTACHMENT') {
|
||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
||||
} else {
|
||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -465,7 +453,7 @@ foreach ($conversations as $conversation) {
|
||||
//Add text editor
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
@if( $common_setting->status == '1')
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// Close a ticket
|
||||
$('#close').on('click', function(e) {
|
||||
@@ -552,8 +540,6 @@ foreach ($conversations as $conversation) {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
@endif
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
@@ -36,7 +36,7 @@ class = "active"
|
||||
{!! Form::open(['url' => 'checkmyticket' , 'method' => 'POST'] )!!}
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('email_address',null,['class' => 'form-control']) !!}
|
||||
{!! Form::label('ticket_number',Lang::get('lang.ticket_number')) !!}<span class="text-red">*</span>
|
||||
{!! Form::label('ticket_number',Lang::get('lang.ticket_number')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('ticket_number',null,['class' => 'form-control']) !!}
|
||||
<br/><input type="submit" value="{!! Lang::get('lang.check_ticket_status') !!}" class="btn btn-info">
|
||||
{!! Form::close() !!}
|
||||
@@ -88,51 +88,64 @@ class = "active"
|
||||
<h4>{!! Lang::get('lang.ticket') !!} </h4>
|
||||
</div>
|
||||
<div class="row col-md-12">
|
||||
|
||||
@if(Auth::user())
|
||||
|
||||
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
|
||||
|
||||
@else
|
||||
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('Name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@if(Auth::user())
|
||||
|
||||
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
|
||||
|
||||
@else
|
||||
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Email',Lang::get('lang.email')) !!}
|
||||
@if($email_mandatory->status == 1 || $email_mandatory->status == '1')
|
||||
<span class="text-red"> *</span>
|
||||
@endif
|
||||
{!! Form::email('Email',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if(Auth::user())
|
||||
|
||||
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
|
||||
|
||||
@else
|
||||
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('Name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@if(Auth::user())
|
||||
|
||||
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
|
||||
|
||||
@else
|
||||
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('Email',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@if(!Auth::user())
|
||||
|
||||
|
||||
|
||||
@if(!Auth::user())
|
||||
|
||||
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Code',Lang::get('lang.country-code')) !!}
|
||||
@if($email_mandatory->status == 0 || $email_mandatory->status == '0')
|
||||
<span class="text-red"> *</span>
|
||||
@endif
|
||||
|
||||
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
</div>
|
||||
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!}
|
||||
{!! Form::text('Mobile',null,['class' => 'form-control']) !!}
|
||||
<div class="col-md-5 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
|
||||
@if($email_mandatory->status == 0 || $email_mandatory->status == '0')
|
||||
<span class="text-red"> *</span>
|
||||
@endif
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
|
||||
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
{!! Form::hidden('mobile',Auth::user()->mobile,['class' => 'form-control']) !!}
|
||||
{!! Form::hidden('Code',Auth::user()->country_code,['class' => 'form-control']) !!}
|
||||
{!! Form::hidden('Phone',Auth::user()->phone_number,['class' => 'form-control']) !!}
|
||||
|
||||
@endif
|
||||
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
|
||||
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
|
||||
@@ -155,6 +168,27 @@ class = "active"
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<!-- priority -->
|
||||
<?php
|
||||
$Priority = App\Model\helpdesk\Settings\CommonSettings::where('id','=',6)->first();
|
||||
$user_Priority=$Priority->status;
|
||||
?>
|
||||
|
||||
@if($user_Priority == 1)
|
||||
<div class="col-md-12 form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<label>{!! Lang::get('lang.priority') !!}:</label>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?>
|
||||
{!! Form::select('priority', ['Priority'=>$Priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
||||
@endif
|
||||
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
||||
{!! Form::label('Subject',Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('Subject',null,['class' => 'form-control']) !!}
|
||||
@@ -164,18 +198,14 @@ class = "active"
|
||||
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-md-12 form-group">
|
||||
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" id="attachment" multiple/></div><br/>
|
||||
<div id='file_details'></div><div id='total-size'></div>
|
||||
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
||||
<div>
|
||||
<a id='clear-file' onClick='clearAll()' style='display:none; cursor:pointer;'><i class='fa fa-close'></i>Clear all</a>
|
||||
</div>
|
||||
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" multiple/></div><br/>
|
||||
{!! Lang::get('lang.max') !!}. 10MB
|
||||
</div>
|
||||
{{-- Event fire --}}
|
||||
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
|
||||
<div class="col-md-12" id="response"> </div>
|
||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
||||
<div class="col-md-12 form-group">{!! Form::submit(Lang::get('lang.Send'),['id' => 'submitbtn' ,'class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}</div>
|
||||
<div class="col-md-12 form-group">{!! Form::submit(Lang::get('lang.Send'),['class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}</div>
|
||||
</div>
|
||||
<div class="col-md-12" id="response"> </div>
|
||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
||||
@@ -188,87 +218,32 @@ class = "active"
|
||||
|====================================================
|
||||
-->
|
||||
<script type="text/javascript">
|
||||
function clearAll() {
|
||||
$("#file_details").html("");
|
||||
$("#total-size").html("");
|
||||
$("#attachment").val('');
|
||||
$("#clear-file").hide();
|
||||
$("#submitbtn").removeClass('disabled');
|
||||
}
|
||||
$(document).ready(function(){
|
||||
var helpTopic = $("#selectid").val();
|
||||
send(helpTopic);
|
||||
$("#selectid").on("change",function(){
|
||||
helpTopic = $("#selectid").val();
|
||||
send(helpTopic);
|
||||
});
|
||||
function send(helpTopic){
|
||||
$.ajax({
|
||||
url:"{{url('/get-helptopic-form')}}",
|
||||
data:{'helptopic':helpTopic},
|
||||
type:"GET",
|
||||
dataType:"html",
|
||||
success:function(response){
|
||||
$("#response").html(response);
|
||||
},
|
||||
error:function(response){
|
||||
$("#response").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var helpTopic = $("#selectid").val();
|
||||
send(helpTopic);
|
||||
$("#selectid").on("change", function() {
|
||||
helpTopic = $("#selectid").val();
|
||||
send(helpTopic);
|
||||
});
|
||||
function send(helpTopic) {
|
||||
$.ajax({
|
||||
url: "{{url('/get-helptopic-form')}}",
|
||||
data: {'helptopic': helpTopic},
|
||||
type: "GET",
|
||||
dataType: "html",
|
||||
success: function(response) {
|
||||
$("#response").html(response);
|
||||
},
|
||||
error: function(response) {
|
||||
$("#response").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$(function() {
|
||||
//Add text editor
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
|
||||
|
||||
// Ticket attachment
|
||||
$('#attachment').change(function() {
|
||||
input = document.getElementById('attachment');
|
||||
if (!input) {
|
||||
alert("Um, couldn't find the fileinput element.");
|
||||
} else if (!input.files) {
|
||||
alert("This browser doesn't seem to support the `files` property of file inputs.");
|
||||
} else if (!input.files[0]) {
|
||||
} else {
|
||||
$("#file_details").html("");
|
||||
var total_size = 0;
|
||||
for (i = 0; i < input.files.length; i++) {
|
||||
file = input.files[i];
|
||||
var supported_size = "{!! $max_size_in_bytes !!}";
|
||||
var supported_actual_size = "{!! $max_size_in_actual !!}";
|
||||
if (file.size < supported_size) {
|
||||
$("#file_details").append("<tr> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||
} else {
|
||||
$("#file_details").append("<tr style='color:red;'> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||
}
|
||||
total_size += parseInt(file.size);
|
||||
}
|
||||
if (total_size > supported_size) {
|
||||
$("#total-size").append("<span style='color:red'>Your total file upload size is greater than " + supported_actual_size + "</span>");
|
||||
$("#submitbtn").addClass('disabled');
|
||||
$("#clear-file").show();
|
||||
} else {
|
||||
$("#total-size").html("");
|
||||
$("#submitbtn").removeClass('disabled');
|
||||
$("#clear-file").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function formatBytes(bytes, decimals) {
|
||||
if (bytes == 0)
|
||||
return '0 Byte';
|
||||
var k = 1000;
|
||||
var dm = decimals + 1 || 3;
|
||||
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
@stop
|
@@ -15,7 +15,7 @@ class="active"
|
||||
</section>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{!! Form::model($user,['url'=>'client-profile-edit', 'method' => 'PATCH','files'=>true]) !!}
|
||||
{!! Form::model($user,['url'=>'client-profile-edit', 'id' => 'client-profile', 'method' => 'PATCH','files'=>true]) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h4 class="box-title">{!! Lang::get('lang.profile') !!} </h4>
|
||||
@@ -88,7 +88,7 @@ class="active"
|
||||
<div class="col-xs-2 form-group {{ $errors->has('country_code') ? 'has-error' : '' }}">
|
||||
<!-- phone extensionn -->
|
||||
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
|
||||
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code'), 'id' => 'code']) !!}
|
||||
|
||||
</div>
|
||||
<div class="col-xs-2 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
@@ -108,7 +108,7 @@ class="active"
|
||||
<!-- mobile -->
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
|
||||
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
|
||||
<!-- profile pic -->
|
||||
@@ -150,21 +150,21 @@ class="active"
|
||||
<!-- old password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::password('old_password',['class' => 'form-control']) !!}
|
||||
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- new password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::password('new_password',['class' => 'form-control']) !!}
|
||||
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- cofirm password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::password('confirm_password',['class' => 'form-control']) !!}
|
||||
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
@@ -177,4 +177,140 @@ class="active"
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- Modal for last step of setting -->
|
||||
<div class="modal fade in" id="last-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-12" style="height:40%">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span style="font-size:1.2em">{{Lang::get('lang.verify-number')}}</span>
|
||||
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="custom-alert-body2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="loader2" style="display:none">
|
||||
<center><img src="{{asset('lb-faveo/media/images/gifloader.gif')}}"></center>
|
||||
</div>
|
||||
<div id="verify-success" style="display:none" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i>
|
||||
<span id = "success_message"></span>
|
||||
</div>
|
||||
<div id="verify-fail" style="display:none" class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b>
|
||||
<span id = "error_message"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="verify-number-form">
|
||||
{!! Form::open(['id'=>'verify-otp','method' => 'POST'] )!!}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Lang::get('lang.get-verify-message') }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{!! Form::text('token','',['class' => 'form-control', 'required' => true, 'placeholder' => Lang::get('lang.enter-otp'), 'id' => 'otp']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close-last" class="btn btn-default closemodal pull-left">{{Lang::get('lang.close')}}</button>
|
||||
<div id="last-submit"><input type="submit" id="merge-btn" class="btn btn-primary pull-right" value="{!! Lang::get('lang.verify') !!}"></input></div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal end -->
|
||||
@if($verify == 1 || $verify == '1')
|
||||
<script type="text/javascript">
|
||||
$('#client-profile').on('submit', function(e){
|
||||
var old_mobile = "<?php echo $user->mobile;?>";
|
||||
var email = "<?php echo $user->email;?>";
|
||||
var full_name = "<?php echo $user->first_name; ?>";
|
||||
var mobile = document.getElementById('mobile').value;
|
||||
var code = document.getElementById('code').value;
|
||||
var id = "<?php echo $user->id; ?>";
|
||||
if (code == '' || code == null) {
|
||||
//do nothing
|
||||
} else {
|
||||
if (mobile !== old_mobile) {
|
||||
e.preventDefault();
|
||||
$('#last-modal').css('display', 'block');
|
||||
$.ajax({
|
||||
url: '{{URL::route("client-verify-number")}}',
|
||||
type: 'POST', // performing a POST request
|
||||
data : {
|
||||
mobile : mobile,
|
||||
full_name: full_name,
|
||||
email: email,
|
||||
code: code// will be accessible in $_POST['data1']
|
||||
},
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$('#loader2').css('display', 'block');
|
||||
$('#verify-number-form').css('display', 'none');
|
||||
$('#verify-fail').css('display', 'none');
|
||||
$('verify-success').css('display', 'none');
|
||||
},
|
||||
success: function(response) {
|
||||
$('#loader2').css('display', 'none');
|
||||
$('#verify-number-form').css('display', 'block');
|
||||
$('#verify-otp').on('submit', function(e){
|
||||
e.preventDefault();
|
||||
var otp = document.getElementById('otp').value;
|
||||
$.ajax({
|
||||
url: '{{URL::route("post-client-verify-number")}}',
|
||||
type: 'POST',
|
||||
data: {
|
||||
otp: otp,
|
||||
u_id: id,
|
||||
},
|
||||
dataType: 'html',
|
||||
beforeSend: function(){
|
||||
$('#loader2').css('display', 'block');
|
||||
$('#verify-number-form').css('display', 'none');
|
||||
$('#verify-fail').css('display', 'none');
|
||||
$('verify-success').css('display', 'none');
|
||||
},
|
||||
success: function(response){
|
||||
if( response == 1) {
|
||||
$('#loader2').css('display', 'none');
|
||||
var message = "{{Lang::get('lang.number-verification-sussessfull')}}";
|
||||
$('#success_message').html(message);
|
||||
$('#verify-success').css('display', 'block');
|
||||
$('#client-profile').unbind('submit').submit();
|
||||
} else {
|
||||
$('#loader2').css('display', 'none');
|
||||
$("#error_message").html(response);
|
||||
$('#verify-fail').css('display', 'block');
|
||||
$('#verify-number-form').css('display', 'block');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
complete: function( jqXHR, textStatus) {
|
||||
if (textStatus === "parsererror" || textStatus === "timeout" || textStatus === "abort" || textStatus === "error") {
|
||||
var message = "{{Lang::get('lang.otp-not-sent')}}";
|
||||
$('#loader2').css('display', 'none');
|
||||
$("#error_message").html(message);
|
||||
$("#merge-btn").css('display', 'none');
|
||||
$('#verify-fail').css('display', 'block');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.closemodal').on('click', function(){
|
||||
$('#last-modal').css('display', 'none');
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
@stop
|
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
$social = new \App\Model\helpdesk\Settings\SocialMedia();
|
||||
$redirect = 'social-sync';
|
||||
?>
|
||||
<div>
|
||||
<h3>Social Media Sync</h3>
|
||||
|
||||
@if($social->checkActive('twitter'))
|
||||
<a class="btn btn-block btn-social btn-twitter" href="{{ route('social.login', ['twitter',$redirect]) }}" style="background-color: #55ACEE;color: white;">
|
||||
<span class="fa fa-twitter"></span> Sign in with Twitter
|
||||
</a>
|
||||
@endif
|
||||
@if($social->checkActive('facebook'))
|
||||
<a class="btn btn-block btn-social btn-facebook" href="{{ route('social.login', ['facebook',$redirect]) }}" style="background-color: #3B5998;color: white;">
|
||||
<span class="fa fa-facebook"></span> Sign in with Facebook
|
||||
</a>
|
||||
@endif
|
||||
@if($social->checkActive('google'))
|
||||
<a class="btn btn-block btn-social btn-google-plus" href="{{ route('social.login', ['google',$redirect]) }}" style="background-color: #DD4B39;color: white;">
|
||||
<span class="fa fa-google"></span> Sign in with Google
|
||||
</a>
|
||||
@endif
|
||||
@if($social->checkActive('linkedin'))
|
||||
<a class="btn btn-block btn-social btn-linkedin" href="{{ route('social.login', ['linkedin',$redirect]) }}" style="background-color: #007BB6;color: white;">
|
||||
<span class="fa fa-linkedin"></span> Sign in with Linkedin
|
||||
</a>
|
||||
@endif
|
||||
@if($social->checkActive('bitbucket'))
|
||||
<a class="btn btn-block btn-social btn-bitbucket" href="{{ route('social.login', ['bitbucket',$redirect]) }}" style="background-color: blue;color: white;">
|
||||
<span class="fa fa-bitbucket"></span> Sign in with Bitbucket
|
||||
</a>
|
||||
@endif
|
||||
@if($social->checkActive('github'))
|
||||
<a class="btn btn-block btn-social btn-github" href="{{ route('social.login', ['github',$redirect]) }}" style="background-color: black;color: white;">
|
||||
<span class="fa fa-github"></span> Sign in with Github
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
Reference in New Issue
Block a user