/**
* View
*/
var SoliloquyCustomFieldsView = Backbone.View.extend( {

	/**
    * The Tag Name and Tag's Class(es)
    */
    tagName:    'div',
    className:  'soliloquy-custom-fields',

    /**
    * Template
    * - The template to load inside the above tagName element
    */
    template:   wp.template( 'soliloquy-meta-editor-custom-fields' ),

    /**
    * Initialize
    */
    initialize: function( args ) {
		
		
        this.model = args.model;

    },

    /**
    * Render
    */
    render: function() {

        // Set the template HTML
		this.$el.html( this.template( this.model.attributes ) );
	    
	    this.$el.trigger('render');

        fpClientAdmin.initStoreGroups({
            titleSelector: this.$el.find('.setting .name'),
            inputSelector: this.$el.find('input[name^="custom_fields_meta_store_group"]')
        });
	    
	    return this;
	
	}
    
} );

// Add the view to the SoliloquyChildViews, so that it's loaded in the modal
SoliloquyChildViews.push( SoliloquyCustomFieldsView );