This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mageplaza/2.4-develop
Clean code
- Loading branch information
Showing
47 changed files
with
5,516 additions
and
5,516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class ComingsoonMultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class ComingsoonMultipleImages extends MultipleImages | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = ''; | ||
$html .= $this->setMultiImgElement()->setResponse('comingsoon')->toHtml(); | ||
|
||
return $html; | ||
} | ||
} | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class ComingsoonMultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class ComingsoonMultipleImages extends MultipleImages | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = ''; | ||
$html .= $this->setMultiImgElement()->setResponse('comingsoon')->toHtml(); | ||
|
||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class DatePicker | ||
* | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class DatePicker extends Field | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = $element->getElementHtml(); | ||
|
||
$html .= '<button type="button" style="display:none;" class="ui-datepicker-trigger ' | ||
. 'v-middle"></button>'; | ||
|
||
$html .= '<script type="text/javascript"> | ||
require(["jquery", "jquery/ui", "mage/calendar"], function ($) { | ||
$(document).ready(function () { | ||
$("#' . $element->getHtmlId() . '").datetimepicker({dateFormat: "m/d/y", ampm: true}); | ||
var picker = $(".ui-datepicker-trigger"); | ||
picker.removeAttr("style"); | ||
picker.click(function(){ | ||
$("#' . $element->getHtmlId() . '").focus(); | ||
}); | ||
}); | ||
}); | ||
</script>'; | ||
|
||
return $html; | ||
} | ||
} | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class DatePicker | ||
* | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class DatePicker extends Field | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = $element->getElementHtml(); | ||
|
||
$html .= '<button type="button" style="display:none;" class="ui-datepicker-trigger ' | ||
. 'v-middle"></button>'; | ||
|
||
$html .= '<script type="text/javascript"> | ||
require(["jquery", "jquery/ui", "mage/calendar"], function ($) { | ||
$(document).ready(function () { | ||
$("#' . $element->getHtmlId() . '").datetimepicker({dateFormat: "m/d/y", ampm: true}); | ||
var picker = $(".ui-datepicker-trigger"); | ||
picker.removeAttr("style"); | ||
picker.click(function(){ | ||
$("#' . $element->getHtmlId() . '").focus(); | ||
}); | ||
}); | ||
}); | ||
</script>'; | ||
|
||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class MaintenanceMultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class MaintenanceMultipleImages extends MultipleImages | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = ''; | ||
$html .= $this->setMultiImgElement()->setResponse('maintenance')->toHtml(); | ||
|
||
return $html; | ||
} | ||
} | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
/** | ||
* Class MaintenanceMultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
class MaintenanceMultipleImages extends MultipleImages | ||
{ | ||
/** | ||
* @param AbstractElement $element | ||
* | ||
* @return string | ||
*/ | ||
protected function _getElementHtml(AbstractElement $element) | ||
{ | ||
$html = ''; | ||
$html .= $this->setMultiImgElement()->setResponse('maintenance')->toHtml(); | ||
|
||
return $html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Mageplaza\BetterMaintenance\Block\Adminhtml\System\Renderer\Images; | ||
|
||
/** | ||
* Class MultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
abstract class MultipleImages extends Field | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
public function setMultiImgElement() | ||
{ | ||
return $this->_layout | ||
->createBlock(Images::class) | ||
->setTemplate('Mageplaza_BetterMaintenance::system/config/gallery.phtml') | ||
->setId('media_gallery_content') | ||
->setElement($this) | ||
->setFormName('edit_form'); | ||
} | ||
} | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://www.mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_BetterMaintenance | ||
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | ||
* @license https://www.mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\BetterMaintenance\Block\Adminhtml\System; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Mageplaza\BetterMaintenance\Block\Adminhtml\System\Renderer\Images; | ||
|
||
/** | ||
* Class MultipleImages | ||
* @package Mageplaza\BetterMaintenance\Block\Adminhtml\System | ||
*/ | ||
abstract class MultipleImages extends Field | ||
{ | ||
/** | ||
* @return mixed | ||
*/ | ||
public function setMultiImgElement() | ||
{ | ||
return $this->_layout | ||
->createBlock(Images::class) | ||
->setTemplate('Mageplaza_BetterMaintenance::system/config/gallery.phtml') | ||
->setId('media_gallery_content') | ||
->setElement($this) | ||
->setFormName('edit_form'); | ||
} | ||
} |
Oops, something went wrong.