mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #852 from openclassify/dia
#2621 OC - Listing SEO - Redirect chain
This commit is contained in:
commit
75733be52a
@ -179,6 +179,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$("#listFilterForm").submit(function(e) {
|
||||
// Disable unselected inputs
|
||||
const inputs = $('#listFilterForm :input');
|
||||
[...inputs].forEach((input) => {
|
||||
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||
@ -191,6 +192,11 @@ $("#listFilterForm").submit(function(e) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Disable country if city is selected
|
||||
if ($('#listCityFilter').val()) {
|
||||
$('#listCountryFilter').prop('disabled', true)
|
||||
}
|
||||
});
|
||||
|
||||
// Change view type
|
||||
|
||||
@ -307,6 +307,7 @@ return [
|
||||
'listing_details' => 'Liste Ayrıntıları',
|
||||
'preview' => 'Ön İzleme',
|
||||
'congratulations' => 'Tebrikler',
|
||||
'ad_desc' => 'İlan Açıklaması',
|
||||
|
||||
'free' => 'Bedava',
|
||||
'ad_date' => 'İlan Tarihi',
|
||||
|
||||
@ -27,4 +27,6 @@ return [
|
||||
'ad_doesnt_exist' => "Bu İlan mevcut değil!",
|
||||
'select_location_error' => "Lütfen haritada bir yer seçin!",
|
||||
'this_ad_is_not_valid_anymore' => "Bu ürün veya ilan artık geçerli değil!",
|
||||
'approve_status_change' => "İlanınızın Durumu Etkin Olarak Ayarlandı!",
|
||||
'passive_status_change' => "İlanınızın Durumu Pasif Olarak Ayarlandı!",
|
||||
];
|
||||
|
||||
@ -169,7 +169,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="mt-5 pb-1 border-bottom">{{ trans('visiosoft.module.advs::field.upload_photos') }}</h5>
|
||||
<h5 class="mt-5 pb-1 border-bottom">
|
||||
{{ trans('visiosoft.module.advs::field.upload_photos') }}
|
||||
</h5>
|
||||
<div class="bg-light p-4">
|
||||
<div class="row form-group images">
|
||||
<div class="col-md-12">
|
||||
@ -178,12 +180,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="mt-5 pb-1 border-bottom">
|
||||
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
||||
</h5>
|
||||
<div class="bg-light p-4">
|
||||
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
|
||||
</div>
|
||||
{% if count(custom_fields) %}
|
||||
<h5 class="mt-5 pb-1 border-bottom">
|
||||
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
||||
</h5>
|
||||
<div class="bg-light p-4">
|
||||
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h5 class="mt-5 pb-1 border-bottom">
|
||||
{{ trans('visiosoft.module.advs::field.ad_location') }}
|
||||
|
||||
@ -32,7 +32,7 @@ new Promise(function (resolve, reject) {
|
||||
function getCities(country) {
|
||||
crudAjax('id=' + country, '/ajax/getCities', 'POST', function (callback) {
|
||||
cities = callback;
|
||||
$('select[name="default_city"]').html("<option>" + pick_option + "</option>");
|
||||
$('select[name="default_city"]').html("<option value=''>" + pick_option + "</option>");
|
||||
$.each(cities, function (index, value) {
|
||||
$('select[name="default_city"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||
});
|
||||
@ -42,7 +42,7 @@ function getCities(country) {
|
||||
function getDistricts(city) {
|
||||
crudAjax('id=' + city, '/ajax/getDistricts', 'POST', function (callback) {
|
||||
cities = callback;
|
||||
$('select[name="default_district"]').html("<option>" + pick_option + "</option>");
|
||||
$('select[name="default_district"]').html("<option> value=''" + pick_option + "</option>");
|
||||
$.each(cities, function (index, value) {
|
||||
$('select[name="default_district"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||
});
|
||||
@ -52,7 +52,7 @@ function getDistricts(city) {
|
||||
function getNeighborhoods(district) {
|
||||
crudAjax('id=' + district, '/ajax/getNeighborhoods', 'POST', function (callback) {
|
||||
cities = callback;
|
||||
$('select[name="default_neighborhood"]').html("<option>" + pick_option + "</option>");
|
||||
$('select[name="default_neighborhood"]').html("<option value=''>" + pick_option + "</option>");
|
||||
$.each(cities, function (index, value) {
|
||||
$('select[name="default_neighborhood"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||
});
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
</span>
|
||||
<i class="fas fa-sort-down float-right"></i>
|
||||
</button>
|
||||
<input name="country[]" value="{% if countrySlug %}{{ countrySlug.id }}{% else %}{{ params.param['country']|join(',') }}{% endif %}" type="hidden" multiple>
|
||||
<input name="country[]" id="listCountryFilter" type="hidden" multiple
|
||||
value="{% if countrySlug %}{{ countrySlug.id }}{% else %}{{ params.param['country']|join(',') }}{% endif %}">
|
||||
</div>
|
||||
|
||||
<div class="col-12 px-0 py-1">
|
||||
@ -45,7 +46,7 @@
|
||||
<div class="text-muted selected-city">
|
||||
<small>{{ selected_cities_name|join(',') }}</small>
|
||||
</div>
|
||||
<input name="city[]" type="hidden"
|
||||
<input name="city[]" id="listCityFilter" type="hidden"
|
||||
value="{% if citySlug %}{{ citySlug.id }}{% else %}{{ params.param['city']|join(',') }}{% endif %}">
|
||||
</div>
|
||||
<div class="col-12 px-0 py-1">
|
||||
|
||||
@ -73,7 +73,7 @@ function Locations(cat, level, name){
|
||||
url: "/class/ajax",
|
||||
success: function(msg){
|
||||
$('select[name="'+name+'"]').find('option').remove();
|
||||
$('select[name="'+name+'"]').append('<option value="">Choose an option...</option>');
|
||||
$('select[name="'+name+'"]').append('<option value="">' + chooseOptionTrans + '...</option>');
|
||||
$.each(msg, function(key, value){
|
||||
$('select[name="'+name+'"]').append('<option value="'+value.id+'">'+value.name+'</option>');
|
||||
});
|
||||
|
||||
@ -375,6 +375,9 @@ return [
|
||||
'password' => [
|
||||
'name' => 'Password',
|
||||
],
|
||||
'old_password' => [
|
||||
'name' => 'Old password',
|
||||
],
|
||||
'new_password' => [
|
||||
'name' => 'New password',
|
||||
],
|
||||
|
||||
@ -29,6 +29,7 @@ return [
|
||||
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
|
||||
'required_all' => "All Field is Required!",
|
||||
'can_not_remove_filled_fields' => "You can not remove filled fields!",
|
||||
'wrong_password' => "The password you entered is not correct!",
|
||||
|
||||
// Forgot Password
|
||||
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
||||
|
||||
@ -236,6 +236,12 @@
|
||||
|
||||
{{ passwordForm.open()|raw }}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.old_password.name") }}</label>
|
||||
{{ passwordForm.fields.old_password.input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label>
|
||||
|
||||
@ -6,6 +6,13 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
class PasswordFormBuilder extends FormBuilder
|
||||
{
|
||||
protected $fields = [
|
||||
'old_password' => [
|
||||
'type' => 'anomaly.field_type.text',
|
||||
'required' => true,
|
||||
'config' => [
|
||||
'type' => 'password'
|
||||
],
|
||||
],
|
||||
'new_password' => [
|
||||
'type' => 'anomaly.field_type.text',
|
||||
'required' => true,
|
||||
|
||||
@ -4,6 +4,7 @@ use Anomaly\Streams\Platform\Message\MessageBag;
|
||||
use Anomaly\UsersModule\User\User;
|
||||
use Anomaly\UsersModule\User\UserPassword;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class PasswordFormHandler
|
||||
{
|
||||
@ -20,6 +21,11 @@ class PasswordFormHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Hash::check($builder->getPostValue('old_password'), \auth()->user()->password)) {
|
||||
$messages->error(trans('visiosoft.module.profile::message.wrong_password'));
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
if ($builder->getPostValue('new_password') != $builder->getPostValue('re_new_password')) {
|
||||
$messages->error(trans('visiosoft.module.profile::message.password_do_not_match'));
|
||||
return redirect()->back();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user