Skip to content

Commit

Permalink
Send to trash fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Sep 1, 2023
1 parent 113d3d0 commit 88d8f0a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions features/personas/SubtreeEditor.feature
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ Feature: Verify that an Editor with Subtree limitations can perform all his task
| buttonName |
| Create content |
| Edit |
And the "Delete" button is not visible
And the "Send to trash" button is not visible

Scenario: I cannot edit, create or send to trash Content outside my permissions
Given I navigate to content "FolderGrandParent" of type "DedicatedFolder" in "root"
Then the buttons are disabled
| buttonName |
| Create content |
| Edit |
And the "Delete" button is not visible
And the "Send to trash" button is not visible
12 changes: 6 additions & 6 deletions src/bundle/Resources/translations/forms.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@
<note>key: location_move.move</note>
</trans-unit>
<trans-unit id="4b7b2b4de853db0d1fb1851e07f3ccc51e5713fc" resname="location_trash_form.default_trash">
<source>Send only this Content item to Trash</source>
<target state="new">Send only this Content item to Trash</target>
<source>Send only this Content item to trash</source>
<target state="new">Send only this Content item to trash</target>
<note>key: location_trash_form.default_trash</note>
</trans-unit>
<trans-unit id="796f8196b2bc086fe788e6689a6189c79b8e047e" resname="location_trash_form.trash">
<source>Delete</source>
<target state="new">Delete</target>
<source>Send to trash</source>
<target state="new">Send to trash</target>
<note>key: location_trash_form.trash</note>
</trans-unit>
<trans-unit id="2598fe0050f38f3c02014a404ed14aee248e27d1" resname="location_trash_form.trash_with_asset">
<source>Send the Content item and its related assets to Trash</source>
<target state="new">Send the Content item and its related assets to Trash</target>
<source>Send the Content item and its related assets to trash</source>
<target state="new">Send the Content item and its related assets to trash</target>
<note>key: location_trash_form.trash_with_asset</note>
</trans-unit>
<trans-unit id="f86cd366867d370b0706e250355f605e2b783229" resname="policies_delete_form.delete">
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/menu.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<note>key: content__sidebar_right__reveal</note>
</trans-unit>
<trans-unit id="9445b360492505d3a8d7be4c316e2cc62f381e03" resname="content__sidebar_right__send_to_trash">
<source>Delete</source>
<target state="new">Delete</target>
<source>Send to trash</source>
<target state="new">Send to trash</target>
<note>key: content__sidebar_right__send_to_trash</note>
</trans-unit>
<trans-unit id="0a801de04935a4bf73c70d29b6c594e1d10811cc" resname="content_create__sidebar_right__cancel">
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/sub_items.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
<note>key: bulk_delete.error.modal.table_title.users_with_nonusers</note>
</trans-unit>
<trans-unit id="530f5b1097af7206fdabc3a51ac334c933ab4909" resname="bulk_delete.popup.confirm.nonusers">
<source>Delete</source>
<target state="new">Delete</target>
<source>Send to trash</source>
<target state="new">Send to trash</target>
<note>key: bulk_delete.popup.confirm.nonusers</note>
</trans-unit>
<trans-unit id="4953b415cbb1e81833664d96e7051d0a7e3d90c8" resname="bulk_delete.popup.confirm.users_and_users_with_nonusers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ export default class SubItemsModule extends Component {
let confirmLabel = '';

if (!isUserContentItemSelected && isNonUserContentItemSelected) {
confirmLabel = Translator.trans(/*@Desc("Delete")*/ 'bulk_delete.popup.confirm.nonusers', {}, 'sub_items');
confirmLabel = Translator.trans(/*@Desc("Send to trash")*/ 'bulk_delete.popup.confirm.nonusers', {}, 'sub_items');
} else {
confirmLabel = Translator.trans(/*@Desc("Delete")*/ 'bulk_delete.popup.confirm.users_and_users_with_nonusers', {}, 'sub_items');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public function addOptions(FormInterface $form, Location $location): void
/** @Desc("Asset Fields(s)") */
$this->translator->trans('form.trash_assets.label', [], 'forms'),
'choices' => [
/** @Desc("Send only this Content item to Trash") */
/** @Desc("Send only this Content item to trash") */
$this->translator->trans('location_trash_form.default_trash', $translatorParameters, 'forms') => self::RADIO_SELECT_DEFAULT_TRASH,
/** @Desc("Send the Content item and its related assets to Trash") */
/** @Desc("Send the Content item and its related assets to trash") */
$this->translator->trans('location_trash_form.trash_with_asset', $translatorParameters, 'forms') => self::RADIO_SELECT_TRASH_WITH_ASSETS,
],
'help_multiline' => [
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Form/Type/Location/LocationTrashType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
->add(
'trash',
SubmitType::class,
['label' => /** @Desc("Delete") */ 'location_trash_form.trash']
['label' => /** @Desc("Send to trash") */ 'location_trash_form.trash']
);

$builder->get('trash_options')->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
Expand Down

0 comments on commit 88d8f0a

Please sign in to comment.