<div id="sub_menu">
<a href="index.php"> Home</a>&nbsp;&nbsp;<img src="<?php echo Yii::app()->baseUrl; ?>/images/front/1/submenu_13.jpg" width="9" height="10" />&nbsp;&nbsp;&nbsp;Redeem points</div>
<div id="content">
  <div id="business_solution_leftcontent">
    <?php $this->renderPartial('left_menu');  ?>
    <?php $this->renderPartial('pages/leftcontent'); ?>
  </div>
  <div id="overview_rightcontent">
    <div id="business_solution_subheadding"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Earn Points </div>
    <div id="view_profilebox">
	
      <div id="view_profile">
        <div style="font-family:Arial, Helvetica, sans-serif;
   font-size:13px; text-align:left;">
          <?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'reward-form',
			'enableAjaxValidation'=>false,
			'htmlOptions' => array('enctype' => 'multipart/form-data'),
		)); ?>
        <?php //echo $form->errorSummary($model); ?>
        <?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
    }
    ?>
            <table width="100%" border="0" cellspacing="0" cellpadding="10">
              <tr>
                <td width="35%"><?php echo $form->dropDownList($model,'product_id',Product::getProduct(null,null,null,true,'isIntoPromotion'),array('prompt'=>'select product')); ?><?php echo $form->error($model,'product_id'); ?></td>
                <td width="34%"><?php echo $form->textField($model,'serial_number_of_product',array('size'=>20,'maxlength'=>255,'placeholder'=>'Product Serial No:')); ?><?php echo $form->error($model,'serial_number_of_product'); ?>
                  <!-- &nbsp;<a href="#">+</a> --></td>
                <td width="31%">&nbsp;</td>
              </tr>
              <tr>
                <td><?php echo $form->labelEx($model,'end_customer_name'); ?></td>
                <td><?php echo $form->textField($model,'end_customer_name',array('size'=>20,'maxlength'=>255,'placeholder'=>'Customer name:')); ?><?php echo $form->error($model,'end_customer_name'); ?></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><?php echo $form->labelEx($model,'date_of_purchase'); ?></td>
                <td><?php
				  $this->widget('zii.widgets.jui.CJuiDatePicker', array(
	 'model'=>$model,
     'attribute'=>"date_of_purchase", // the name of the field
     'options'=>array(
            'dateFormat'=>'yy-mm-dd',
            'showAnim'=>'fold',
            'showButtonPanel'=>false,
            'yearRange'=>'1900',
     'debug'=>true,

    ),
     'htmlOptions'=>array(
     'style'=>'height:20px;'
     ),
     ));
				  ?>
                  <?php echo $form->error($model,'date_of_purchase'); ?></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><?php echo $form->labelEx($model,'invoice_number'); ?></td>
                <td><?php echo $form->textField($model,'invoice_number',array('size'=>20,'maxlength'=>255,'placeholder'=>'Invoice number:')); ?>
                <?php echo $form->error($model,'invoice_number'); ?></td>
                <td></td>
              </tr>
              <tr>
                <td><?php echo $form->labelEx($model,'invoice'); ?></td>
                <td><?php echo $form->fileField($model,'invoice'); ?>
                <?php echo $form->error($model,'invoice'); ?>
                  <span style="color:#999;">Upload photo/Scanned image of invoice</span></td>
                <td></td>
              </tr>
              <tr>
                <td><?php echo $form->checkBox($model,'agreement',array('value'=>null, 'checkValue'=>'1')); ?>
                <?php echo $form->labelEx($model,'agreement'); ?>
                <?php echo $form->error($model,'agreement'); ?>
                </td>
              </tr>
              <tr>
                <td><?php echo CHtml::submitButton('Submit'); ?></td>
              </tr>
            </table>
          <?php $this->endWidget(); ?>
        </div>
      </div>
    </div>
  </div>
</div>
