Skip to content

Commit

Permalink
Remove button ID, update admin check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
anvit committed Sep 12, 2023
1 parent dd406b0 commit c320d58
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DefaultBS2DeprecationMessageComponent extends sfComponent
{
public function execute($request)
{
$hasTranslateOrEditAccess = QubitAcl::check(QubitInformationObject, 'update')
$hasTranslateOrEditAccess = $this->context->user->isAdministrator()
|| $this->getUser()->hasGroup(QubitAclGroup::TRANSLATOR_ID)
|| $this->getUser()->hasGroup(QubitAclGroup::EDITOR_ID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<div id="bs2-deprecation-message-content">
<?php echo __('Bootstrap 2 themes have been deprecated and will be removed in a future release. Please consider switching to a Bootstrap 5 theme. %1%More info.%2%', ['%1%' => '<a href="https://www.accesstomemory.org/en/docs/latest/admin-manual/customization/theming/#bs2-update" target="_blank">', '%2%' => '</a>']); ?>
</div>
<button type="button" class="close bs2-deprecation-message-button" id="bs2-message-button">&times;</button>
<button type="button" class="close bs2-deprecation-message-button">&times;</button>
</div>
</div>
2 changes: 1 addition & 1 deletion js/bs2DeprecationMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Bs2DeprecationMessage {
constructor(element) {
this.$block = $(element);
this.$button = this.$block.find('#bs2-message-button');
this.$button = this.$block.find('button');
this.listen();
}

Expand Down

0 comments on commit c320d58

Please sign in to comment.