Skip to content

Commit

Permalink
pkp#10444 Define modalStyle when using dialog component
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Nov 14, 2024
1 parent 3978726 commit 3bc4a9a
Show file tree
Hide file tree
Showing 45 changed files with 85 additions and 78 deletions.
2 changes: 1 addition & 1 deletion classes/controllers/grid/plugins/PluginGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'uploadPlugin'),
__('manager.plugins.upload'),
'modal_add_file'
'side-modal'
),
__('manager.plugins.upload'),
'add'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'showReviewerForm', null, $actionArgs),
__('editor.submission.addReviewer'),
'modal_add_user'
'side-modal'
),
__('editor.submission.addReviewer'),
'add_user'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function fetch($request, $template = null, $display = false)
new ConfirmationModal(
__('reviewer.aboutDueDates.text'),
__('reviewer.aboutDueDates'),
'modal_information',
'primary',
null,
'',
false
Expand Down
2 changes: 1 addition & 1 deletion controllers/api/file/linkAction/BaseAddFileLinkAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
$actionArgs
),
$wizardTitle,
'modal_add_file'
'side-modal'
);

// Configure the link action.
Expand Down
2 changes: 1 addition & 1 deletion controllers/api/file/linkAction/DeleteFileLinkAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct($request, $submissionFile, $stageId, $localeKey = 'g
null,
$this->getActionArgs($submissionFile, $stageId)
),
'modal_delete'
'negative'
),
__($localeKey),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/api/file/linkAction/EditFileLinkAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct($request, $submissionFile, $stageId)
$this->getActionArgs($submissionFile, $stageId)
),
__('grid.action.editFile'),
'modal_information'
'side-modal'
);

// Configure the file link action.
Expand Down
2 changes: 1 addition & 1 deletion controllers/api/task/SendThankYouLinkAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct($request, $modalTitle, $actionArgs)
$ajaxModal = new AjaxModal(
$router->url($request, null, null, 'editThankReviewer', null, $actionArgs),
__($modalTitle),
'modal_email'
'side-modal'
);

// Configure the link action.
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/admin/context/ContextGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'createContext', null, null),
__('admin.contexts.create'),
'modal_add_item',
'side-modal',
true,
'context',
['editContext']
Expand Down
7 changes: 4 additions & 3 deletions controllers/grid/admin/context/ContextGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editContext', null, ['rowId' => $rowId]),
__('grid.action.edit'),
'modal_edit',
'side-modal',
true,
'context',
['editContext']
Expand All @@ -67,7 +67,8 @@ public function initialize($request, $template = null)
$request->getSession(),
__('admin.contexts.confirmDelete', ['contextName' => $element->getLocalizedName()]),
null,
$router->url($request, null, null, 'deleteContext', null, ['rowId' => $rowId])
$router->url($request, null, null, 'deleteContext', null, ['rowId' => $rowId]),
'negative'
),
__('grid.action.remove'),
'delete'
Expand All @@ -88,7 +89,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, $element->getPath(), null, 'users', null),
__('manager.users'),
'modal_edit',
'side-modal',
true
),
__('manager.users'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addAnnouncementType', null, null),
__('grid.action.addAnnouncementType'),
'modal_add_item',
'side-modal',
true
),
__('grid.action.addAnnouncementType'),
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/announcements/AnnouncementTypeGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editAnnouncementType', null, $actionArgs),
__('grid.action.edit'),
'modal_edit',
'side-modal',
true
),
__('grid.action.edit'),
Expand All @@ -68,7 +68,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.remove'),
$router->url($request, null, null, 'deleteAnnouncementType', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.remove'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/eventLog/linkAction/EmailLinkAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct($request, $modalTitle, $actionArgs)
$ajaxModal = new AjaxModal(
$router->url($request, null, null, 'viewEmail', null, $actionArgs),
$modalTitle,
'modal_email'
'side-modal'
);

// Configure the link action.
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/files/LibraryFileGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addFile', null, $this->getActionArgs()),
__('grid.action.addFile'),
'modal_add_file'
'side-modal'
),
__('grid.action.addFile'),
'add'
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/files/LibraryFileGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editFile', null, $actionArgs),
__('grid.action.edit'),
'modal_edit'
'side-modal'
),
__('grid.action.edit'),
'edit'
Expand All @@ -111,7 +111,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteFile', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($request, $actionArgs, $actionLabel, $modalTitle = n
$ajaxModal = new AjaxModal(
$router->url($request, null, null, 'selectFiles', null, $actionArgs),
$modalTitle,
'modal_add_file'
'side-modal'
);

// Configure the link action.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addFile', null, $this->getActionArgs()),
__('grid.action.addFile'),
'modal_add_file'
'side-modal'
),
__('grid.action.addFile'),
'add'
Expand All @@ -90,7 +90,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'viewLibrary', null, $this->getActionArgs()),
__('grid.action.viewLibrary'),
'modal_information'
'side-modal'
),
__('grid.action.viewLibrary'),
'more_info'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addNavigationMenuItem', null, null),
__('grid.action.addNavigationMenuItem'),
'modal_add_item',
'side-modal',
true
),
__('grid.action.addNavigationMenuItem'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editNavigationMenuItem', null, $actionArgs),
__('grid.action.edit'),
'modal_edit',
'side-modal',
true
),
__('grid.action.edit'),
Expand All @@ -70,7 +70,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.remove'),
$router->url($request, null, null, 'deleteNavigationMenuItem', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.remove'),
'delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addNavigationMenu', null, null),
__('grid.action.addNavigationMenu'),
'modal_add_item',
'side-modal',
true
),
__('grid.action.addNavigationMenu'),
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/navigationMenus/NavigationMenusGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editNavigationMenu', null, $actionArgs),
__('grid.action.edit'),
'modal_edit',
'side-modal',
true
),
__('grid.action.edit'),
Expand All @@ -69,7 +69,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.remove'),
$router->url($request, null, null, 'deleteNavigationMenu', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.remove'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/plugins/PluginGalleryGridCellProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getCellActions($request, $row, $column, $position = GridHandler:
new AjaxModal(
$router->url($request, null, null, 'viewPlugin', null, ['rowId' => $row->getId() + 1]),
htmlspecialchars($element->getLocalizedName()),
'modal_information',
'side-modal',
true
),
htmlspecialchars($element->getLocalizedName()),
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/plugins/PluginGalleryGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function viewPlugin(array $args, PKPRequest $request): JSONMessage
__($installConfirmKey),
__($installActionKey),
$router->url($request, null, null, $installOp, null, ['rowId' => $request->getUserVar('rowId')]),
'modal_information'
'side-modal'
),
__($installActionKey),
null
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/plugins/PluginGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function initialize($request, $template = null)
__('manager.plugins.deleteConfirm'),
__('common.delete'),
$router->url($request, null, null, 'deletePlugin', null, $actionArgs),
'modal_delete'
'negative'
),
__('common.delete'),
'delete'
Expand All @@ -94,7 +94,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'upgradePlugin', null, $actionArgs),
__('manager.plugins.upgrade'),
'modal_upgrade'
'side-modal'
),
__('grid.action.upgrade'),
'upgrade'
Expand Down
6 changes: 3 additions & 3 deletions controllers/grid/queries/QueriesGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addQuery', null, $this->getRequestArgs()),
__('grid.action.addQuery'),
'modal_add_item'
'side-modal'
),
__('grid.action.addQuery'),
'add_item'
Expand Down Expand Up @@ -473,7 +473,7 @@ public function readQuery($args, $request)
new AjaxModal(
$router->url($request, null, null, 'editQuery', null, $actionArgs),
__('grid.action.updateQuery'),
'modal_edit'
'side-modal'
),
__('grid.action.edit'),
'edit'
Expand All @@ -489,7 +489,7 @@ public function readQuery($args, $request)
__('submission.query.leaveQuery.confirm'),
__('submission.query.leaveQuery'),
$router->url($request, null, null, 'leaveQuery', null, $actionArgs),
'modal_delete'
'negative'
),
__('submission.query.leaveQuery'),
'leaveQuery'
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/queries/QueriesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editQuery', null, $actionArgs),
__('grid.action.updateQuery'),
'modal_edit'
'side-modal'
),
__('grid.action.edit'),
'edit'
Expand All @@ -98,7 +98,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteQuery', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/queries/QueryNotesGridRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('grid.action.delete'),
$router->url($request, null, null, 'deleteNote', null, $actionArgs),
'modal_delete'
'negative'
),
__('grid.action.delete'),
'delete'
Expand Down
2 changes: 1 addition & 1 deletion controllers/grid/queries/QueryTitleGridColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getCellActions($request, $row, $position = GridHandler::GRID_ACT
new AjaxModal(
$router->url($request, null, null, 'readQuery', null, $actionArgs),
$headNote ? htmlspecialchars($headNote->title) : '—',
'modal_edit'
'side-modal'
),
($headNote?->title != '') ? htmlspecialchars($headNote->title) : '—',
null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addCategory'),
__('grid.category.add'),
'modal_manage'
'side-modal'
),
__('grid.category.add'),
'add_category'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function initialize($request, $template = null)
__('common.confirmDelete'),
__('common.delete'),
$router->url($request, null, null, 'deleteCategory', null, ['categoryId' => $categoryId]),
'modal_delete'
'negative'
),
__('grid.action.remove'),
'delete'
Expand All @@ -71,7 +71,7 @@ public function initialize($request, $template = null)
new AjaxModal(
$router->url($request, null, null, 'editCategory', null, ['categoryId' => $categoryId]),
__('grid.category.edit'),
'modal_edit'
'side-modal'
),
$category->getLocalizedTitle()
), GridRow::GRID_ACTION_POSITION_ROW_CLICK);
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/settings/genre/GenreGridHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function initialize($request, $args = null)
new AjaxModal(
$router->url($request, null, null, 'addGenre', null, $actionArgs),
__('grid.action.addGenre'),
'modal_add_item',
'side-modal',
true
),
__('grid.action.addGenre'),
Expand All @@ -92,7 +92,7 @@ public function initialize($request, $args = null)
__('grid.action.restoreDefaults.confirm'),
null,
$router->url($request, null, null, 'restoreGenres', null, $actionArgs),
'modal_delete'
'primary'
),
__('grid.action.restoreDefaults'),
'reset_default'
Expand Down
Loading

0 comments on commit 3bc4a9a

Please sign in to comment.