mirror of
https://github.com/openclassify/openclassify.git
synced 2026-03-10 10:15:28 -05:00
comment fixed
This commit is contained in:
parent
734c55b54e
commit
4365c9e8c0
@ -12,7 +12,7 @@ $(() => {
|
||||
|
||||
$('#education').on('change', () => {
|
||||
$.ajax({
|
||||
url: '/ajax/setEducation',
|
||||
url: '/api/setEducation',
|
||||
data: {
|
||||
info: 'education',
|
||||
education: $('#education').val()
|
||||
@ -31,14 +31,10 @@ $(() => {
|
||||
|
||||
$('#education_part').on('change', () => {
|
||||
$.ajax({
|
||||
url: '/ajax/setEducation',
|
||||
url: '/api/setEducation',
|
||||
data: {
|
||||
info: 'education_part',
|
||||
education: $('#education_part').val()
|
||||
}, beforeSend: function (){
|
||||
$('#education_part_option').html('');
|
||||
}, success: function (response) {
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -11,19 +11,9 @@ return [
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'education' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'education_part' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
'education_part_option' => [
|
||||
'read',
|
||||
'write',
|
||||
'delete',
|
||||
],
|
||||
];
|
||||
|
||||
@ -16,7 +16,5 @@ return [
|
||||
'corporate' => 'Corporate',
|
||||
'export' => 'Export',
|
||||
'new_education' => 'New Education',
|
||||
'new_education' => 'New Education',
|
||||
'new_education_part' => 'New Education part',
|
||||
'new_education_part_option' => 'New Education part option',
|
||||
];
|
||||
|
||||
@ -25,14 +25,6 @@ return [
|
||||
'delete' => 'Can delete education?',
|
||||
],
|
||||
],
|
||||
'education' => [
|
||||
'name' => 'Education',
|
||||
'option' => [
|
||||
'read' => 'Can read education?',
|
||||
'write' => 'Can create/edit education?',
|
||||
'delete' => 'Can delete education?',
|
||||
],
|
||||
],
|
||||
'education_part' => [
|
||||
'name' => 'Education part',
|
||||
'option' => [
|
||||
@ -41,12 +33,4 @@ return [
|
||||
'delete' => 'Can delete education part?',
|
||||
],
|
||||
],
|
||||
'education_part_option' => [
|
||||
'name' => 'Education part option',
|
||||
'option' => [
|
||||
'read' => 'Can read education part option?',
|
||||
'write' => 'Can create/edit education part option?',
|
||||
'delete' => 'Can delete education part option?',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -12,13 +12,7 @@ return [
|
||||
'education' => [
|
||||
'title' => 'Education',
|
||||
],
|
||||
'education' => [
|
||||
'title' => 'Education',
|
||||
],
|
||||
'education_part' => [
|
||||
'title' => 'Education part',
|
||||
],
|
||||
'education_part_option' => [
|
||||
'title' => 'Education part option',
|
||||
],
|
||||
];
|
||||
|
||||
@ -10,13 +10,7 @@ return [
|
||||
'education' => [
|
||||
'name' => 'Education',
|
||||
],
|
||||
'education' => [
|
||||
'name' => 'Education',
|
||||
],
|
||||
'education_part' => [
|
||||
'name' => 'Education part',
|
||||
],
|
||||
'education_part_option' => [
|
||||
'name' => 'Education part option',
|
||||
],
|
||||
];
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ trans("visiosoft.module.profile::field.education.name") }}
|
||||
</label>
|
||||
{{ profileForm.fields.education.input|raw }}
|
||||
{{ profileForm.fields.education.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
@ -179,7 +179,7 @@
|
||||
<label class="control-label font-weight-bold">
|
||||
{{ trans("visiosoft.module.profile::field.education_part.name") }}
|
||||
</label>
|
||||
{{ profileForm.fields.education_part.input|raw }}
|
||||
{{ profileForm.fields.education_part.setPlaceholder(trans('visiosoft.module.profile::field.choose_an_option')).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
@ -4,35 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
|
||||
class EducationFormBuilder extends FormBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The form fields.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $fields = [];
|
||||
|
||||
/**
|
||||
* Additional validation rules.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $rules = [];
|
||||
|
||||
/**
|
||||
* Fields to skip.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $skips = [];
|
||||
|
||||
/**
|
||||
* The form actions.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $actions = [];
|
||||
|
||||
/**
|
||||
* The form buttons.
|
||||
*
|
||||
@ -41,26 +12,4 @@ class EducationFormBuilder extends FormBuilder
|
||||
protected $buttons = [
|
||||
'cancel',
|
||||
];
|
||||
|
||||
/**
|
||||
* The form options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [];
|
||||
|
||||
/**
|
||||
* The form sections.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $sections = [];
|
||||
|
||||
/**
|
||||
* The form assets.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assets = [];
|
||||
|
||||
}
|
||||
|
||||
@ -4,28 +4,6 @@ use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class EducationTableBuilder extends TableBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The table views.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $views = [];
|
||||
|
||||
/**
|
||||
* The table filters.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $filters = [];
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $columns = [];
|
||||
|
||||
/**
|
||||
* The table buttons.
|
||||
*
|
||||
@ -43,19 +21,4 @@ class EducationTableBuilder extends TableBuilder
|
||||
protected $actions = [
|
||||
'delete'
|
||||
];
|
||||
|
||||
/**
|
||||
* The table options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [];
|
||||
|
||||
/**
|
||||
* The table assets.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assets = [];
|
||||
|
||||
}
|
||||
|
||||
@ -4,35 +4,6 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||
|
||||
class EducationPartFormBuilder extends FormBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The form fields.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $fields = [];
|
||||
|
||||
/**
|
||||
* Additional validation rules.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $rules = [];
|
||||
|
||||
/**
|
||||
* Fields to skip.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $skips = [];
|
||||
|
||||
/**
|
||||
* The form actions.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $actions = [];
|
||||
|
||||
/**
|
||||
* The form buttons.
|
||||
*
|
||||
@ -41,26 +12,4 @@ class EducationPartFormBuilder extends FormBuilder
|
||||
protected $buttons = [
|
||||
'cancel',
|
||||
];
|
||||
|
||||
/**
|
||||
* The form options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [];
|
||||
|
||||
/**
|
||||
* The form sections.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $sections = [];
|
||||
|
||||
/**
|
||||
* The form assets.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assets = [];
|
||||
|
||||
}
|
||||
|
||||
@ -4,28 +4,6 @@ use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
|
||||
|
||||
class EducationPartTableBuilder extends TableBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The table views.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $views = [];
|
||||
|
||||
/**
|
||||
* The table filters.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $filters = [];
|
||||
|
||||
/**
|
||||
* The table columns.
|
||||
*
|
||||
* @var array|string
|
||||
*/
|
||||
protected $columns = [];
|
||||
|
||||
/**
|
||||
* The table buttons.
|
||||
*
|
||||
@ -43,19 +21,4 @@ class EducationPartTableBuilder extends TableBuilder
|
||||
protected $actions = [
|
||||
'delete'
|
||||
];
|
||||
|
||||
/**
|
||||
* The table options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [];
|
||||
|
||||
/**
|
||||
* The table assets.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $assets = [];
|
||||
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ class MyProfileController extends PublicController
|
||||
|
||||
public function getEducation(Request $request)
|
||||
{
|
||||
$user = $this->userRepository->find(auth()->user()->getAuthIdentifier());
|
||||
$user = $this->userRepository->find(auth()->id());
|
||||
$education = EducationModel::all();
|
||||
$educationPart = EducationPartModel::query()->where('education_id', $user->education)->get();
|
||||
return response()->json(['user' => $user, 'education' => $education, 'education-part' => $educationPart], 200);
|
||||
@ -259,7 +259,7 @@ class MyProfileController extends PublicController
|
||||
|
||||
public function setEducation(Request $request)
|
||||
{
|
||||
$user_id = auth()->user()->getAuthIdentifier();
|
||||
$user_id = auth()->id();
|
||||
if ($request->info == 'education') {
|
||||
$user = $this->userRepository->find($user_id)->update(['education' => $request->education]);
|
||||
$education = EducationPartModel::query()->where('education_id', $request->education)->get();
|
||||
|
||||
@ -37,7 +37,7 @@ class ProfileModule extends Module
|
||||
],
|
||||
'education_part' => [
|
||||
'buttons' => [
|
||||
'new_education',
|
||||
'new_education_part',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
@ -105,6 +105,8 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
||||
],
|
||||
'profile/notification' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@notification',
|
||||
'ajax/update-user-info' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@updateAjaxProfile',
|
||||
'api/setEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@setEducation',
|
||||
'api/getEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@getEducation',
|
||||
|
||||
// UserAuthenticator
|
||||
'login-in' => 'Visiosoft\ProfileModule\Http\Controller\UserAuthenticator@attempt',
|
||||
@ -143,8 +145,6 @@ class ProfileModuleServiceProvider extends AddonServiceProvider
|
||||
|
||||
// CacheController
|
||||
'ajax/get-user-info' => 'Visiosoft\ProfileModule\Http\Controller\CacheController@getUserInfo',
|
||||
'ajax/setEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@setEducation',
|
||||
'ajax/getEducation' => 'Visiosoft\ProfileModule\Http\Controller\MyProfileController@getEducation',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -144,11 +144,6 @@ class UsersFieldsSeeder extends Seeder
|
||||
'slug' => 'education_part',
|
||||
'type' => 'anomaly.field_type.select',
|
||||
],
|
||||
[
|
||||
'name' => trans('visiosoft.module.profile::field.education_part_option.name'),
|
||||
'slug' => 'education_part_option',
|
||||
'type' => 'anomaly.field_type.select',
|
||||
],
|
||||
[
|
||||
'name' => trans('visiosoft.module.profile::field.facebook_address.name'),
|
||||
'slug' => 'facebook_address',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user