init
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<input type="hidden" name="wp_base_url_jscolor" id="wp_base_url_jscolor" value="<?php echo $this->getViewFileUrl('WeltPixel_Backend::jscolor'); ?>" />
|
||||
</div>
|
||||
<script>
|
||||
requirejs(['jquery' ],
|
||||
function ($) {
|
||||
$(document).ready(function() {
|
||||
$('.item-weltpixel-helpcenter a').attr('href', 'https://support.weltpixel.com/hc/en-us').attr('target', '_blank');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @see \WeltPixel\Backend\Block\Adminhtml\Licenses
|
||||
*/
|
||||
?>
|
||||
<hr class="access-denied-hr"/>
|
||||
<div class="access-denied-page">
|
||||
<h2 class="page-heading"><?= $block->escapeHtml(__('Sorry, you need a valid license key to view this content.')) ?></h2>
|
||||
<strong><?= $block->escapeHtml(__('Next steps')) ?></strong>
|
||||
<ul>
|
||||
<li><span><?= $block->escapeHtml(__('If you think this is an error, make sure you added the correct license.')) ?>
|
||||
<a href="<?= $block->getLicensesUrl() ?>"><?= $block->escapeHtml(__('Check Here'));?></a>
|
||||
</span></li>
|
||||
<li><span><?= $block->escapeHtml(__('Contact us if the problem still persists.')) ?></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
$_helper = $this->helper('WeltPixel\Backend\Helper\License');
|
||||
$licenseNeeded = $_helper->getModulesListForDisplay();
|
||||
$odd = false;
|
||||
?>
|
||||
|
||||
<?php if (count($licenseNeeded)) : ?>
|
||||
<div class="license-container">
|
||||
<table class="admin__table-secondary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="license-name"><?php echo __('Name'); ?></th>
|
||||
<th class="license-key"><?php echo __('License Key'); ?></th>
|
||||
<th class="license-validity"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php foreach ($licenseNeeded as $key => $options) : ?>
|
||||
<?php $odd = !$odd; ?>
|
||||
<form action="<?php echo $this->getLicensePostUrl()?>" method="post" data-mage-init='{"validation": {"errorClass": "mage-error"}}' >
|
||||
<table class="admin__table-secondary <?php if ($odd) echo 'admin_table_filled' ?>">
|
||||
<tbody>
|
||||
<?php $licenseValidity = $_helper->isLcVd($options['license'], $options['module_name']); ?>
|
||||
<tr>
|
||||
<td class="license-name"><?php echo $options['visible_name'] ?></td>
|
||||
<td class="license-key"><?php echo $options['license'] ?></td>
|
||||
<td class="license-validity"><span class="license-status license-status-<?php echo ($licenseValidity) ? 'ok' : 'nok'; ?>"><?php echo ($licenseValidity) ? __('Valid') : __('Invalid') ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type="hidden" value="<?php echo $block->getFormKey(); ?>" name="form_key" />
|
||||
<input type="hidden" name="module_name" value="<?php echo $options['module_name'] ?>" />
|
||||
<input type="text" class="license-input" name="license" value="" data-validate="{required:true}" />
|
||||
<button title="Submit" type="submit" class="primary submit-license-btn" role="button" disabled="disabled">
|
||||
<span class="ui-button-text">
|
||||
<span><?php echo __('Submit'); ?></span>
|
||||
</span>
|
||||
</button>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<script>
|
||||
requirejs(['jquery', 'Magento_Ui/js/modal/alert', 'domReady!'],
|
||||
function ($, alert) {
|
||||
setTimeout(function(){ $('.submit-license-btn').prop('disabled', false); }, 1000);
|
||||
$('.submit-license-btn').click(function () {
|
||||
var formToSubmit = $(this).closest("form");
|
||||
if (formToSubmit.valid()) {
|
||||
var that = this;
|
||||
$(that).prop('disabled', true);
|
||||
$.ajax({
|
||||
type: formToSubmit.attr('method'),
|
||||
url: formToSubmit.attr('action'),
|
||||
data: formToSubmit.serialize(),
|
||||
success: function (data) {
|
||||
$(that).prop('disabled', false);
|
||||
if (!data.error) {
|
||||
formToSubmit.find('.license-key').html(data.license);
|
||||
formToSubmit.find('.license-validity .license-status').removeClass('license-status-ok license-status-nok').addClass(data.is_valid);
|
||||
formToSubmit.find('.license-validity .license-status').html(data.is_valid_msg);
|
||||
formToSubmit.find('.license-input').val('');
|
||||
}
|
||||
alert({
|
||||
title: '',
|
||||
content: data.message
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php else : ?>
|
||||
<div>
|
||||
<p><?php echo __('No licenses needed for current Weltpixel installed extensions.'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,38 @@
|
||||
<script>
|
||||
requirejs(['jquery' ],
|
||||
function ($) {
|
||||
$(document).ready(function() {
|
||||
var wpSubmenu = $('#menu-weltpixel-backend-weltpixel > .submenu');
|
||||
function wpAdjustMenuWidth() {
|
||||
var windowWidth = $(window).width() - 80;
|
||||
|
||||
if (wpSubmenu && wpSubmenu.length) {
|
||||
if (wpSubmenu[0].scrollWidth > windowWidth) {
|
||||
wpSubmenu.css({
|
||||
'overflow-x': 'scroll',
|
||||
'width': windowWidth - 20,
|
||||
'max-width': windowWidth - 20
|
||||
});
|
||||
} else {
|
||||
wpSubmenu.css({
|
||||
'overflow-x': 'initial',
|
||||
'width': 'initial',
|
||||
'max-width': 'initial'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wpAdjustMenuWidth();
|
||||
$(window).resize(function(){
|
||||
wpAdjustMenuWidth();
|
||||
});
|
||||
|
||||
$(wpSubmenu).on('scroll', function(event) {
|
||||
$('.action-close').css('right', ( -1 * wpSubmenu.scrollLeft()) + 'px');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$modules = $this->getModuleVersions();
|
||||
$themes = $this->getThemeVersions();
|
||||
?>
|
||||
<div class="admin__page-section-item">
|
||||
<div class="admin__page-section-item-content">
|
||||
<table class="admin__table-secondary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Name'); ?></th>
|
||||
<th><?php echo __('Enabled'); ?></th>
|
||||
<th><?php echo __('Current Version'); ?></th>
|
||||
<th><?php echo __('Latest Version'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($modules as $moduleName => $options) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="module-title"><?php echo $moduleName ?></span>
|
||||
<?php if ($options['theme_module']) : ?>
|
||||
<span class="module-theme-info">(<?php echo __('Theme module'); ?>)</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo ($options['enabled']) ? 'Yes' : 'No' ?></td>
|
||||
<td><?php echo $options['version'] ?></td>
|
||||
<td><?php echo $options['latest_version'] ?></td>
|
||||
<td><span class="rewrite-status rewrite-status-<?php echo ($options['status']) ? 'ok' : 'nok'; ?>"><?php echo $options['status_message'] ?></span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (count($themes)) : ?>
|
||||
<hr/><br/>
|
||||
<div class="admin__page-section-item">
|
||||
<div class="admin__page-section-item-title">
|
||||
<h1 class="page-title"><?php echo __('Themes'); ?></h1>
|
||||
</div>
|
||||
<div class="admin__page-section-item-content">
|
||||
<table class="admin__table-secondary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Name'); ?></th>
|
||||
<th><?php echo __('Current Version'); ?></th>
|
||||
<th><?php echo __('Latest Version'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($themes as $themeName => $options) : ?>
|
||||
<tr>
|
||||
<td><span class="module-title"><?php echo $themeName ?></span></td>
|
||||
<td><?php echo $options['version'] ?></td>
|
||||
<td><?php echo $options['latest_version'] ?></td>
|
||||
<td><span class="rewrite-status rewrite-status-<?php echo ($options['status']) ? 'ok' : 'nok'; ?>"><?php echo $options['status_message'] ?></span></td>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/** @var \WeltPixel\Backend\Helper\Developer $developerHelper */
|
||||
$developerHelper = $this->helper('WeltPixel\Backend\Helper\Developer');
|
||||
$cronjoblimit = 100;
|
||||
$scheduleCollection = $developerHelper->getLatestCronJobs($cronjoblimit);
|
||||
|
||||
?>
|
||||
<div class="col-xs-12 system-infromation-container">
|
||||
<div class="col-xs-6 information-label">Magento Mode</div>
|
||||
<div class="col-xs-6"><?php echo ucfirst($this->getMagentoMode()); ?></div>
|
||||
<div class="col-xs-6 information-label">Magento Installation Path</div>
|
||||
<div class="col-xs-6"><?php echo $this->getMagentoPath(); ?></div>
|
||||
<div class="col-xs-6 information-label">Magento Edition</div>
|
||||
<div class="col-xs-6"><?php echo $developerHelper->getMagentoEdition(); ?></div>
|
||||
<div class="col-xs-6 information-label">PHP Version</div>
|
||||
<div class="col-xs-6"><?php echo phpversion() ?></div>
|
||||
<div class="col-xs-6 information-label">Server User</div>
|
||||
<div class="col-xs-6"><?php echo $developerHelper->getCurrentServerUser(); ?></div>
|
||||
<div class="col-xs-6 information-label">Server User Group</div>
|
||||
<div class="col-xs-6"><?php echo $developerHelper->getCurrentServerUserGroup(); ?></div>
|
||||
<div class="col-xs-6 information-label">Current Time</div>
|
||||
<div class="col-xs-6"><?php echo $developerHelper->getServerTime(); ?></div>
|
||||
<div class="col-xs-6 information-label">Latest Cron Jobs (<?php echo $cronjoblimit ?>)</div>
|
||||
<div class="col-xs-6"></div>
|
||||
|
||||
<div class="col-xs-12 cronjob-header">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="job-code">Job Code</th>
|
||||
<th class="status">Status</th>
|
||||
<th class="created-at">Created At</th>
|
||||
<th class="scheduled-at">Scheduled At</th>
|
||||
<th class="executed-at">Executed At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-12 cronjob-details">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php foreach ($scheduleCollection->getItems() as $item ) : ?>
|
||||
<tr>
|
||||
<td class="job-code"><?php echo $item->getJobCode(); ?> </td>
|
||||
<td class="status"><?php echo $item->getStatus(); ?> </td>
|
||||
<td class="created-at"><?php echo $item->getCreatedAt(); ?> </td>
|
||||
<td class="scheduled-at"><?php echo $item->getScheduledAt(); ?> </td>
|
||||
<td class="executed-at"><?php echo ($item->getExecutedAt()) ? $item->getExecutedAt() : '-' ?> </td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
requirejs(['jquery'],function($) {
|
||||
$(document).ready(function() {
|
||||
$('#row_weltpixel_backend_developer_system_information_infromation_details .label').hide();
|
||||
$('#row_weltpixel_backend_developer_system_information_infromation_details .value').css('width', '100%');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<p>1. After changing theme settings make sure to clear related caches: Regenerate Pearl Theme CSS, Flush Magento Cache, Clear Browser Cache (if necessary also Flush JS/CSS Cache, Flush Catalog Images Files, Flush Cache Storage)</p>
|
||||
<p>2. Make sure you are changing the settings on the right store view, settings may be different in default config vs. storeview</p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user