Fix installation link on the purchased modules list (#6434)

This commit is contained in:
Yuriy Bakhtin 2023-07-17 12:55:29 +04:00 committed by GitHub
parent cc29276c51
commit 36c4cff0a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -136,6 +136,7 @@ humhub.module('marketplace', function (module, require, $) {
const installButton = evt.$trigger;
const moduleId = installButton.data('module-id');
modal.global.reset();
modal.global.setHeader(module.config.text.installing);
modal.global.$.removeClass('fade');
modal.global.$.find('button[data-modal-close]').hide();

View File

@ -3,6 +3,7 @@
use humhub\components\Module;
use humhub\modules\marketplace\assets\Assets;
use humhub\widgets\Button;
use humhub\widgets\Link;
use yii\base\View;
use yii\helpers\Url;
use yii\helpers\Html;
@ -72,7 +73,9 @@ Assets::register($this);
<div class="module-controls">
<?php if (!Yii::$app->moduleManager->hasModule($module['id'])): ?>
<?= Html::a(Yii::t('MarketplaceModule.base', 'Install'), Url::to(['/marketplace/browse/install', 'moduleId' => $module['id']]), ['style' => 'font-weight:bold', 'data-loader' => "modal", 'data-message' => Yii::t('MarketplaceModule.base', 'Installing module...'), 'data-method' => 'POST']); ?>
<strong><?= Link::asLink(Yii::t('MarketplaceModule.base', 'Install'))
->action('marketplace.install', ['/marketplace/browse/install'])
->options(['data-module-id' => $module['id']]) ?></strong>
&middot;
<?php endif; ?>
<?= Html::a(Yii::t('MarketplaceModule.base', 'More info'), $module['marketplaceUrl'], ['target' => '_blank']); ?>