Merge pull request #464 from ladybirdweb/hot-fix-patch

Hot fix patch
This commit is contained in:
Manish Verma
2017-05-02 11:05:41 +05:30
committed by GitHub
23 changed files with 172 additions and 26 deletions

View File

@@ -15,7 +15,6 @@ use App\User;
use Exception;
// classes
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Lang;
/**

View File

@@ -20,7 +20,6 @@ use Exception;
// classes
use Illuminate\Http\Request;
use Illuminate\support\Collection;
use Input;
use Lang;
/**

View File

@@ -10,7 +10,6 @@ use App\Model\helpdesk\Settings\Security;
// Request
use Illuminate\Http\Request;
// Class
use Input;
use Lang;
use Redirect;

View File

@@ -1802,6 +1802,13 @@ class TicketController extends Controller
{
$name = Input::get('name');
$email = Input::get('email');
$validator = \Validator::make(
['email' => $email, 'name' => $name],
['email' => 'required|email']
);
if ($validator->fails()) {
return 'Invalid email address.';
}
$ticket_id = Input::get('ticket_id');
$user_search = User::where('email', '=', $email)->first();
if (isset($user_serach)) {

View File

@@ -23,7 +23,6 @@ use DateTime;
use DB;
use Hash;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Input;
use Lang;
use Socialite;

View File

@@ -13,7 +13,6 @@ use App\User;
use Auth;
// classes
use Illuminate\Http\Request;
use Input;
use Lang;
/**

View File

@@ -18,7 +18,6 @@ use App\User;
use Hash;
// classes
use Illuminate\Http\Request;
use Input;
use Lang;
/**

View File

@@ -74,6 +74,7 @@ class SettingsController extends Controller
<div class="modal-dialog">
<div class="modal-content">
<form action="'.url('edit-widget/'.$model->id).'" method="POST">
'.csrf_field().'
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">'.strtoupper($model->name).' </h4>
@@ -160,6 +161,7 @@ class SettingsController extends Controller
<div class="modal-dialog">
<div class="modal-content">
<form action="'.url('edit-widget/'.$model->id).'" method="POST">
'.csrf_field().'
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">'.strtoupper($model->name).' </h4>

View File

@@ -32,7 +32,7 @@ class Kernel extends HttpKernel
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
//\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\LanguageMiddleware::class,
],
'api' => [

View File

@@ -12,7 +12,7 @@ return [
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
'debug' => env('APP_DEBUG', true),
/*
|--------------------------------------------------------------------------
| Error Log

View File

@@ -53,6 +53,9 @@ myApp.controller('MainController', ['$http', '$scope',
$scope.Datetimetitle = 'Faveo Date & Time format';
$scope.Datetimecontent = 'What format you want to display date & time in Faveo';
$scope.DummyDataTitle = 'Faveo Dummy Data';
$scope.DummyDataContent = 'Check this chekbox if you want to install and test Faveo with dummy data. You can clear dummy data and start using Faveo in production anytime.';
}
]);

View File

@@ -70,7 +70,7 @@ return [
'activate_your_account_click_on_Link_that_send_to_your_mail' => 'Activez-votre compte ! cliquez sur le lien qui vos a été envoyé par email.',
'this_field_do_not_match_our_records' => 'Ce champ ne correspond pas à nos enregistrements.',
'we_have_e-mailed_your_password_reset_link' => 'Nous avons envoyé un lien de réinitialisation de votre mot de passe !',
"we_can't_find_a_user_with_that_e-mail_address" => "Nous ne pouvons pas trouver un utilisateur avec cette adresse e-mail.",
"we_can't_find_a_user_with_that_e-mail_address" => 'Nous ne pouvons pas trouver un utilisateur avec cette adresse e-mail.',
/*
|--------------------------------------

View File

@@ -30,6 +30,7 @@ class="active"
<!-- open a form -->
<form action="{!!URL::route('priority.create1')!!}" method="post" role="form">
{{ csrf_field() }}
<div class="box box-primary">
<div class="box-header with-border">
<h2 class="box-title">{{Lang::get('lang.create')}}</h2>

View File

@@ -29,6 +29,7 @@ class="active"
@section('content')
<!-- open a form -->
<form action="{!!URL::route('priority.edit1')!!}" method="post" role="form">
{{ csrf_field() }}
<input type="hidden" name="priority_id" value="{{$tk_priority->priority_id}}">
<div class="box box-primary">
<div class="box-header with-border">

View File

@@ -124,7 +124,9 @@ class="active"
$.ajax({
type: 'post',
url: '{{route("user.priority.index")}}',
data: {user_settings_priority: user_settings_priority},
data: {
"_token": "{{ csrf_token() }}",
user_settings_priority: user_settings_priority},
success: function (result) {
// with('success', Lang::get('lang.approval_settings-created-successfully'));
// alert("Hi, testing");

View File

@@ -32,6 +32,7 @@ class="active"
<!-- content -->
@section('content')
<form class="form-horizontal" action="{!! URL::route('workflow.store') !!}" method="POST" id="form">
{{ csrf_field() }}
<div class="box">
<!-- /.box-header -->
<div class="box-body">

View File

@@ -32,6 +32,7 @@ class="active"
<!-- content -->
@section('content')
<form class="form-horizontal" action="{!! URL::route('workflow.update', $id) !!}" method="POST">
{{ csrf_field() }}
<div class="box">
<!-- /.box-header -->
<div class="box-body">

View File

@@ -73,6 +73,7 @@ class="active"
</div>
<div class="col-md-6">
<form action="{{ url('delete-notification-log') }}" method="post">
{{ csrf_field() }}
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.noti_msg2') !!}</div>
<input type="number" class="form-control" name='no_of_days' placeholder="{!! lang::get('lang.enter_no_of_days') !!}">
<button type="submit" class="btn btn-primary">{!! Lang::get('lang.submit') !!}</button>

View File

@@ -1155,7 +1155,7 @@ alert(h+20);
</div>
<div id="hide12345">
<input type="text" name="name" class="form-control" placeholder="{!! Lang::get('lang.name') !!}" required>
<input type="text" name="email" class="form-control" placeholder="{!! Lang::get('lang.e-mail') !!}" required>
<input type="email" name="email" class="form-control" placeholder="{!! Lang::get('lang.e-mail') !!}" required>
<input type="hidden" name="ticket_id" value="{!! $tickets->id !!}">
<input type="submit" class="btn" value="{!! Lang::get('lang.submit') !!}">
</div>

View File

@@ -230,6 +230,7 @@ class="active"
<!-- Delete -->
<form action="{!!URL::route('user.post.delete', $users->id)!!}" method="post" role="form">
{{ csrf_field() }}
<div class="modal fade" id="addNewCategoryModal3" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -254,6 +255,8 @@ class="active"
<option value="ban_delete">Ban and delete </option>
<option value="delete">Delete</option>
</select>
}
}
-->
@@ -331,6 +334,7 @@ class="active"
<!-- Role -->
<!-- Admin -->
<form action="{!!URL::route('user.post.rolechangeadmin', $users->id)!!}" method="post" role="form">
{{ csrf_field() }}
<div class="modal fade" id="addNewCategoryModal4" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -370,6 +374,7 @@ class="active"
</form>
<!-- user -->
<form action="{!!URL::route('user.post.rolechangeuser', $users->id)!!}" method="post" role="form">
{{ csrf_field() }}
<div class="modal fade" id="addNewCategoryModal2" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -398,6 +403,7 @@ class="active"
</form>
<!-- agent -->
<form action="{!!URL::route('user.post.rolechangeagent', $users->id)!!}" method="post" role="form">
{{ csrf_field() }}
<div class="modal fade" id="addNewCategoryModal1" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -453,6 +459,7 @@ class="active"
<br/>
<form name="myForm" action="{!!URL::route('user.post.changepassword', $users->id)!!}" method="post" role="form" onsubmit="return validateForm()">
{{ csrf_field() }}
<div class="form-group">
<!-- <div class="form-group {{ $errors->has('change_password') ? 'has-error' : '' }}"> -->
@@ -478,6 +485,7 @@ class="active"
<!-- Restore -->
<!-- Admin -->
<form action="{!!URL::route('user.restore', $users->id)!!}" method="post" role="form">
{{ csrf_field() }}
<div class="modal modal-fade" id="addNewCategoryModal8" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -727,6 +735,7 @@ $(document).ready(function(){
</div>
<div class="box-body">
<form id="foo">
{{ csrf_field() }}
<div class="form-group">
<div class="row">
<div class='col-sm-3'>

View File

@@ -14,6 +14,7 @@ active
<p>Please read this software license agreement carefully before downloading or using the software. By clicking on the "accept" button, opening the package, or downloading the product, you are consenting to be bound by this agreement. If you do not agree to all of the terms of this agreement, stop the installation process and exit.</p>
<form action="{{URL::route('postlicence')}}" method="post">
{{ csrf_field() }}
<div>
<div id="openModal" class="modalDialog">

View File

@@ -44,7 +44,7 @@ active
</div>
@endif
{!! Form::open(['url'=> '/step4post']) !!}
{!! Form::open(['url'=> '/step4post', 'id' => 'databaseform']) !!}
<table ng-controller="MainController">
<tr>
<td>
@@ -69,7 +69,7 @@ active
<label for="box1">Host<span style="color: red;font-size:12px;">*</span></label>
</td>
<td>
<input type="text" name="host">
{!! Form::text('host', null, ['required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Hosttitle}}" data-content="@{{Hostcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -81,7 +81,7 @@ active
<label for="box2">Port</label>
</td>
<td>
<input type="number" name="port">
{!! Form::text('port', null, ['onkeydown' => 'return CheckPortForInput(event)']) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Porttitle}}" data-content="@{{Portcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -93,7 +93,7 @@ active
<label for="box3">Database Name<span style="color: red;font-size:12px;">*</span></label>
</td>
<td>
<input type="text" name="databasename">
{!! Form::text('databasename', null, ['required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Databasenametitle}}" data-content="@{{Databasenamecontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -105,7 +105,7 @@ active
<label for="box4">User Name<span style="color: red; font-size: 12px;">*</span></label>
</td>
<td>
<input type="text" name="username">
{!! Form::text('username', null, ['required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Usertitle}}" data-content="@{{Usercontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -130,10 +130,75 @@ active
<input type="submit" id="submitme" class="button-primary button button-large button-next" value="Continue">
<a href="{!! route('prerequisites') !!}" class="button button-large button-next" style="float: left">Previous</a>
</p>
<br>
</form>
</div>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<script src="{{asset("lb-faveo/js/angular2.js")}}" type="text/javascript"></script>
<script type="text/javascript">
function CheckPortForInput(e) {
var code = e.which || e.keyCode;
if (e.ctrlKey != true){
if((code >=48 && code<= 57) || code == 8 || code == 46 || e.keyCode == 9 || e.keyCode == 13) {
return true;
}
} else {
if((code == 65 || code == 97) || (code == 88 || code == 120) || (code == 86 || code == 118)) {
return true;
}
}
return false;
}
</script>
<script type="text/javascript">
@if($errors->has('host'))
addErrorClass('host');
@endif
@if($errors->has('host'))
addErrorClass('host');
@endif
@if($errors->has('databasename'))
addErrorClass('databasename');
@endif
@if($errors->has('username'))
addErrorClass('username');
@endif
@if($errors->has('password'))
addErrorClass('password');
@endif
$('#databaseform').on('submit', function(e){
$("#databaseform input[type=text]").each(function(){
if($(this).attr('name') == 'host' || $(this).attr('name') == 'databasename' || $(this).attr('name') == 'username'){
if ($(this).val() == '') {
$(this).css('border-color','red')
$(this).css('border-width','1px');
e.preventDefault();
alert('Please fill all required values.');
}
}
});
});
$('input[type=text]').on('blur', function(){
if($(this).attr('name') == 'host' || $(this).attr('name') == 'databasename' || $(this).attr('name') == 'username'){
if ($(this).val() == '') {
addErrorClass($(this).attr('name'));
}
}
})
function addErrorClass(name){
var target = document.getElementsByName(name);
$(target[0]).css('border-color','red');
$(target[0]).css('border-width','1px');
}
$('input').on('focus', function(){
$(this).css('border-color','#A9A9A9')
$(this).css('border-width','1px');
})
</script>
</div>
@stop

View File

@@ -20,8 +20,8 @@ active
<div id="form-content">
<div ng-app="myApp">
<h1 style="text-align: center;">Locale Information</h1>
{!! Form::open(['url'=>route('postaccount')]) !!}
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{!! Form::open(['url'=>route('postaccount'), 'id' => 'postaccount']) !!}
<!-- checking if the form submit fails -->
@if($errors->first('firstname')||$errors->first('Lastname')||$errors->first('email')||$errors->first('username')||$errors->first('password')||$errors->first('confirmpassword'))
@@ -70,7 +70,7 @@ active
: red;font-size:12px;">*</span></label>
</td>
<td>
{!! Form::text('firstname',null,['style' =>'margin-left:250px']) !!}
{!! Form::text('firstname',null,['style' =>'margin-left:250px', 'required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Nametitle}}" data-content="@{{Namecontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -83,7 +83,7 @@ active
: red;font-size:12px;">*</span></label>
</td>
<td>
{!! Form::text('Lastname',null,['style' =>'margin-left:250px']) !!}
{!! Form::text('Lastname',null,['style' =>'margin-left:250px', 'required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Lasttitle}}" data-content="@{{Lastcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -96,7 +96,7 @@ active
: red;font-size:12px;">*</span></label>
</td>
<td>
{!! Form::text('email',null,['style' =>'margin-left:250px']) !!}
{!! Form::email('email',null,['style' =>'margin-left:250px', 'required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Emailtitle}}" data-content="@{{Emailcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -117,7 +117,7 @@ active
</label>
</td>
<td>
{!! Form::text('username',null,['style' =>'margin-left:195px']) !!}
{!! Form::text('username',null,['style' =>'margin-left:195px', 'required' => true]) !!}
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{UserNametitle}}" data-content="@{{UserNamecontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -131,7 +131,7 @@ active
</label>
</td>
<td>
<input type="password" name="password" style="margin-left: 195px" >
<input type="password" name="password" style="margin-left: 195px" required="true">
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Passtitle}}" data-content="@{{Passcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -145,7 +145,7 @@ active
</label>
</td>
<td>
<input type="password" name="confirmpassword" style="margin-left: 195px" >
<input type="password" name="confirmpassword" style="margin-left: 195px" required="true">
</td>
<td>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{Confirmtitle}}" data-content="@{{Confirmcontent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
@@ -333,9 +333,11 @@ active
</table>
<input id="dummy-data" class="input-checkbox" type="checkbox" name="dummy-data">
<label for="dummy-data" style="color:#3AA7D9">Install dummy data</label>
<button type="button" data-toggle="popover" data-placement="right" data-arrowcolor="#eeeeee" data-bordercolor="#bbbbbb" data-title-backcolor="#cccccc" data-title-bordercolor="#bbbbbb" data-title-textcolor="#444444" data-content-backcolor="#eeeeee" data-content-textcolor="#888888" title="@{{DummyDataTitle}}" data-content="@{{DummyDataContent}}" style="padding: 0px;border: 0px; border-radius: 5px;"><i class="fa fa-question-circle" style="padding: 0px;"></i>
</button>
<br><br>
<p class="setup-actions step">
<input type="submit" id="submitme" class="button-primary button button-large button-next" value="Install" onclick="this.disabled=true;this.value='Installing, please wait...';this.form.submit();">
<input type="submit" id="submitme" class="button-primary button button-large button-next" value="Install">
<a href="{{url('step4')}}" class="button button-large button-next" style="float: left">Previous</a>
</p>
</form>
@@ -346,5 +348,61 @@ active
<script src="{{asset("lb-faveo/js/angular2.js")}}" type="text/javascript"></script>
</div>
</div>
<script type="text/javascript">
@if($errors->has('firstname'))
addErrorClass('firstname');
@endif
@if($errors->has('Lastname'))
addErrorClass('Lastname');
@endif
@if($errors->has('email'))
addErrorClass('email');
@endif
@if($errors->has('username'))
addErrorClass('username');
@endif
@if($errors->has('password'))
addErrorClass('password');
@endif
@if($errors->has('confirmpassword'))
addErrorClass('confirmpassword');
@endif
$('#postaccount').on('submit', function(e) {
$("#postaccount input").each(function(){
if($(this).attr('name') == 'firstname' ||
$(this).attr('name') == 'Lastname' ||
$(this).attr('name') == 'email' ||
$(this).attr('name') == 'username' ||
$(this).attr('name') == 'password' ||
$(this).attr('name') == 'confirmpassword'){
if ($(this).val() == '') {
$(this).css('border-color','red')
$(this).css('border-width','1px');
e.preventDefault();
}
} else {
$('#submitme').attr('disabled', true);
$('#submitme').val('Installing, please wait...');
}
});
});
$('input').on('focus', function(){
$(this).css('border-color','#A9A9A9')
$(this).css('border-width','1px');
})
$('input').on('blur', function(){
if($(this).val() == ''){
addErrorClass($(this).attr('name'));
}
});
function addErrorClass(name){
var target = document.getElementsByName(name);
$(target[0]).css('border-color','red');
$(target[0]).css('border-width','1px');
}
</script>
@stop