mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
commit
63dc399f8c
@ -4,12 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
|||||||
|
|
||||||
class AdvFormBuilder extends FormBuilder
|
class AdvFormBuilder extends FormBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* The form fields.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $fields = [
|
protected $fields = [
|
||||||
'name' => [
|
'name' => [
|
||||||
'translatable' => true,
|
'translatable' => true,
|
||||||
@ -65,61 +59,20 @@ class AdvFormBuilder extends FormBuilder
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $category = null;
|
protected $category = null;
|
||||||
/**
|
|
||||||
* Additional validation rules.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $rules = [];
|
protected $rules = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* Fields to skip.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $skips = [];
|
protected $skips = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* The form actions.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $actions = [];
|
protected $actions = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* The form buttons.
|
|
||||||
*
|
|
||||||
* @var array|string
|
|
||||||
*/
|
|
||||||
protected $buttons = [
|
protected $buttons = [
|
||||||
'cancel',
|
'cancel',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* The form options.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $options = [];
|
protected $options = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* The form sections.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $sections = [];
|
protected $sections = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* The form assets.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $assets = [];
|
protected $assets = [];
|
||||||
|
|
||||||
// public function setType(CategoryInterface $category)
|
|
||||||
// {
|
|
||||||
// $this->category = $category;
|
|
||||||
|
|
||||||
// return $this;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,32 +4,19 @@ use Anomaly\Streams\Platform\Addon\Module\Module;
|
|||||||
|
|
||||||
class AdvsModule extends Module
|
class AdvsModule extends Module
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* The navigation display flag.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $navigation = true;
|
protected $navigation = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon icon.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $icon = 'fa fa-plus-circle';
|
protected $icon = 'fa fa-plus-circle';
|
||||||
|
|
||||||
/**
|
|
||||||
* The module sections.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $sections = [
|
protected $sections = [
|
||||||
'advs' => [
|
'advs' => [
|
||||||
'buttons' => [
|
'buttons' => [
|
||||||
'new_adv' => [
|
'new_classified' => [
|
||||||
'href' => "/advs/create_adv",
|
'href' => "/advs/create_adv",
|
||||||
],
|
],
|
||||||
|
'new_adv' => [
|
||||||
|
'text' => 'visiosoft.module.advs::button.fast_create'
|
||||||
|
],
|
||||||
'extend_all' => [
|
'extend_all' => [
|
||||||
'href' => "/advs/extendAll/admin",
|
'href' => "/advs/extendAll/admin",
|
||||||
'icon' => 'fa fa-calendar',
|
'icon' => 'fa fa-calendar',
|
||||||
@ -54,17 +41,6 @@ class AdvsModule extends Module
|
|||||||
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
'title' => 'visiosoft.module.advs::section.assets_clear.name',
|
||||||
'href' => '/admin/assets/clear',
|
'href' => '/admin/assets/clear',
|
||||||
]
|
]
|
||||||
// 'custom_fields' => [
|
|
||||||
// 'buttons' => [
|
|
||||||
// 'new_custom_field',
|
|
||||||
// ],
|
|
||||||
// ],
|
|
||||||
// 'custom_field_advs' => [
|
|
||||||
// // 'buttons' => [
|
|
||||||
// // 'new_custom_field_adv',
|
|
||||||
// // ],
|
|
||||||
// ],
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ use Visiosoft\AdvsModule\Adv\AdvRepository;
|
|||||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||||
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
|
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
|
||||||
use Visiosoft\AdvsModule\Adv\Listeners\AddTableCategoryColumn;
|
|
||||||
use Visiosoft\AdvsModule\Http\Middleware\redirectDiffrentLang;
|
use Visiosoft\AdvsModule\Http\Middleware\redirectDiffrentLang;
|
||||||
use Visiosoft\AdvsModule\Http\Middleware\SetLang;
|
use Visiosoft\AdvsModule\Http\Middleware\SetLang;
|
||||||
use Visiosoft\AdvsModule\Listener\AddAdvsSettingsScript;
|
use Visiosoft\AdvsModule\Listener\AddAdvsSettingsScript;
|
||||||
@ -27,8 +26,6 @@ use Visiosoft\LocationModule\Village\VillageRepository;
|
|||||||
use Visiosoft\LocationModule\Village\VillageModel;
|
use Visiosoft\LocationModule\Village\VillageModel;
|
||||||
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
|
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
|
||||||
use Visiosoft\CatsModule\Category\CategoryRepository;
|
use Visiosoft\CatsModule\Category\CategoryRepository;
|
||||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
|
||||||
use Illuminate\Routing\Router;
|
|
||||||
use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface;
|
use Visiosoft\LocationModule\Country\Contract\CountryRepositoryInterface;
|
||||||
use Visiosoft\LocationModule\Country\CountryRepository;
|
use Visiosoft\LocationModule\Country\CountryRepository;
|
||||||
|
|
||||||
@ -228,25 +225,12 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $bindings = [
|
protected $bindings = [
|
||||||
// AdvsCfValuesEntryModel::class => CfValueModel::class,
|
|
||||||
// AdvsCustomFieldAdvsEntryModel::class => CustomFieldAdvModel::class,
|
|
||||||
// AdvsCustomFieldsEntryModel::class => CustomFieldModel::class,
|
|
||||||
AdvsAdvsEntryModel::class => AdvModel::class,
|
|
||||||
LocationVillageEntryModel::class => VillageModel::class,
|
LocationVillageEntryModel::class => VillageModel::class,
|
||||||
AdvsCategoriesEntryModel::class => CategoryModel::class,
|
|
||||||
AdvsAdvsEntryModel::class => AdvModel::class,
|
AdvsAdvsEntryModel::class => AdvModel::class,
|
||||||
'my_form' => AdvFormBuilder::class,
|
'my_form' => AdvFormBuilder::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon singleton bindings.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $singletons = [
|
protected $singletons = [
|
||||||
// CfValueRepositoryInterface::class => CfValueRepository::class,
|
|
||||||
// CustomFieldAdvRepositoryInterface::class => CustomFieldAdvRepository::class,
|
|
||||||
// CustomFieldRepositoryInterface::class => CustomFieldRepository::class,
|
|
||||||
AdvRepositoryInterface::class => AdvRepository::class,
|
AdvRepositoryInterface::class => AdvRepository::class,
|
||||||
VillageRepositoryInterface::class => VillageRepository::class,
|
VillageRepositoryInterface::class => VillageRepository::class,
|
||||||
CategoryRepositoryInterface::class => CategoryRepository::class,
|
CategoryRepositoryInterface::class => CategoryRepository::class,
|
||||||
@ -259,14 +243,10 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
|
|
||||||
protected $overrides = [
|
protected $overrides = [
|
||||||
'streams::form/form' => 'visiosoft.module.advs::form/form',
|
'streams::form/form' => 'visiosoft.module.advs::form/form',
|
||||||
//'streams::errors/404' => 'module::errors/404',
|
|
||||||
//'streams::errors/500' => 'module::errors/500',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function boot(AddonCollection $addonCollection, FileModel $fileModel)
|
public function boot(AddonCollection $addonCollection, FileModel $fileModel)
|
||||||
{
|
{
|
||||||
// Run extra post-boot registration logic here.
|
|
||||||
// Use method injection or commands to bring in services.
|
|
||||||
$settings_url = [
|
$settings_url = [
|
||||||
'general_settings' => [
|
'general_settings' => [
|
||||||
'title' => 'visiosoft.module.advs::button.general_settings',
|
'title' => 'visiosoft.module.advs::button.general_settings',
|
||||||
|
|||||||
@ -459,8 +459,8 @@ return [
|
|||||||
|
|
||||||
// Register page
|
// Register page
|
||||||
'accept_terms_label' => 'Koşulları kabul ediyorum.',
|
'accept_terms_label' => 'Koşulları kabul ediyorum.',
|
||||||
'accept_protection_law_label' => 'Kişisel Verilerin Korunması Kanunu hükümlerini kabul ediyorum.',
|
'accept_protection_law_label' => '<a href="' . setting_value('visiosoft.module.profile::register_protection_url') . '" target="_blank">Kişisel Verilerin Korunması Kanunu hükümlerini</a> kabul ediyorum.',
|
||||||
'accept_privacy_terms_label' => 'Gizlilik şartlarını kabul ediyorum.',
|
'accept_privacy_terms_label' => '<a href="' . setting_value('visiosoft.module.profile::register_privacy_url') . '" target="_blank">Gizlilik şartlarını</a> kabul ediyorum.',
|
||||||
'receive_sms_emails_label' => 'E-posta ve sms almak istiyorum.',
|
'receive_sms_emails_label' => 'E-posta ve sms almak istiyorum.',
|
||||||
|
|
||||||
// Register Type
|
// Register Type
|
||||||
|
|||||||
@ -160,7 +160,9 @@
|
|||||||
<select name="education" class="custom-select form-control"
|
<select name="education" class="custom-select form-control"
|
||||||
data-field="education" data-field_name="education"
|
data-field="education" data-field_name="education"
|
||||||
data-provides="anomaly.field_type.select" id="education">
|
data-provides="anomaly.field_type.select" id="education">
|
||||||
<option value="">Choose an option...</option>
|
<option value="">
|
||||||
|
{{ trans('visiosoft.module.profile::field.choose_an_option') }}
|
||||||
|
</option>
|
||||||
{% for education in setting_value('visiosoft.module.profile::education') %}
|
{% for education in setting_value('visiosoft.module.profile::education') %}
|
||||||
<option value="{{ education }}"
|
<option value="{{ education }}"
|
||||||
{{ profileForm.fields.education.value == education ? 'selected' }}>
|
{{ profileForm.fields.education.value == education ? 'selected' }}>
|
||||||
@ -178,7 +180,9 @@
|
|||||||
<select name="state_of_education" class="custom-select form-control"
|
<select name="state_of_education" class="custom-select form-control"
|
||||||
data-field="state_of_education" data-field_name="state_of_education"
|
data-field="state_of_education" data-field_name="state_of_education"
|
||||||
data-provides="anomaly.field_type.select" id="state_of_education">
|
data-provides="anomaly.field_type.select" id="state_of_education">
|
||||||
<option value="">Choose an option...</option>
|
<option value="">
|
||||||
|
{{ trans('visiosoft.module.profile::field.choose_an_option') }}
|
||||||
|
</option>
|
||||||
{% for state_of_education in setting_value('visiosoft.module.profile::state_of_education') %}
|
{% for state_of_education in setting_value('visiosoft.module.profile::state_of_education') %}
|
||||||
<option value="{{ state_of_education }}"
|
<option value="{{ state_of_education }}"
|
||||||
{{ profileForm.fields.state_of_education.value == state_of_education ? 'selected' }}>
|
{{ profileForm.fields.state_of_education.value == state_of_education ? 'selected' }}>
|
||||||
@ -196,7 +200,9 @@
|
|||||||
<select name="profession" class="custom-select form-control"
|
<select name="profession" class="custom-select form-control"
|
||||||
data-field="profession" data-field_name="profession"
|
data-field="profession" data-field_name="profession"
|
||||||
data-provides="anomaly.field_type.select" id="profession">
|
data-provides="anomaly.field_type.select" id="profession">
|
||||||
<option value="">Choose an option...</option>
|
<option value="">
|
||||||
|
{{ trans('visiosoft.module.profile::field.choose_an_option') }}
|
||||||
|
</option>
|
||||||
{% for profession in setting_value('visiosoft.module.profile::profession') %}
|
{% for profession in setting_value('visiosoft.module.profile::profession') %}
|
||||||
<option value="{{ profession }}"
|
<option value="{{ profession }}"
|
||||||
{{ profileForm.fields.profession.value == profession ? 'selected' }}>
|
{{ profileForm.fields.profession.value == profession ? 'selected' }}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user