Skip to content

Commit a7a0248

Browse files
authored
FIO-9751 updated modal edit window for components with hidden tabs (#123)
1 parent 5a24518 commit a7a0248

File tree

2 files changed

+24
-20
lines changed
  • src/templates

2 files changed

+24
-20
lines changed

src/templates/bootstrap4/builderComponent/form.ejs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@
2929
>
3030
<i class="{{ctx.iconClass('save')}}"></i>
3131
</div>
32-
<div
33-
role="button"
34-
aria-label="Edit json button. Click to edit json of the current component"
35-
tabindex="-1"
36-
class="btn btn-xxs btn-default component-settings-button component-settings-button-edit-json"
37-
ref="editJson"
38-
>
39-
<i class="{{ctx.iconClass('wrench')}}"></i>
40-
</div>
32+
{% if (ctx.editJson !== false) { %}
33+
<div
34+
role="button"
35+
aria-label="Edit json button. Click to edit json of the current component"
36+
tabindex="-1"
37+
class="btn btn-xxs btn-default component-settings-button component-settings-button-edit-json"
38+
ref="editJson"
39+
>
40+
<i class="{{ctx.iconClass('wrench')}}"></i>
41+
</div>
42+
{% } %}
4143
{% } %}
4244
<div
4345
role="button"
@@ -48,7 +50,7 @@
4850
>
4951
<i class="{{ctx.iconClass('move')}}"></i>
5052
</div>
51-
{% if (!(ctx.design && ctx.childComponent.type === 'reviewpage')) { %}
53+
{% if (!(ctx.design && ctx.childComponent.type === 'reviewpage') && ctx.editComponent) { %}
5254
<div
5355
role="button"
5456
aria-label="Edit button. Click to open component settings modal window"

src/templates/bootstrap5/builderComponent/form.ejs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@
2929
>
3030
<i class="{{ctx.iconClass('save')}}"></i>
3131
</div>
32-
<div
33-
role="button"
34-
aria-label="Edit json button. Click to edit json of the current component"
35-
tabindex="-1"
36-
class="btn btn-xxs btn-default component-settings-button component-settings-button-edit-json"
37-
ref="editJson"
38-
>
39-
<i class="{{ctx.iconClass('wrench')}}"></i>
40-
</div>
32+
{% if (ctx.editJson !== false) { %}
33+
<div
34+
role="button"
35+
aria-label="Edit json button. Click to edit json of the current component"
36+
tabindex="-1"
37+
class="btn btn-xxs btn-default component-settings-button component-settings-button-edit-json"
38+
ref="editJson"
39+
>
40+
<i class="{{ctx.iconClass('wrench')}}"></i>
41+
</div>
42+
{% } %}
4143
{% } %}
4244
<div
4345
role="button"
@@ -48,7 +50,7 @@
4850
>
4951
<i class="{{ctx.iconClass('move')}}"></i>
5052
</div>
51-
{% if (!(ctx.design && ctx.childComponent.type === 'reviewpage')) { %}
53+
{% if (!(ctx.design && ctx.childComponent.type === 'reviewpage') && ctx.editComponent) { %}
5254
<div
5355
role="button"
5456
aria-label="Edit button. Click to open component settings modal window"

0 commit comments

Comments
 (0)