This commit is contained in:
rahul shukla 2020-01-28 14:56:05 +05:30
parent 905bbeb4a8
commit 3144720c48
3 changed files with 11 additions and 17 deletions

View File

@ -42,13 +42,10 @@
@endif @endif
<?php <?php
$query = parse_url(\Illuminate\Support\Facades\Request::path(), PHP_URL_QUERY); $term = request()->input('term');
$searchTerm = explode("&", $query);
foreach($searchTerm as $term){ if (! is_null($term)) {
if (strpos($term, 'term') !== false) { $serachQuery = 'term='.request()->input('term');
$serachQuery = $term;
}
} }
?> ?>

View File

@ -29,13 +29,10 @@
</div> </div>
<?php <?php
$query = parse_url(\Illuminate\Support\Facades\Request::path(), PHP_URL_QUERY); $term = request()->input('term');
$searchTerm = explode("&", $query);
foreach($searchTerm as $term){ if (! is_null($term)) {
if (strpos($term, 'term') !== false) { $serachQuery = 'term='.request()->input('term');
$serachQuery = $term;
}
} }
?> ?>

View File

@ -28,15 +28,15 @@
<label for="mail_from" class="required">Store email address</label> <label for="mail_from" class="required">Store email address</label>
<input type="text" name="mail_from" class="control" placeholder="store@example.com" data-validation="required"> <input type="text" name="mail_from" class="control" placeholder="store@example.com" data-validation="required">
</div> </div>
<div class="control-group" id="mail_username"> <div class="control-group" id="mail_username">
<label for="mail_username" class="required">Username</label> <label for="mail_username" class="required">Username</label>
<input type="text" name="mail_username" class="control" placeholder="store@example.com" data-validation="required"> <input type="text" name="mail_username" class="control" placeholder="store@example.com" data-validation="required">
</div> </div>
<div class="control-group" id="mail_password"> <div class="control-group" id="mail_password">
<label for="mail_password" class="required">Password</label> <label for="mail_password" class="required">Password</label>
<input type="password" name="mail_password" class="control" data-validation="length required" data-validation-length="min6"> <input type="password" name="mail_password" class="control">
</div> </div>
</div> </div>
</div> </div>
@ -71,7 +71,7 @@
var EmailTarget = window.location.href.concat('/EmailConfig.php'); var EmailTarget = window.location.href.concat('/EmailConfig.php');
$.ajax({type : 'POST', url : EmailTarget, data : mailformData, dataType : 'json', encode : true}) $.ajax({type : 'POST', url : EmailTarget, data : mailformData, dataType : 'json', encode : true})
.done(function(data) { .done(function(data) {
if (!data.success) { if (!data.success) {
// handle errors // handle errors
@ -112,7 +112,7 @@
} else { } else {
$('#admin').hide(); $('#admin').hide();
$('#email').hide(); $('#email').hide();
$('#finish').show(); $('#finish').show();
} }
}); });
// stop the form from submitting the normal way and refreshing the page // stop the form from submitting the normal way and refreshing the page