<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;My Wallet</div>
<div id="content">
  <div id="business_solution_leftcontent">
     <?php $this->renderPartial('left_menu');  ?>
    <?php foreach($random as $eachItem): ?>
    <div id="overview_leftimgbox"> <img src="<?php echo Yii::app()->baseUrl; ?>/media/product_images/thumbs/<?php echo ($eachItem->product_image=='')?'not_available.jpg':$eachItem->product_image; ?>" width="218" height="135" /> </div>
    <?php endforeach; ?>
  </div>
  <div id="overview_rightcontent">
    <div id="business_solution_subheadding"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;My Wallet </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'=>'wallet',
								//'enableAjaxValidation'=>true,
								//'enableClientValidation'=>true,
							)); ?>
      	<?php //echo $form->errorSummary($model); ?>
            <table width="388" border="0" cellspacing="2" cellpadding="2">
            <?php if(($model->wallet_password=='' || $model->wallet_password=null) && $model->isWalletPaswdRequested=='N') : ?>
              <tr>
                <td colspan="3" scope="row"><h1><a href="javascript:;" class="request_wallet_password">Request a wallet password</a></h1></td>
              </tr>
              <?php endif; ?>
              <tr>
                <th width="135" scope="row">Wallet Password</th>
                <td width="8">:</td>
                <td width="229">
				<?php echo $form->passwordField($model,'wallet_password',array('style'=>'top: 215px;')); ?>
				<?php echo $form->error($model,'wallet_password'); ?></td>
              </tr>
              <tr>
                <th height="56" scope="row">&nbsp;</th>
                <td>&nbsp;</td>
                <td><?php echo CHtml::submitButton('Go'); ?></td>
              </tr>
            </table>
          <?php $this->endWidget(); ?>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
$('.request_wallet_password').live('click',function(){
	var p	=	this;
	//$(this).html('<img src="images/admin/loading.gif" alt="" />')
	$.ajax({ 
          url: '<?php Yii::app()->createUrl('site/requestwallet'); ?>',
		  success: function(str){
			  alert('Request sent successfully');
		  //$(p).html(str)
		  },
			  type: 'POST',
			  cache: false,
			  //data: {autoId : id}, 
			  dataType: 'html' 
        });
	return false;
});
</script>