Skip to content

Commit fe8468a

Browse files
committed
remove key
1 parent 1396377 commit fe8468a

File tree

20 files changed

+150
-313
lines changed

20 files changed

+150
-313
lines changed

Block/Adminhtml/Author/Edit.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -73,14 +73,6 @@ public function getHeaderText()
7373
}
7474
}
7575

76-
protected function _toHtml(){
77-
$this->_eventManager->dispatch(
78-
'ves_check_license',
79-
['obj' => $this,'ex'=>'Ves_Blog']
80-
);
81-
return parent::_toHtml();
82-
}
83-
8476
/**
8577
* Check permission for passed action
8678
*
@@ -102,4 +94,4 @@ protected function _getSaveAndContinueUrl()
10294
{
10395
return $this->getUrl('cms/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);
10496
}
105-
}
97+
}

Block/Adminhtml/Author/Edit/Tab/Main.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -92,10 +92,7 @@ public function __construct(
9292
*/
9393
protected function _prepareForm()
9494
{
95-
$this->_eventManager->dispatch(
96-
'ves_check_license',
97-
['obj' => $this,'ex'=>'Ves_Blog']
98-
);
95+
9996
/* @var $model \Magento\Cms\Model\Page */
10097
$model = $this->_coreRegistry->registry('current_author');
10198

@@ -108,11 +105,7 @@ protected function _prepareForm()
108105
$isElementDisabled = true;
109106
}
110107
$wysiwygConfig = $this->_wysiwygConfig->getConfig(['tab_id' => $this->getTabId().time()]);
111-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
112-
$isElementDisabled = true;
113-
$wysiwygConfig['enabled'] = $wysiwygConfig['add_variables'] = $wysiwygConfig['add_widgets'] = $wysiwygConfig['add_images'] = 0;
114-
$wysiwygConfig['plugins'] = [];
115-
}
108+
116109
/** @var \Magento\Framework\Data\Form $form */
117110
$form = $this->_formFactory->create();
118111

@@ -184,7 +177,7 @@ protected function _prepareForm()
184177
'config' => $wysiwygConfig
185178
]
186179
);
187-
180+
188181
$fieldset = $form->addFieldset('contact_fieldset', ['legend' => __('Contact Info')]);
189182

190183
$fieldset->addField(

Block/Adminhtml/Category/Edit.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -107,14 +107,6 @@ protected function _isAllowedAction($resourceId)
107107
return $this->_authorization->isAllowed($resourceId);
108108
}
109109

110-
protected function _toHtml(){
111-
$this->_eventManager->dispatch(
112-
'ves_check_license',
113-
['obj' => $this,'ex'=>'Ves_Blog']
114-
);
115-
return parent::_toHtml();
116-
}
117-
118110
/**
119111
* Getter of url for "Save and Continue" button
120112
* tab_id will be replaced by desired by JS later

Block/Adminhtml/Category/Edit/Tab/Design.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -97,11 +97,6 @@ protected function _construct()
9797
*/
9898
protected function _prepareForm()
9999
{
100-
$this->_eventManager->dispatch(
101-
'ves_check_license',
102-
['obj' => $this,'ex'=>'Ves_Blog']
103-
);
104-
105100
/*
106101
* Checking if user have permissions to save information
107102
*/
@@ -110,9 +105,6 @@ protected function _prepareForm()
110105
} else {
111106
$isElementDisabled = true;
112107
}
113-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
114-
$isElementDisabled = true;
115-
}
116108

117109
/** @var \Magento\Framework\Data\Form $form */
118110
$form = $this->_formFactory->create(['data' => ['html_id_prefix' => 'category_']]);

Block/Adminhtml/Category/Edit/Tab/Main.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -111,12 +111,6 @@ public function drawSpaces($cats){
111111
*/
112112
protected function _prepareForm()
113113
{
114-
115-
$this->_eventManager->dispatch(
116-
'ves_check_license',
117-
['obj' => $this,'ex'=>'Ves_Blog']
118-
);
119-
120114
/* @var $model \Magento\Cms\Model\Page */
121115
$model = $this->_coreRegistry->registry('blog_category');
122116

@@ -129,11 +123,7 @@ protected function _prepareForm()
129123
$isElementDisabled = true;
130124
}
131125
$wysiwygConfig = $this->_wysiwygConfig->getConfig(['tab_id' => $this->getTabId().time()]);
132-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
133-
$isElementDisabled = true;
134-
$wysiwygConfig['enabled'] = $wysiwygConfig['add_variables'] = $wysiwygConfig['add_widgets'] = $wysiwygConfig['add_images'] = 0;
135-
$wysiwygConfig['plugins'] = [];
136-
}
126+
137127
/** @var \Magento\Framework\Data\Form $form */
138128
$form = $this->_formFactory->create();
139129

Block/Adminhtml/Category/Edit/Tab/Meta.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -29,10 +29,6 @@ class Meta extends \Magento\Backend\Block\Widget\Form\Generic implements \Magent
2929
*/
3030
protected function _prepareForm()
3131
{
32-
$this->_eventManager->dispatch(
33-
'ves_check_license',
34-
['obj' => $this,'ex'=>'Ves_Blog']
35-
);
3632
/*
3733
* Checking if user have permissions to save information
3834
*/
@@ -41,9 +37,7 @@ protected function _prepareForm()
4137
} else {
4238
$isElementDisabled = true;
4339
}
44-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
45-
$isElementDisabled = true;
46-
}
40+
4741
/** @var \Magento\Framework\Data\Form $form */
4842
$form = $this->_formFactory->create();
4943

Block/Adminhtml/Comment/Edit.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -116,14 +116,6 @@ protected function _getSaveAndContinueUrl()
116116
return $this->getUrl('cms/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);
117117
}
118118

119-
protected function _toHtml(){
120-
$this->_eventManager->dispatch(
121-
'ves_check_license',
122-
['obj' => $this,'ex'=>'Ves_Blog']
123-
);
124-
return parent::_toHtml();
125-
}
126-
127119
/**
128120
* Prepare layout
129121
*
@@ -154,4 +146,4 @@ function toggleEditor() {
154146
";
155147
return parent::_prepareLayout();
156148
}
157-
}
149+
}

Block/Adminhtml/Comment/Edit/Tab/Main.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
33
* Venustheme
4-
*
4+
*
55
* NOTICE OF LICENSE
6-
*
6+
*
77
* This source file is subject to the Venustheme.com license that is
88
* available through the world-wide-web at this URL:
99
* http://www.venustheme.com/license-agreement.html
10-
*
10+
*
1111
* DISCLAIMER
12-
*
12+
*
1313
* Do not edit or add to this file if you wish to upgrade this extension to newer
1414
* version in the future.
15-
*
15+
*
1616
* @category Venustheme
1717
* @package Ves_Blog
1818
* @copyright Copyright (c) 2016 Venustheme (http://www.venustheme.com/)
@@ -94,10 +94,6 @@ public function __construct(
9494
*/
9595
protected function _prepareForm()
9696
{
97-
$this->_eventManager->dispatch(
98-
'ves_check_license',
99-
['obj' => $this,'ex'=>'Ves_Blog']
100-
);
10197
/* @var $model \Magento\Cms\Model\Page */
10298
$model = $this->_coreRegistry->registry('current_comment');
10399

@@ -110,11 +106,6 @@ protected function _prepareForm()
110106
$isElementDisabled = true;
111107
}
112108
$wysiwygConfig = $this->_wysiwygConfig->getConfig(['tab_id' => $this->getTabId().time()]);
113-
if (!$this->getData('is_valid') && !$this->getData('local_valid')) {
114-
$isElementDisabled = true;
115-
$wysiwygConfig['enabled'] = $wysiwygConfig['add_variables'] = $wysiwygConfig['add_widgets'] = $wysiwygConfig['add_images'] = 0;
116-
$wysiwygConfig['plugins'] = [];
117-
}
118109

119110
/** @var \Magento\Framework\Data\Form $form */
120111
$form = $this->_formFactory->create();
@@ -184,9 +175,9 @@ protected function _prepareForm()
184175
);
185176

186177
$dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
187-
$fieldset->addField( 'creation_time',
178+
$fieldset->addField( 'creation_time',
188179
'date',
189-
[
180+
[
190181
'label' => __('Created On'),
191182
'title' => __('Created on'),
192183
'name' => 'creation_time',
@@ -195,7 +186,7 @@ protected function _prepareForm()
195186
'disabled' => $isElementDisabled
196187
]
197188
);
198-
189+
199190

200191
$contentField = $fieldset->addField(
201192
'content',

0 commit comments

Comments
 (0)