<?php
/* @var $this AlbumImageController */
/* @var $model AlbumImage */
/* @var $form TbActiveForm */


$this->breadcrumbs = array(
    'Albums' => array('album/admin'),
    $model->album->title => array('admin', 'album_id' => $model->album_id),
    'Upload',
);

$this->menu = array(
    array('label' => 'Manage AlbumImage', 'url' => array('admin')),
);
?>

<div class="page-header"><h1>Upload Album Image</h1></div>

<div class="col-xs-12">
    <?php
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id' => 'album-image-form',
        // Please note: When you enable ajax validation, make sure the corresponding
        // controller action is handling ajax validation correctly.
        // There is a call to performAjaxValidation() commented in generated controller code.
        // See class documentation of CActiveForm for details on this.
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
    ));
    ?>
    <!-- <p class="note">Fields with <span class="required">*</span> are required.</p> -->
    <?php echo $form->errorSummary($model); ?>
    <?php echo $form->hiddenField($model, 'album_id'); ?>
    <div class="form-group">
        <?php echo $form->label($model, 'image', array('class' => 'col-sm-3 control-label no-padding-right')); ?>
        <div class="col-sm-9">
            <?php
            $this->widget('CMultiFileUpload', array(
                'name' => 'images',
                'accept' => 'jpg|png',
                'max' => false,
                'remove' => Yii::t('admin', 'Remove'),
                    //'denied'=>'', message that is displayed when a file type is not allowed
                    //'duplicate'=>'', message that is displayed when a file appears twice
            ));
            ?>
        </div>
    </div>

    <?php echo TbHtml::formActions(array(TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::resetButton('Reset'),)); ?>

    <?php $this->endWidget(); ?>
</div>