Merge pull request #486 from openclassify/vedat

add disabled account profile
This commit is contained in:
Fatih Alp 2020-04-15 09:32:22 +03:00 committed by GitHub
commit d96e915b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 9 deletions

View File

@ -29,5 +29,7 @@ return [
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
// Forgot Password
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!'
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
'disable_account' => 'Do you want to close your account? This operation cannot be undone.',
];

View File

@ -1,11 +1,11 @@
<?php
return [
"email" => "Eposta alanı zorunludur!",
"username" => "Kullanıcı Adı alanı zorunludur!",
"success_update" => "Profil Başarıyla Güncellendi!",
"adress_success_update" => "Adres Başarıyla Güncellendi!",
"adress_success_create" => "Adres Başarıyla Oluşturuldu!",
"email" => "Eposta alanı zorunludur!",
"username" => "Kullanıcı Adı alanı zorunludur!",
"success_update" => "Profil Başarıyla Güncellendi!",
"adress_success_update" => "Adres Başarıyla Güncellendi!",
"adress_success_create" => "Adres Başarıyla Oluşturuldu!",
"login_error" => "Giriş Bilgileri Hatalıdır.",
"login_noMail_old_user" => "Girdiğiniz e-posta adresi bulunamadı.",
"login_noMail_old_user2" => "Lütfen e-posta adresini kontrol edip tekrar deneyin.",
@ -16,7 +16,7 @@ return [
"notified_about_ads" => "Reklamlarım hakkında bildirimlere izin ver",
"receive_messages_email" => "Mesajları e-posta olarak almak istiyorum",
"no_packages_module" => "Paket Modülü Bulunamadı!",
"required_add"=> "Lütfen gerekli tüm satırları doldurun.",
"required_add" => "Lütfen gerekli tüm satırları doldurun.",
"no_extend_package" => "İlan Yayınlama Süresi paketiniz bulunamadı.",
"saved" => "Kayıt Edildi!",
'please_confirm_transaction' => 'Lütfen işlemi onaylayın',
@ -29,5 +29,8 @@ return [
'empty_password_sms_message' => 'Güvenlik sorunları nedeniyle şifrenizi değiştirdik! Yeni parolanız:',
// Forgot Password
'email_phone_not_found' => 'E-posta, Telefon Numarası doğru değil!'
'email_phone_not_found' => 'E-posta, Telefon Numarası doğru değil!',
'disable_account' => 'Hesabınızı kapatmak istiyor musunuz? Bu işlem geri alınamaz.',
];

View File

@ -26,6 +26,10 @@
</div>
</nav>
<div class="bg-dark p-2 mt-2 rounded">
<a href="/advs/create_adv" class="btn btn-success">
<i class="fas fa-plus-circle"></i>
{{ trans("theme::button.post_ad.name") }}
</a>
<a href="{{ url_route("advs::extendAll") }}" class="btn btn-primary">
{{ trans('visiosoft.module.profile::button.extend_all') }}
</a>

View File

@ -86,6 +86,15 @@
{{ userForm.actions|raw }}
</div>
{{ userForm.close()|raw }}
<div class="col-12">
<label class="text-muted">
{{ trans('visiosoft.module.profile::message.disable_account') }}
</label>
<button type="button" class="btn btn-danger float-right"
onclick="window.location.href='/profile/closeAccount'">{{ trans("visiosoft.module.profile::field.disable_account.name") }}</button>
</div>
</div>
</div>

View File

@ -79,7 +79,7 @@ class MyProfileController extends PublicController
$country = CountryModel::all();
return $this->view->make('visiosoft.module.profile::profile.detail',
compact('user','country', 'form', 'advs_count'));
compact('user', 'country', 'form', 'advs_count'));
}
@ -306,6 +306,7 @@ class MyProfileController extends PublicController
{
UsersUsersEntryModel::query()->find(Auth::id())->update(['enabled' => 0]);
Auth::logout();
return redirect('/');
}