Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 88bef2e

Browse files
committed
adding missing files from module creator
1 parent fdb47cc commit 88bef2e

File tree

26 files changed

+3912
-0
lines changed

26 files changed

+3912
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* Werules_Chatbot extension
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the MIT License
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/mit-license.php
11+
*
12+
* @category Werules
13+
* @package Werules_Chatbot
14+
* @copyright Copyright (c) 2017
15+
* @license http://opensource.org/licenses/mit-license.php MIT License
16+
*/
17+
/**
18+
* ChatbotAPI admin block
19+
*
20+
* @category Werules
21+
* @package Werules_Chatbot
22+
* @author Ultimate Module Creator
23+
*/
24+
class Werules_Chatbot_Block_Adminhtml_Chatbotapi extends Mage_Adminhtml_Block_Widget_Grid_Container
25+
{
26+
/**
27+
* constructor
28+
*
29+
* @access public
30+
* @return void
31+
* @author Ultimate Module Creator
32+
*/
33+
public function __construct()
34+
{
35+
$this->_controller = 'adminhtml_chatbotapi';
36+
$this->_blockGroup = 'werules_chatbot';
37+
parent::__construct();
38+
$this->_headerText = Mage::helper('werules_chatbot')->__('ChatbotAPI');
39+
$this->_updateButton('add', 'label', Mage::helper('werules_chatbot')->__('Add ChatbotAPI'));
40+
41+
}
42+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/**
3+
* Werules_Chatbot extension
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the MIT License
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/mit-license.php
11+
*
12+
* @category Werules
13+
* @package Werules_Chatbot
14+
* @copyright Copyright (c) 2017
15+
* @license http://opensource.org/licenses/mit-license.php MIT License
16+
*/
17+
/**
18+
* ChatbotAPI admin edit form
19+
*
20+
* @category Werules
21+
* @package Werules_Chatbot
22+
* @author Ultimate Module Creator
23+
*/
24+
class Werules_Chatbot_Block_Adminhtml_Chatbotapi_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
25+
{
26+
/**
27+
* constructor
28+
*
29+
* @access public
30+
* @return void
31+
* @author Ultimate Module Creator
32+
*/
33+
public function __construct()
34+
{
35+
parent::__construct();
36+
$this->_blockGroup = 'werules_chatbot';
37+
$this->_controller = 'adminhtml_chatbotapi';
38+
$this->_updateButton(
39+
'save',
40+
'label',
41+
Mage::helper('werules_chatbot')->__('Save ChatbotAPI')
42+
);
43+
$this->_updateButton(
44+
'delete',
45+
'label',
46+
Mage::helper('werules_chatbot')->__('Delete ChatbotAPI')
47+
);
48+
$this->_addButton(
49+
'saveandcontinue',
50+
array(
51+
'label' => Mage::helper('werules_chatbot')->__('Save And Continue Edit'),
52+
'onclick' => 'saveAndContinueEdit()',
53+
'class' => 'save',
54+
),
55+
-100
56+
);
57+
$this->_formScripts[] = "
58+
function saveAndContinueEdit() {
59+
editForm.submit($('edit_form').action+'back/edit/');
60+
}
61+
";
62+
}
63+
64+
/**
65+
* get the edit form header
66+
*
67+
* @access public
68+
* @return string
69+
* @author Ultimate Module Creator
70+
*/
71+
public function getHeaderText()
72+
{
73+
if (Mage::registry('current_chatbotapi') && Mage::registry('current_chatbotapi')->getId()) {
74+
return Mage::helper('werules_chatbot')->__(
75+
"Edit ChatbotAPI '%s'",
76+
$this->escapeHtml(Mage::registry('current_chatbotapi')->getChatbotapiId())
77+
);
78+
} else {
79+
return Mage::helper('werules_chatbot')->__('Add ChatbotAPI');
80+
}
81+
}
82+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/**
3+
* Werules_Chatbot extension
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the MIT License
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/mit-license.php
11+
*
12+
* @category Werules
13+
* @package Werules_Chatbot
14+
* @copyright Copyright (c) 2017
15+
* @license http://opensource.org/licenses/mit-license.php MIT License
16+
*/
17+
/**
18+
* ChatbotAPI edit form
19+
*
20+
* @category Werules
21+
* @package Werules_Chatbot
22+
* @author Ultimate Module Creator
23+
*/
24+
class Werules_Chatbot_Block_Adminhtml_Chatbotapi_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
25+
{
26+
/**
27+
* prepare form
28+
*
29+
* @access protected
30+
* @return Werules_Chatbot_Block_Adminhtml_Chatbotapi_Edit_Form
31+
* @author Ultimate Module Creator
32+
*/
33+
protected function _prepareForm()
34+
{
35+
$form = new Varien_Data_Form(
36+
array(
37+
'id' => 'edit_form',
38+
'action' => $this->getUrl(
39+
'*/*/save',
40+
array(
41+
'id' => $this->getRequest()->getParam('id')
42+
)
43+
),
44+
'method' => 'post',
45+
'enctype' => 'multipart/form-data'
46+
)
47+
);
48+
$form->setUseContainer(true);
49+
$this->setForm($form);
50+
return parent::_prepareForm();
51+
}
52+
}

0 commit comments

Comments
 (0)