Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_XmlConnect_Adminhtml_MobileController
  • Mage_XmlConnect_Block_Adminhtml_History
  • Mage_XmlConnect_Block_Adminhtml_History_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Cache
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Images
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Preview
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Flurryanalytics
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_General
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Notification
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Payment
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Settings
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Social
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Submission_History
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Addrow
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Color
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Country
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Datetime
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Font
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Image
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Page
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Theme
  • Mage_Xmlconnect_Block_Adminhtml_Mobile_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Bool
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Type
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Androidmarket
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Istore
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Action
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Id
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Msgtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Pushtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Status
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Template
  • Mage_XmlConnect_Block_Adminhtml_Template
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Name
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview_Form
  • Mage_XmlConnect_Block_Cart
  • Mage_XmlConnect_Block_Cart_Crosssell
  • Mage_XmlConnect_Block_Cart_Info
  • Mage_XmlConnect_Block_Cart_Item_Renderer
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Review
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
  • Mage_XmlConnect_Block_Cart_Paypal_Mep_Totals
  • Mage_XmlConnect_Block_Cart_Totals
  • Mage_XmlConnect_Block_Catalog
  • Mage_XmlConnect_Block_Catalog_Category
  • Mage_XmlConnect_Block_Catalog_Category_Info
  • Mage_XmlConnect_Block_Catalog_Filters
  • Mage_XmlConnect_Block_Catalog_Product
  • Mage_XmlConnect_Block_Catalog_Product_Attributes
  • Mage_XmlConnect_Block_Catalog_Product_Gallery
  • Mage_XmlConnect_Block_Catalog_Product_List
  • Mage_XmlConnect_Block_Catalog_Product_Options
  • Mage_XmlConnect_Block_Catalog_Product_Options_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Options_Configurable
  • Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Options_Grouped
  • Mage_XmlConnect_Block_Catalog_Product_Options_Simple
  • Mage_XmlConnect_Block_Catalog_Product_Options_Virtual
  • Mage_XmlConnect_Block_Catalog_Product_Price
  • Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Price_Default
  • Mage_XmlConnect_Block_Catalog_Product_Price_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Related
  • Mage_XmlConnect_Block_Catalog_Product_Review
  • Mage_XmlConnect_Block_Catalog_Product_Review_List
  • Mage_XmlConnect_Block_Catalog_Search
  • Mage_XmlConnect_Block_Catalog_Search_Suggest
  • Mage_XmlConnect_Block_Checkout_Address_Billing
  • Mage_XmlConnect_Block_Checkout_Address_Form
  • Mage_XmlConnect_Block_Checkout_Address_Shipping
  • Mage_XmlConnect_Block_Checkout_Agreements
  • Mage_XmlConnect_Block_Checkout_Order_Review
  • Mage_XmlConnect_Block_Checkout_Order_Review_Info
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Free
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Express
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Mecl
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypaluk_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Payment_Method_List
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Payflow
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypal
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypaluk
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Pbridge_Result
  • Mage_XmlConnect_Block_Checkout_Shipping_Method_Available
  • Mage_XmlConnect_Block_Cms_Page
  • Mage_XmlConnect_Block_Configuration
  • Mage_XmlConnect_Block_Customer_Address_Form
  • Mage_XmlConnect_Block_Customer_Address_List
  • Mage_XmlConnect_Block_Customer_Form
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Boolean
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Date
  • Mage_XmlConnect_Block_Customer_Form_Renderer_File
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Image
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiline
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiselect
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Select
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Text
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Textarea
  • Mage_XmlConnect_Block_Customer_GiftcardCheck
  • Mage_XmlConnect_Block_Customer_Order_Details
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Bundle
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Default
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Downloadable
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Giftcard
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Customer_Order_Items
  • Mage_XmlConnect_Block_Customer_Order_List
  • Mage_XmlConnect_Block_Customer_Order_Totals
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance_Refunded
  • Mage_XmlConnect_Block_Customer_Order_Totals_Giftcards
  • Mage_XmlConnect_Block_Customer_Order_Totals_Tax
  • Mage_XmlConnect_Block_Customer_Storecredit
  • Mage_XmlConnect_Block_Home
  • Mage_XmlConnect_Block_Review_Form
  • Mage_XmlConnect_Block_Wishlist
  • Mage_XmlConnect_CartController
  • Mage_XmlConnect_CatalogController
  • Mage_XmlConnect_CheckoutController
  • Mage_XmlConnect_CmsController
  • Mage_XmlConnect_ConfigurationController
  • Mage_XmlConnect_Controller_Action
  • Mage_XmlConnect_CustomerController
  • Mage_XmlConnect_Helper_Android
  • Mage_XmlConnect_Helper_Catalog_Category_Image
  • Mage_XmlConnect_Helper_Customer_Form_Renderer
  • Mage_XmlConnect_Helper_Customer_Order
  • Mage_XmlConnect_Helper_Data
  • Mage_XmlConnect_Helper_Image
  • Mage_XmlConnect_Helper_Ipad
  • Mage_XmlConnect_Helper_Iphone
  • Mage_XmlConnect_Helper_Theme
  • Mage_XmlConnect_IndexController
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default
  • Mage_XmlConnect_Model_Application
  • Mage_XmlConnect_Model_Catalog_Category_Image
  • Mage_XmlConnect_Model_ConfigData
  • Mage_XmlConnect_Model_History
  • Mage_XmlConnect_Model_Mysql4_Application
  • Mage_XmlConnect_Model_Mysql4_Application_Collection
  • Mage_XmlConnect_Model_Mysql4_Cms_Page_Collection
  • Mage_XmlConnect_Model_Mysql4_ConfigData
  • Mage_XmlConnect_Model_Mysql4_ConfigData_Collection
  • Mage_XmlConnect_Model_Mysql4_Filter_Collection
  • Mage_XmlConnect_Model_Mysql4_History
  • Mage_XmlConnect_Model_Mysql4_History_Collection
  • Mage_XmlConnect_Model_Mysql4_Queue
  • Mage_XmlConnect_Model_Mysql4_Queue_Collection
  • Mage_XmlConnect_Model_Mysql4_Setup
  • Mage_XmlConnect_Model_Mysql4_Template
  • Mage_XmlConnect_Model_Mysql4_Template_Collection
  • Mage_XmlConnect_Model_Observer
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Config
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mecl
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mep
  • Mage_XmlConnect_Model_Paypal_Mecl_Checkout
  • Mage_XmlConnect_Model_Paypal_Mep_Checkout
  • Mage_XmlConnect_Model_Preview_Abstract
  • Mage_XmlConnect_Model_Preview_Android
  • Mage_XmlConnect_Model_Preview_Ipad
  • Mage_XmlConnect_Model_Preview_Iphone
  • Mage_XmlConnect_Model_Queue
  • Mage_XmlConnect_Model_Resource_Application
  • Mage_XmlConnect_Model_Resource_Application_Collection
  • Mage_XmlConnect_Model_Resource_Cms_Page_Collection
  • Mage_XmlConnect_Model_Resource_ConfigData
  • Mage_XmlConnect_Model_Resource_ConfigData_Collection
  • Mage_XmlConnect_Model_Resource_Filter_Collection
  • Mage_XmlConnect_Model_Resource_History
  • Mage_XmlConnect_Model_Resource_History_Collection
  • Mage_XmlConnect_Model_Resource_Queue
  • Mage_XmlConnect_Model_Resource_Queue_Collection
  • Mage_XmlConnect_Model_Resource_Setup
  • Mage_XmlConnect_Model_Resource_Template
  • Mage_XmlConnect_Model_Resource_Template_Collection
  • Mage_XmlConnect_Model_Simplexml_Element
  • Mage_XmlConnect_Model_Simplexml_Form
  • Mage_XmlConnect_Model_Simplexml_Form_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Checkbox
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Collection
  • Mage_XmlConnect_Model_Simplexml_Form_Element_CountryListSelect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Date
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Email
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset
  • Mage_XmlConnect_Model_Simplexml_Form_Element_File
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Image
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiline
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiselect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Select
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Text
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Textarea
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Rule
  • Mage_XmlConnect_Model_Tabs
  • Mage_XmlConnect_Model_Template
  • Mage_XmlConnect_Model_Theme
  • Mage_XmlConnect_Paypal_MeclController
  • Mage_XmlConnect_Paypal_MepController
  • Mage_XmlConnect_PbridgeController
  • Mage_XmlConnect_ReviewController
  • Mage_XmlConnect_WishlistController

Interfaces

  • Mage_XmlConnect_Model_Simplexml_Form_Element_Renderer_Interface
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  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/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_XmlConnect
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: /**
 28:  * Device submission container block
 29:  *
 30:  * @category    Mage
 31:  * @package     Mage_XmlConnect
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: class Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container_Submission
 35:     extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
 36:     implements Mage_Adminhtml_Block_Widget_Tab_Interface
 37: {
 38: 
 39:      /**
 40:      * Constructor
 41:      * Setting view parameters
 42:      */
 43:     public function __construct()
 44:     {
 45:         parent::__construct();
 46:         $this->setShowGlobalIcon(true);
 47:     }
 48: 
 49:     /**
 50:      * Adding preview for images if application was submitted(so we have saved images)
 51:      *
 52:      * @return Mage_Core_Block_Abstract
 53:      */
 54:     protected function _prepareLayout()
 55:     {
 56:         $block = $this->getLayout()->createBlock('adminhtml/template')
 57:             ->setTemplate('xmlconnect/submission/app_icons_preview.phtml')
 58:             ->setImages(Mage::helper('xmlconnect')->getApplication()->getImages());
 59:         $this->setChild('images', $block);
 60:         parent::_prepareLayout();
 61:     }
 62: 
 63:     /**
 64:      * Add image uploader to fieldset
 65:      *
 66:      * @param Varien_Data_Form_Element_Fieldset $fieldset
 67:      * @param string $fieldName
 68:      * @param string $title
 69:      * @param string $note
 70:      * @param string $default
 71:      * @param boolean $required
 72:      */
 73:     public function addImage($fieldset, $fieldName, $title, $note = '', $default = '', $required = false)
 74:     {
 75:         $fieldset->addField($fieldName, 'image', array(
 76:             'name'      => $fieldName,
 77:             'label'     => $title,
 78:             'note'      => !empty($note) ? $note : null,
 79:             'default_value' => $default,
 80:             'required'  => $required,
 81:         ));
 82:     }
 83: 
 84:     /**
 85:      * Prepare form before rendering HTML
 86:      *
 87:      * @return Mage_Adminhtml_Block_Widget_Form
 88:      */
 89:     protected function _prepareForm()
 90:     {
 91:         $deviceType = Mage::helper('xmlconnect')->getDeviceType();
 92:         $form = new Varien_Data_Form();
 93:         $this->setForm($form);
 94:         /** @var $app Mage_XmlConnect_Model_Application */
 95:         $app = Mage::helper('xmlconnect')->getApplication();
 96:         $form->setAction($this->getUrl('*/mobile/submission'));
 97:         $isResubmit = $app->getIsResubmitAction();
 98:         $formData = $app->getFormData();
 99: 
100:         $url = Mage::getStoreConfig('xmlconnect/mobile_application/activation_key_url');
101:         $afterElementHtml = $this->__('In order to submit your app, you need to first purchase a <a href="%s" target="_blank">%s</a> from MagentoCommerce', $url, $this->__('Activation Key'));
102:         $fieldset = $form->addFieldset('submit_keys', array('legend' => $this->__('Key')));
103:         $field = $fieldset->addField('conf[submit_text][key]', 'text', array(
104:             'name'      => 'conf[submit_text][key]',
105:             'label'     => $this->__('Activation Key'),
106:             'value'     => isset($formData['conf[submit_text][key]']) ? $formData['conf[submit_text][key]'] : null,
107:             'after_element_html' => $afterElementHtml,
108:         ));
109:         if (!$isResubmit) {
110:             $field->setRequired(true);
111:         } else {
112:             $field->setDisabled('disabled');
113:             $fieldset->addField('conf[submit_text][key]_hidden', 'hidden', array(
114:                 'name'      => 'conf[submit_text][key]',
115:                 'value'     => isset($formData['conf[submit_text][key]']) ? $formData['conf[submit_text][key]'] : null,
116:             ));
117:         }
118: 
119:         if ($isResubmit) {
120:             $url = Mage::getStoreConfig('xmlconnect/mobile_application/resubmission_key_url');
121:             $rsText = $this->__('Resubmission Key');
122:             $afterElementHtml = $this->__('In order to resubmit your app, you need to first purchase a <a href="%s" target="_blank">%s</a> from MagentoCommerce', $url, $rsText);
123: 
124:             if (isset($formData['conf[submit_text][resubmission_activation_key]'])) {
125:                 $rsKeyVal = $formData['conf[submit_text][resubmission_activation_key]'];
126:             } else {
127:                 $rsKeyVal = null;
128:             }
129: 
130:             $fieldset->addField('conf[submit_text][resubmission_activation_key]', 'text', array(
131:                 'name'     => 'conf[submit_text][resubmission_activation_key]',
132:                 'label'    => $this->__('Resubmission Key'),
133:                 'value'    => $rsKeyVal,
134:                 'required' => true,
135:                 'after_element_html' => $afterElementHtml,
136:             ));
137:         }
138: 
139:         $fieldset = $form->addFieldset('submit_general', array('legend' => $this->__('Submission Fields')));
140: 
141:         $fieldset->addField('submission_action', 'hidden', array(
142:             'name'      => 'submission_action',
143:             'value'     => '1',
144:         ));
145: 
146:         switch ($deviceType) {
147:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPHONE:
148:                 $titleLength = Mage_XmlConnect_Helper_Iphone::SUBMISSION_TITLE_LENGTH;
149:                 $descriptionLength = Mage_XmlConnect_Helper_Iphone::SUBMISSION_DESCRIPTION_LENGTH;
150:                 $descriptionNote = $this->__('Description that appears in the iTunes App Store. %s chars maximum. ', $descriptionLength);
151:                 break;
152:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPAD:
153:                 $titleLength = Mage_XmlConnect_Helper_Ipad::SUBMISSION_TITLE_LENGTH;
154:                 $descriptionLength = Mage_XmlConnect_Helper_Ipad::SUBMISSION_DESCRIPTION_LENGTH;
155:                 $descriptionNote = $this->__('Description that appears in the iTunes App Store. %s chars maximum. ', $descriptionLength);
156:                 break;
157:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_ANDROID:
158:                 $titleLength = Mage_XmlConnect_Helper_Android::SUBMISSION_TITLE_LENGTH;
159:                 $descriptionLength = Mage_XmlConnect_Helper_Android::SUBMISSION_DESCRIPTION_LENGTH;
160:                 $descriptionNote = $this->__('Description that appears in Android Market. %s chars maximum. ', $descriptionLength);
161:                 break;
162:         }
163: 
164:         $titleNote = $this->__('Name that appears beneath your app when users install it to their device. We recommend choosing a name that is 10-12 characters and that your customers will recognize. %s chars max.', $titleLength);
165: 
166:         $fieldset->addField('conf/submit_text/title', 'text', array(
167:             'name'      => 'conf[submit_text][title]',
168:             'label'     => $this->__('Title'),
169:             'maxlength' => $titleLength,
170:             'value'     => isset($formData['conf[submit_text][title]']) ? $formData['conf[submit_text][title]'] : null,
171:             'note'      => $titleNote,
172:             'required'  => true,
173:         ));
174: 
175:         if (isset($formData['conf[submit_text][description]'])) {
176:             $descrVal = $formData['conf[submit_text][description]'];
177:         } else {
178:             $descrVal = null;
179:         }
180: 
181:         $field = $fieldset->addField('conf/submit_text/description', 'textarea', array(
182:             'name'      => 'conf[submit_text][description]',
183:             'label'     => $this->__('Description'),
184:             'maxlength' => $descriptionLength,
185:             'value'     => $descrVal,
186:             'note'      => $descriptionNote,
187:             'required'  => true,
188:         ));
189:         $field->setRows(15);
190: 
191:         $fieldset->addField('conf/submit_text/contact_email', 'text', array(
192:             'name'      => 'conf[submit_text][email]',
193:             'label'     => $this->__('Contact Email'),
194:             'class'     => 'email',
195:             'maxlength' => '40',
196:             'value'     => isset($formData['conf[submit_text][email]']) ? $formData['conf[submit_text][email]'] : null,
197:             'note'      => $this->__('Administrative contact for this app and for app submission issues.'),
198:             'required'  => true,
199:         ));
200: 
201:         $fieldset->addField('conf/submit_text/price_free_label', 'label', array(
202:             'name'      => 'conf[submit_text][price_free_label]',
203:             'label'     => $this->__('Price'),
204:             'value'     => $this->__('Free'),
205:             'maxlength' => '40',
206:             'checked'   => 'checked',
207:             'note'      => $this->__('Only free apps are allowed in this version.'),
208:         ));
209: 
210:         $fieldset->addField('conf/submit_text/price_free', 'hidden', array(
211:             'name'      => 'conf[submit_text][price_free]',
212:             'value'     => '1',
213:         ));
214: 
215:         if (isset($formData['conf[submit_text][country]'])) {
216:             $selected = explode(',', $formData['conf[submit_text][country]']);
217:         } else {
218:             $selected = null;
219:         }
220: 
221:         $deviceHelper = Mage::helper('xmlconnect')->getDeviceHelper();
222:         $fieldset->addType('country', 'Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Country');
223:         $fieldset->addField('conf/submit_text/country', 'country', array(
224:             'id'                => 'submission-countries',
225:             'name'              => 'conf[submit_text][country][]',
226:             'label'             => $deviceHelper->getCountryLabel(),
227:             'values'            => Mage::helper('xmlconnect')->getCountryOptionsArray(),
228:             'value'             => $selected,
229:             'note'              => $this->__('Make this app available in the following territories'),
230:             'columns'           => $deviceHelper->getCountryColumns(),
231:             'place_name_left'   => $deviceHelper->isCountryNamePlaceLeft(),
232:             'class'             => $deviceHelper->getCountryClass(),
233:             'required'          => true,
234:         ))
235:         ->setRenderer($deviceHelper->getCountryRenderer());
236: 
237:         if (isset($formData['conf[submit_text][copyright]'])) {
238:             $copyVal = $formData['conf[submit_text][copyright]'];
239:         } else {
240:             $copyVal = null;
241:         }
242: 
243:         $fieldset->addField('conf/submit_text/copyright', 'text', array(
244:             'name'      => 'conf[submit_text][copyright]',
245:             'label'     => $this->__('Copyright'),
246:             'maxlength' => '200',
247:             'value'     => $copyVal,
248:             'note'      => $this->__('Appears in the info section of your app (example: Copyright 2010 – Your Company, Inc.)'),
249:             'required'  => true,
250:         ));
251: 
252:         if ($deviceType !== Mage_XmlConnect_Helper_Data::DEVICE_TYPE_ANDROID) {
253:             if (isset($formData['conf[submit_text][keywords]'])) {
254:                 $keyWordsVal = $formData['conf[submit_text][keywords]'];
255:             } else {
256:                 $keyWordsVal = null;
257:             }
258: 
259:             $fieldset->addField('conf/submit_text/keywords', 'text', array(
260:                 'name'      => 'conf[submit_text][keywords]',
261:                 'label'     => $this->__('Keywords'),
262:                 'maxlength' => '100',
263:                 'value'     => $keyWordsVal,
264:                 'note'      => $this->__('One or more keywords that describe your app. Keywords are matched to users\' searches in the App Store and help return accurate search results. Separate multiple keywords with commas. 100 chars is maximum.'),
265:             ));
266:         }
267: 
268:         $fieldset = $form->addFieldset('submit_icons', array('legend' => $this->__('Icons')));
269: 
270:         switch ($deviceType) {
271:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPHONE:
272:                 $this->addImage($fieldset, 'conf/submit/icon', $this->__('Large iTunes Icon'),
273:                     $this->__('Large icon that appears in the iTunes App Store. You do not need to apply a gradient or soft edges (this is done automatically by Apple). Required size: 512px x 512px.'), '', true);
274: 
275:                 $this->addImage($fieldset, 'conf/submit/loader_image', $this->__('Loader Splash Screen'),
276:                     $this->__('Image that appears on first screen while your app is loading. Required size: 320px x 460px.'), '', true);
277: 
278:                 $this->addImage($fieldset, 'conf/submit/loader_image_i4', $this->__('Loader Splash Screen <br />(iPhone 4 retina)'),
279:                     $this->__('Image that appears on first screen while your app is loading. Required size: 640px x 920px.'), '', false);
280: 
281:                 $this->addImage($fieldset, 'conf/submit/logo', $this->__('Custom App Icon'),
282:                     $this->__('Icon that will appear on the user’s phone after they download your app.  You do not need to apply a gradient or soft edges (this is done automatically by Apple).  Recommended size: 57px x 57px at 72 dpi.'), '', true);
283: 
284:                 $this->addImage($fieldset, 'conf/submit/logo_i4', $this->__('Custom App Icon <br />(iPhone 4 retina)'),
285:                     $this->__('Icon that will appear on the user\'s phone after they download your app. You do not need to apply a gradient or soft edges (this is done automatically by Apple). Recommended size: 114px x 114px.'), '', false);
286: 
287:                 $this->addImage($fieldset, 'conf/submit/big_logo', $this->__('Copyright Page Logo'),
288:                     $this->__('Store logo that is displayed on copyright page of app. Preferred size: 100px x 100px.'), '', true);
289: 
290:                 $this->addImage($fieldset, 'conf/submit/big_logo_i4', $this->__('Copyright Page Logo <br />(iPhone 4 retina)'),
291:                     $this->__('Store logo that is displayed on copyright page of app. Preferred size: 200px x 200px.'), '', false);
292:                 break;
293:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPAD:
294:                 $this->addImage($fieldset, 'conf/submit/icon', $this->__('Large iTunes Icon'),
295:                     $this->__('Large icon that appears in the iTunes App Store. You do not need to apply a gradient or soft edges (this is done automatically by Apple). Required size: 512px x 512px.'), '', true);
296: 
297:                 $this->addImage($fieldset, 'conf/submit/ipad_loader_portrait_image', $this->__('Loader Splash Screen <br />(portrait mode)'),
298:                     $this->__('Image that appears on first screen while your app is loading. Required size: 768px x 1024px.'), '', true);
299: 
300:                 $this->addImage($fieldset, 'conf/submit/ipad_loader_landscape_image', $this->__('Loader Splash Screen <br />(landscape mode)'),
301:                     $this->__('Image that appears on first screen while your app is loading. Required size: 1024px x 768px.'), '', true);
302: 
303:                 $this->addImage($fieldset, 'conf/submit/ipad_logo', $this->__('Custom App Icon'),
304:                     $this->__('Icon that will appear on the user\'s device after they download your app. You do not need to apply a gradient or soft edges (this is done automatically by Apple). Recommended size: 72px x 72px.'), '', true);
305: 
306:                 $this->addImage($fieldset, 'conf/submit/big_logo', $this->__('Copyright Page Logo'),
307:                     $this->__('Store logo that is displayed on copyright page of app. Preferred size: 100px x 100px.'), '', true);
308:                 break;
309:             case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_ANDROID:
310:                 $this->addImage($fieldset, 'conf/submit/icon', $this->__('High Resolution Application Icon'),
311:                     $this->__('The icon that appears in the Android Market. Recommended size: 512px x 512px. Maximum size: 1024 KB.'), '', true);
312: 
313:                 $this->addImage($fieldset, 'conf/submit/android_loader_image', $this->__('Loader Splash Screen'),
314:                     $this->__('Image that appears on first screen while your app is loading. Required size: 320px x 455px.'), '', true);
315: 
316:                 $this->addImage($fieldset, 'conf/submit/android_logo', $this->__('Custom App Icon'),
317:                     $this->__('Icon that will appear on the user\'s device after they download your app. Recommended size: 48px x 48px.'), '', true);
318: 
319:                 $this->addImage($fieldset, 'conf/submit/big_logo', $this->__('Copyright Page Logo'),
320:                     $this->__('Store logo that is displayed on copyright page of app. Preferred size: 100px x 100px.'), '', true);
321:                 break;
322:         }
323: 
324:         return parent::_prepareForm();
325:     }
326: 
327:     /**
328:      * Prepare label for tab
329:      *
330:      * @return string
331:      */
332:     public function getTabLabel()
333:     {
334:         return $this->__('Submission');
335:     }
336: 
337:     /**
338:      * Prepare title for tab
339:      *
340:      * @return string
341:      */
342:     public function getTabTitle()
343:     {
344:         return $this->__('Submission');
345:     }
346: 
347:     /**
348:      * Returns status flag about this tab can be shown or not
349:      *
350:      * @return true
351:      */
352:     public function canShowTab()
353:     {
354:         return true;
355:     }
356: 
357:     /**
358:      * Returns status flag about this tab hidden or not
359:      *
360:      * @return false
361:      */
362:     public function isHidden()
363:     {
364:         return false;
365:     }
366: 
367:     /**
368:      * Configure image element type
369:      *
370:      * @return array
371:      */
372:     protected function _getAdditionalElementTypes()
373:     {
374:         return array(
375:             'image' => Mage::getConfig()->getBlockClassName('xmlconnect/adminhtml_mobile_helper_image'),
376:         );
377:     }
378: 
379:     /**
380:      * Prepare html output
381:      * Adding preview for images if application was submitted(so we have saved images)
382:      *
383:      * @return string
384:      */
385:     protected function _toHtml()
386:     {
387:         return parent::_toHtml() . $this->getChildHtml('images');
388:     }
389: }
390: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0