Skip to content

Commit

Permalink
Merge pull request #292 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
Clean code
  • Loading branch information
haitv282 authored Oct 21, 2020
2 parents 8bbd14c + c6ebbee commit ee34018
Show file tree
Hide file tree
Showing 198 changed files with 3,317 additions and 3,317 deletions.
68 changes: 34 additions & 34 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
---
name: Bug report
about: Technical issue with the extension
labels: 'Issue'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Preconditions (*)
<!---
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
-->
1.
2.

### Steps to reproduce (*)
<!---
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
-->
1.
2.

### Expected result (*)
<!--- Tell us what do you expect to happen. -->
1. [Screenshots, logs or description]
2.

### Actual result (*)
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.
---
name: Bug report
about: Technical issue with the extension
labels: 'Issue'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Preconditions (*)
<!---
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
-->
1.
2.

### Steps to reproduce (*)
<!---
Important: Provide a set of clear steps to reproduce this bug. We can not provide support without clear instructions on how to reproduce.
-->
1.
2.

### Expected result (*)
<!--- Tell us what do you expect to happen. -->
1. [Screenshots, logs or description]
2.

### Actual result (*)
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.
38 changes: 19 additions & 19 deletions .github/ISSUE_TEMPLATE/developer-experience-issue.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: Developer experience issue
about: Issues related to customization, extensibility, modularity
labels: 'Experience'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Summary (*)
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->

### Examples (*)
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->
---
name: Developer experience issue
about: Issues related to customization, extensibility, modularity
labels: 'Experience'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Summary (*)
<!--- Describe the issue you are experiencing. Include general information, error messages, environments, and so on. -->

### Examples (*)
<!--- Provide code examples or a patch with a test (recommended) to clearly indicate the problem. -->

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->
44 changes: 22 additions & 22 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
name: Feature request
about: Request feature for development
labels: 'Feature Request'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Description (*)
<!--- Describe the feature you would like to add. -->

### Expected behavior (*)
<!--- What is the expected behavior of this feature? How is it going to work? -->

### Benefits
<!--- How do you think this feature would improve the extension? -->

### Additional information
<!--- What other information can you provide about the desired feature? -->
---
name: Feature request
about: Request feature for development
labels: 'Feature Request'

---

<!---
Fields marked with (*) are required. Please don't remove the template.
-->

### Description (*)
<!--- Describe the feature you would like to add. -->

### Expected behavior (*)
<!--- What is the expected behavior of this feature? How is it going to work? -->

### Benefits
<!--- How do you think this feature would improve the extension? -->

### Additional information
<!--- What other information can you provide about the desired feature? -->
44 changes: 22 additions & 22 deletions Block/Adminhtml/Author/CustomerGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct(
array $data = []
) {
$this->_customerCollectionFactory = $customerFactory;
$this->customerGroup = $customerGroup;
$this->customerGroup = $customerGroup;

parent::__construct($context, $backendHelper, $data);
}
Expand Down Expand Up @@ -110,41 +110,41 @@ protected function _prepareColumns()
{
$this->addColumn('customer_id', [
'header_css_class' => 'a-center',
'type' => 'radio',
'html_name' => 'customer_id',
'align' => 'center',
'index' => 'entity_id',
'filter' => false,
'sortable' => false
'type' => 'radio',
'html_name' => 'customer_id',
'align' => 'center',
'index' => 'entity_id',
'filter' => false,
'sortable' => false
]);
$this->addColumn('entity_id', [
'header' => __('ID'),
'header' => __('ID'),
'sortable' => true,
'index' => 'entity_id'
'index' => 'entity_id'
]);
$this->addColumn('firstname', [
'header' => __('First Name'),
'index' => 'firstname',
'type' => 'text',
'header' => __('First Name'),
'index' => 'firstname',
'type' => 'text',
'sortable' => true,
]);
$this->addColumn('lastname', [
'header' => __('Last Name'),
'index' => 'lastname',
'type' => 'text',
'header' => __('Last Name'),
'index' => 'lastname',
'type' => 'text',
'sortable' => true,
]);
$this->addColumn('email', [
'header' => __('Email'),
'index' => 'email',
'type' => 'text',
'header' => __('Email'),
'index' => 'email',
'type' => 'text',
'sortable' => true,
]);
$this->addColumn('group_id', [
'header' => __('Group'),
'index' => 'group_id',
'type' => 'options',
'options' => $this->customerGroup->create()->toOptionHash(),
'header' => __('Group'),
'index' => 'group_id',
'type' => 'options',
'options' => $this->customerGroup->create()->toOptionHash(),
'sortable' => true,
]);

Expand Down
12 changes: 6 additions & 6 deletions Block/Adminhtml/Author/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ public function __construct(
*/
protected function _construct()
{
$this->_objectId = 'user_id';
$this->_objectId = 'user_id';
$this->_blockGroup = 'Mageplaza_Blog';
$this->_controller = 'adminhtml_author';

parent::_construct();

$this->buttonList->add('save-and-continue', [
'label' => __('Save And Continue Edit'),
'label' => __('Save And Continue Edit'),
'data_attribute' => [
'mage-init' => [
'button' => [
'event' => 'saveAndContinueEdit',
'event' => 'saveAndContinueEdit',
'target' => '#edit_form'
]
]
Expand All @@ -82,11 +82,11 @@ protected function _construct()
$this->buttonList->add(
'delete',
[
'label' => __('Delete'),
'class' => 'delete',
'label' => __('Delete'),
'class' => 'delete',
'onclick' => "setLocation('{$this->getUrl('mageplaza_blog/author/delete', [
'id' => $this->getCurrentAuthor()->getId(),
'_current' => true,
'_current' => true,
'back' => 'edit'
])}')",
],
Expand Down
6 changes: 3 additions & 3 deletions Block/Adminhtml/Author/Edit/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ protected function _prepareForm()
/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create([
'data' => [
'id' => 'edit_form',
'action' => $this->getData('action'),
'method' => 'post',
'id' => 'edit_form',
'action' => $this->getData('action'),
'method' => 'post',
'enctype' => 'multipart/form-data'
]
]);
Expand Down
Loading

0 comments on commit ee34018

Please sign in to comment.