Ext.ns('Ext.ecpack');
/**
 * Ext ECPack
 *
 * @author NOMURA Akiyuki <aki-nomura@sus4.co.jp
 */

Ext.ecpack.Contact = Ext.extend(Ext.ecpack.Base, {

    headerCfg: {
        html: 'お問い合わせ内容をご入力の上、送信ボタンを押してください。',
        style: 'padding: 10px;'
    },



    initComponent: function(){
        
        this.defaultItems = [
            {
                name: 'email',
                fieldLabel: 'Eメール',
                width: 300,
                allowBlank: false,
                vtype: 'email'
            },
            {
                xtype: 'combo',
                width: 300,
                name: 'category',
                fieldLabel: 'お問い合わせ種別',
                allowBlank: false,
                typeAhead: true,
                triggerAction: 'all',
                lazyRender:true,
                mode: 'local',
                store: {
                    xtype: 'arraystore',
                    storeId: 'contactCategoryStore',
                    fields: ['value', 'display'],
                    data: this.categoryItems
                },
                valueField: 'value',
                displayField: 'display',
                editable: false
            },
            {
                xtype: 'textarea',
                name: 'content',
                fieldLabel: 'お問い合わせ内容',
                allowBlank: false,
                height: 150,
                anchor: '95%'
            }
        ];

        Ext.apply(this, {
            url: String.format('{0}/index.php/contact/submit', Ext.ecpack.config.baseUrl)
        });

        Ext.ecpack.Contact.superclass.initComponent.call(this); 
    }



});
Ext.reg('ecpackcontact', Ext.ecpack.Contact); 

