Skip to content

Commit 306dc4e

Browse files
committed
[5.0] toolbar cancel or close button
The convention is that when it is a NEW item then its a cancel button and when editing an item its a close button. During the updates in #39537 it looks like @wilsonge missed a few changes etc
1 parent b2ce3a9 commit 306dc4e

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

administrator/components/com_categories/src/View/Category/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function (Toolbar $childBar) {
201201
}
202202
);
203203

204-
$toolbar->cancel('category.cancel');
204+
$toolbar->cancel('category.cancel', 'JTOOLBAR_CANCEL');
205205
} else {
206206
// If not checked out, can save the item.
207207
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.

administrator/components/com_contact/src/View/Contact/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function (Toolbar $childBar) use ($user) {
134134
);
135135
}
136136

137-
$toolbar->cancel('contact.cancel');
137+
$toolbar->cancel('contact.cancel', 'JTOOLBAR_CANCEL');
138138
} else {
139139
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
140140
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId);

administrator/components/com_fields/src/View/Field/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function (Toolbar $childBar) {
130130
$childBar->save2new('field.save2new');
131131
}
132132
);
133-
$toolbar->cancel('field.cancel');
133+
$toolbar->cancel('field.cancel', 'JTOOLBAR_CANCEL');
134134
} else {
135135
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
136136
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId);

administrator/components/com_fields/src/View/Group/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function (Toolbar $childBar) {
154154
}
155155
);
156156

157-
$toolbar->cancel('group.cancel');
157+
$toolbar->cancel('group.cancel', 'JTOOLBAR_CANCEL');
158158
} else {
159159
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
160160
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId);

administrator/components/com_finder/src/View/Filter/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function (Toolbar $childBar) {
140140
);
141141
}
142142

143-
$toolbar->cancel('filter.cancel');
143+
$toolbar->cancel('filter.cancel', 'JTOOLBAR_CANCEL');
144144
} else {
145145
// Can't save the record if it's checked out.
146146
// Since it's an existing record, check the edit permission.

administrator/components/com_languages/src/View/Language/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function (Toolbar $childBar) use ($canDo, $isNew) {
121121
);
122122

123123
if ($isNew) {
124-
$toolbar->cancel('language.cancel');
124+
$toolbar->cancel('language.cancel', 'JTOOLBAR_CANCEL');
125125
} else {
126126
$toolbar->cancel('language.cancel');
127127
}

0 commit comments

Comments
 (0)