Skip to content

Commit

Permalink
EZP-28493: Changes "Create" to "Save" button
Browse files Browse the repository at this point in the history
  • Loading branch information
webhdx committed Dec 14, 2017
1 parent ec80e80 commit 4532c71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/bundle/Resources/translations/menu.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@
<target state="new">Discard changes</target>
<note>key: role_assignment_create__sidebar_right__cancel</note>
</trans-unit>
<trans-unit id="574bac165f9c298de0c0d06801b68ec7e331658b" resname="role_assignment_create__sidebar_right__create">
<source>Create</source>
<target state="new">Create</target>
<note>key: role_assignment_create__sidebar_right__create</note>
<trans-unit id="63bb349c122da33ab95d2e395ca9a62f8050bf66" resname="role_assignment_create__sidebar_right__save">
<source>Save</source>
<target state="new">Save</target>
<note>key: role_assignment_create__sidebar_right__save</note>
</trans-unit>
<trans-unit id="ec3a03215b15b79b7db72bac312b5e59734ac99c" resname="role_create__sidebar_right__cancel">
<source>Discard changes</source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace EzSystems\EzPlatformAdminUi\Menu\Admin\Role;

use eZ\Publish\API\Repository\Exceptions as ApiExceptions;
use eZ\Publish\API\Repository\Values\User\Role;
use EzSystems\EzPlatformAdminUi\Menu\AbstractBuilder;
use EzSystems\EzPlatformAdminUi\Menu\Event\ConfigureMenuEvent;
use InvalidArgumentException;
Expand All @@ -22,7 +23,7 @@
class RoleAssignmentCreateRightSidebarBuilder extends AbstractBuilder implements TranslationContainerInterface
{
/* Menu items */
const ITEM__CREATE = 'role_assignment_create__sidebar_right__create';
const ITEM__SAVE = 'role_assignment_create__sidebar_right__save';
const ITEM__CANCEL = 'role_assignment_create__sidebar_right__cancel';

/**
Expand All @@ -44,15 +45,15 @@ protected function getConfigureEventName(): string
*/
public function createStructure(array $options): ItemInterface
{
/** @var Role $section */
/** @var Role $role */
$role = $options['role'];

/** @var ItemInterface|ItemInterface[] $menu */
$menu = $this->factory->createItem('root');

$menu->setChildren([
self::ITEM__CREATE => $this->createMenuItem(
self::ITEM__CREATE,
self::ITEM__SAVE => $this->createMenuItem(
self::ITEM__SAVE,
[
'attributes' => [
'class' => 'btn--trigger',
Expand Down Expand Up @@ -82,7 +83,7 @@ public function createStructure(array $options): ItemInterface
public static function getTranslationMessages(): array
{
return [
(new Message(self::ITEM__CREATE, 'menu'))->setDesc('Create'),
(new Message(self::ITEM__SAVE, 'menu'))->setDesc('Save'),
(new Message(self::ITEM__CANCEL, 'menu'))->setDesc('Discard changes'),
];
}
Expand Down

0 comments on commit 4532c71

Please sign in to comment.