parent category disabled control
This commit is contained in:
parent
a9c98c35ab
commit
0c59b219e1
@ -30,6 +30,7 @@ const app = new Vue({
|
||||
form: new Form('category'),
|
||||
bulk_action: new BulkAction('categories'),
|
||||
categoriesBasedTypes: null,
|
||||
selected_type: true
|
||||
}
|
||||
},
|
||||
|
||||
@ -51,6 +52,8 @@ const app = new Vue({
|
||||
return;
|
||||
}
|
||||
|
||||
this.selected_type = false;
|
||||
|
||||
this.categoriesBasedTypes = JSON.parse(this.form.categories)[event];
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
<x-form.group.select name="type" label="{{ trans_choice('general.types', 1) }}" :options="$types" :selected="config('general.types')" change="updateParentCategories" />
|
||||
|
||||
<x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="[]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" />
|
||||
<x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="[]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" v-disabled="selected_type" />
|
||||
|
||||
<x-form.input.hidden name="categories" value="{{ json_encode($categories) }}" />
|
||||
</x-slot>
|
||||
|
Loading…
x
Reference in New Issue
Block a user