Skip to content

Commit e819a4b

Browse files
[6.x] Hide "Collapsible" option for bard/replicator sets (#13763)
1 parent 79f6059 commit e819a4b

5 files changed

Lines changed: 19 additions & 2 deletions

File tree

resources/js/components/blueprints/Builder.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
:initial-tabs="tabs"
3434
:errors="errors?.tabs"
3535
:can-define-localizable="canDefineLocalizable"
36+
show-section-collapsible-field
3637
@updated="tabsUpdated"
3738
/>
3839
</div>

resources/js/components/blueprints/Section.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757
<ui-field :label="__('Instructions')">
5858
<ui-input type="text" v-model="editingSection.instructions" />
5959
</ui-field>
60-
<ui-field :label="__('Collapsible')">
60+
<ui-field :label="__('Collapsible')" v-if="showCollapsibleField">
6161
<ui-switch v-model="editingSection.collapsible" />
6262
</ui-field>
63-
<ui-field :label="__('Collapsed by default')" v-if="editingSection.collapsible">
63+
<ui-field :label="__('Collapsed by default')" v-if="showCollapsibleField && editingSection.collapsible">
6464
<ui-switch v-model="editingSection.collapsed" />
6565
</ui-field>
6666
<ui-field :label="__('Icon')" v-if="showHandleField">
@@ -143,6 +143,7 @@ export default {
143143
tabId: { type: String },
144144
section: { type: Object, required: true },
145145
showHandleField: { type: Boolean, default: false },
146+
showCollapsibleField: { type: Boolean, default: false },
146147
showHideField: { type: Boolean, default: false },
147148
editText: { type: String },
148149
},

resources/js/components/blueprints/Sections.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:can-define-localizable="canDefineLocalizable"
1010
:tab-id="tabId"
1111
:show-handle-field="showSectionHandleField"
12+
:show-collapsible-field="showSectionCollapsibleField"
1213
:show-hide-field="showSectionHideField"
1314
:edit-text="editSectionText"
1415
@updated="updateSection(i, $event)"
@@ -67,6 +68,10 @@ export default {
6768
type: Boolean,
6869
default: false,
6970
},
71+
showSectionCollapsibleField: {
72+
type: Boolean,
73+
default: false,
74+
},
7075
showSectionHideField: {
7176
type: Boolean,
7277
default: false,

resources/js/components/blueprints/TabContent.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:add-section-text="addSectionText"
99
:edit-section-text="editSectionText"
1010
:show-section-handle-field="showSectionHandleField"
11+
:show-section-collapsible-field="showSectionCollapsibleField"
1112
:show-section-hide-field="showSectionHideField"
1213
:can-define-localizable="canDefineLocalizable"
1314
@updated="sectionsUpdated($event)"
@@ -36,6 +37,10 @@ export default {
3637
type: Boolean,
3738
default: false,
3839
},
40+
showSectionCollapsibleField: {
41+
type: Boolean,
42+
default: false,
43+
},
3944
showSectionHideField: {
4045
type: Boolean,
4146
default: false,

resources/js/components/blueprints/Tabs.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
:tab="tab"
3939
v-show="currentTab === tab._id"
4040
:show-section-handle-field="showSectionHandleField"
41+
:show-section-collapsible-field="showSectionCollapsibleField"
4142
:show-section-hide-field="showSectionHideField"
4243
:new-section-text="newSectionText"
4344
:edit-section-text="editSectionText"
@@ -112,6 +113,10 @@ export default {
112113
type: Boolean,
113114
default: false,
114115
},
116+
showSectionCollapsibleField: {
117+
type: Boolean,
118+
default: false,
119+
},
115120
showSectionHideField: {
116121
type: Boolean,
117122
default: false,

0 commit comments

Comments
 (0)