Skip to content

Commit

Permalink
Fix #15534
Browse files Browse the repository at this point in the history
  • Loading branch information
rskrzypczak committed Dec 12, 2021
1 parent cde1fbc commit 23b9d26
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/version.php
@@ -1,7 +1,7 @@
<?php

return [
'appVersion' => '6.3.1',
'appVersion' => '6.3.2',
'patchVersion' => '2021.12.12',
'lib_roundcube' => '0.2.3',
];
38 changes: 38 additions & 0 deletions layouts/basic/modules/OSSMailView/Detail/Widget/PreviewMail.tpl
@@ -0,0 +1,38 @@
{*<!-- {[The file is published on the basis of YetiForce Public License 4.0 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} -->*}
{strip}
<!-- tpl-OSSMailView-Detail-Widget-PreviewMail -->
{assign var=WIDGET_UID value="id-{\App\Layout::getUniqueId($WIDGET['id']|cat:_)}"}
<div class="c-detail-widget js-detail-widget" data-name="{$WIDGET['label']}" data-module-name=""
data-type="{$WIDGET['type']}" data-id="{$WIDGET['id']}" data-js="container">
<div class="widgetContainer_{$key} widgetContentBlock" data-url="{\App\Purifier::encodeHtml($WIDGET['url'])}"
data-name="{$WIDGET['label']}" data-type="{$WIDGET['type']}" data-id="{$WIDGET['id']}">
<div class="c-detail-widget__header js-detail-widget-header collapsed border-bottom-0"
data-js="container|value">
<input type="hidden" name="relatedModule" value="" />
<div class="c-detail-widget__header__container d-flex align-items-center py-1">
<div class="c-detail-widget__toggle collapsed" id="{$WIDGET_UID}" data-toggle="collapse"
data-target="#{$WIDGET_UID}-collapse" aria-expanded="false" aria-controls="{$WIDGET_UID}-collapse">
<span class="u-transform_rotate-180deg mdi mdi-chevron-down" alt="{\App\Language::translate('LBL_EXPAND_BLOCK')}"></span>
</div>
<div class="c-detail-widget__header__title">
<h5 class="mb-0 text-truncate">
{\App\Language::translate($WIDGET['label'],$MODULE_NAME)}
</h5>
</div>
<div class="row inline justify-center js-hb__container ml-auto">
<button type="button" tabindex="0" class="btn js-hb__btn u-hidden-block-btn text-grey-6 py-0 px-1">
<div class="text-center col items-center justify-center row">
<i aria-hidden="true" class="mdi mdi-wrench q-icon"></i>
</div>
</button>
</div>
</div>
</div>
<div class="c-detail-widget__content js-detail-widget-collapse collapse multi-collapse pt-0"
id="{$WIDGET_UID}-collapse" data-storage-key="{$WIDGET_UID}" aria-labelledby="{$WIDGET_UID}">
<div class="js-detail-widget-content" data-js="container|value"></div>
</div>
</div>
</div>
<!-- /tpl-OSSMailView-Detail-Widget-PreviewMail -->
{/strip}
23 changes: 17 additions & 6 deletions layouts/basic/modules/Vtiger/Detail/Widget/PreviewMailConfig.tpl
Expand Up @@ -14,15 +14,26 @@
</div>
<div class="modal-body">
<div class="modal-Fields">
<div class="row">
<div class="col-md-5 marginLeftZero"><strong>{\App\Language::translate('Type widget', $QUALIFIED_MODULE)}</strong>:</div>
<div class="col-md-7">
{\App\Language::translate($TYPE, $QUALIFIED_MODULE)}
<div class="form-container-sm">
<div class="form-group form-group-sm row mb-1">
<label class="col-md-4 col-form-label">
<strong>{\App\Language::translate('Type widget', $QUALIFIED_MODULE)}</strong>:
</label>
<div class="col-md-7 py-1">
{\App\Language::translate($TYPE, $QUALIFIED_MODULE)}
</div>
</div>
<div class="form-group form-group-sm row">
<label class="col-md-4 col-form-label">
<strong>{\App\Language::translate('Label', $QUALIFIED_MODULE)}</strong>:
</label>
<div class="col-md-7 py-1">
<input name="label" class="form-control form-control-sm" type="text" value="{$WIDGETINFO['label']}" />
</div>
</div>
</div>
</div>
</div>
{include file=\App\Layout::getTemplatePath('Modals/Footer.tpl', $QUALIFIED_MODULE) BTN_SUCCESS='LBL_SAVE' BTN_DANGER='LBL_CANCEL'}
{include file=\App\Layout::getTemplatePath('Modals/Footer.tpl', $QUALIFIED_MODULE) BTN_SUCCESS='LBL_SAVE' BTN_DANGER='LBL_CANCEL'}
</form>
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions modules/Vtiger/widgets/PreviewMail.php
Expand Up @@ -10,21 +10,30 @@
*/
class Vtiger_PreviewMail_Widget extends Vtiger_Basic_Widget
{
/** {@inheritdoc} */
public $allowedModules = ['OSSMailView'];
public $dbParams = [];

/**
* Get URL.
*
* @return string
*/
public function getUrl()
{
return 'module=' . $this->Module . '&view=Sview&noloadlibs=true&record=' . $this->Record;
}

/** {@inheritdoc} */
public function getWidget()
{
$this->Config['url'] = $this->getUrl();
$this->Config['tpl'] = 'PreviewMail.tpl';

return $this->Config;
}

/** {@inheritdoc} */
public function getConfigTplName()
{
return 'PreviewMailConfig';
Expand Down

0 comments on commit 23b9d26

Please sign in to comment.