<?
$item = $this->item;
$title = 'Send Newsletter';

$this->headTitle($title, 'SET');
$this->textDelay('breadcrumbText', $title);

if($this->form){
	$form = $this->form;
} else {
    $form = new Core\Form\NewsletterForm();
}

$form
->setView($this)
->useSubFormGroup()
->setMethod('post')
->setAction($this->uri('/admin/core/newsletter/send/'))
->bind($item)
->prepare();
?>
<div class="row">
   <form <?=$this->formAttr($form)?> class="form">
   <?=$form->restful();?>
        <div class="span10">
            <div class="slate">
                <fieldset class="">
                            <div class="control-group <?=$form->isError('sender') ? 'error' : '';?> hide">
                                <?=$form->helper('sender', 'label', array('class' => 'control-label'))?>
                                <div class="controls">
                                    <?=$form->helper('sender', array('class' => 'span6'))?>        
                                    <div class="help-block"><?=$form->helper('sender', 'formElementErrors')?></div>
                                </div>
                            </div>
                            <div class="control-group <?=$form->isError('recipient') ? 'error' : '';?> hide">
                                <?=$form->helper('recipient', 'label', array('class' => 'control-label'))?>
                                <div class="controls">
                                    <?=$form->helper('recipient', array('class' => 'span6'))?>        
                                    <div class="help-block"><?=$form->helper('recipient', 'formElementErrors')?></div>
                                </div>
                            </div>
                            <div class="control-group <?=$form->isError('subject') ? 'error' : '';?>">
                                <?=$form->helper('subject', 'label', array('class' => 'control-label', 'label' => 'Newsletter Subject'))?>
                                <div class="controls">
                                    <?=$form->helper('subject', array('class' => 'span6', 'value' => ''))?>        

                                    <div class="help-block"><?=$form->helper('subject', 'formElementErrors')?></div>
                                </div>
                            </div>
                            <div class="control-group <?=$form->isError('bcc') ? 'error' : '';?>">
                                <?=$form->helper('bcc', 'label', array('class' => 'control-label', 'label' => 'Subscription Emails'), array('args' => array(null, 'abc')))?>
                                <div class="controls">
                                    <?=$form->helper('bcc', 'formTextarea', array('class' => 'span6', 'rows' => 5))?>     
                                    <div class="help-block"><?=$form->helper('bcc', 'formElementErrors')?></div>
                                </div>
                            </div>
                            <div class="control-group <?=$form->isError('content') ? 'error' : '';?>">
                                <?=$form->helper('content', 'label', array('class' => 'control-label'), array('args' => array(null, 'abc')))?>
                                <div class="controls">
                                    <?=$form->helper('content', 'formTextarea', array('class' => 'span6', 'rows' => 10))?>        
                                    <div class="help-block"><?=$form->helper('content', 'formElementErrors')?></div>
                                </div>
                            </div>
                            <div class="control-group <?=$form->isError('attachment') ? 'error' : '';?>">
                                <?=$form->helper('attachment', 'label', array('class' => 'control-label'))?>
                                <div class="controls">
                                    <?=$form->helper('attachment', array('class' => ''))?>        
                                    <div class="help-block"><?=$form->helper('attachment', 'formElementErrors')?></div>
                                </div>
                            </div>
                </fieldset>
            </div>
        </div><!--span10 end-->

        <div class="span10 listing-buttons">
            <button id="save-publish" class="btn btn-success btn-large"><?=$this->_('Send')?></button>
        </div>
    </form>
</div>
