<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$display_amount="none";
?>
<script>
    function enablemonths(){
       
	document.getElementById("rowAmount").style.display = "";
}
function disablemonths()
{
    document.getElementById("rowAmount").style.display = "none";
}

 $(document).ready(function(){
    $("#frmEditAdmin").validate({
        rules: {
            txtPlanName: {  required: true},
             txtAnnualCharge: {required: true},
             
             

        },
        messages: {
            txtPlanName: {required:"Enter Plan Description"},
            txtAnnualCharge: {required:"Enter Amount"}
           
        }
    });
}
  )
    </script>
<div class="comm_content_block">
					<h3>Plans</h3>

				</div>
<?php echo $this->message?>
<div class="comm_box">

    <form name="frmEditAdmin" id="frmEditAdmin" method="post" action="<?php echo ConfigUrl::base(); ?>index/plans">

        <table border="0" cellpadding="0" cellspacing="0"  class="form_tbls" width="100%" >

    <tr>
        <th width="30%" valign="center"> Plan Title <font color="red">*</font>&nbsp;:</th>
        <td >
            <input type="text" class="txt_area" id="txtPlanName" maxlength="100"  style="display:block;width:319px;"  name="txtPlanName" />
            
           This description will be displayed in site for user to select the plan Eg: $30 for x months listing
        </td>
         <td>
                <!--<span class="help"><a href="#" title="This description will be displayed in site for user to select the plan Eg: $30 for x months listing"><img src="<?php echo ConfigUrl::images('default')?>question_mark.jpg" border="0" height="15"></a></span>-->

         </td> 

    </tr>
     

   

       
        <tr>
            <th valign="center"> Billing Type:</th>
        <td>
        
					   <input type="radio" id="radPlanPeriodtype" name="radPlanPeriodtype" value="O" <?php if( (isset($radPlanPeriodtype) and ($radPlanPeriodtype=="M")) or $radPlanPeriodtype==""){ echo " CHECKED ";} ?>  onClick="disablemonths();">&nbsp;One Time
					   &nbsp;&nbsp;&nbsp;
						
					   <input type="radio" id="radPlanPeriodtype"  name="radPlanPeriodtype" value="M"  <?php if(isset($radPlanPeriodtype) and ($radPlanPeriodtype=="Y")){ echo " CHECKED ";} ?> onClick="enablemonths();">&nbsp;Recurring
          </td>
         </tr>
         <tr  id="rowAmount" style="display:none">

            <th>Billing Cycle: </th>

            <td><select name="months" class="selectbox">
                    <?php for($i=1;$i<25;$i++){  ?>
                    <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                    <?php }?>
                </select>
                Months
            </td>
	</tr> 
        
        <tr>
				<th>Amount (<?php echo CURRENCY?>) <font color="red">*</font>:</th>
			  	<td>
			  		<input name="txtAnnualCharge" class="txt_area" style="width:100%" type="text" size="10" maxlength="8" value="<?php echo htmlentities($txtAnnualCharge);?>">
				</td>
	</tr>
	
    
    <tr>
        <th valign="center"> Status:</th>
       <td>
			  		<input type="radio" id="statustype" name="statustype" value="E" <?php if($radPlanType=='ACTIVE' || $radPlanType==''){echo 'checked';}?>  >&nbsp;Active
					<input type="radio" id="statustype" name="statustype" value="D" <?php if($radPlanType=='INACTIVE'){echo 'checked';}?> >
					   &nbsp;Inactive
				</td>
    </tr>
    <tr>
    <th>&nbsp;</th>
    <td valign="top">
			<input type="button"  value="Back" name="cancel" class="btn_styles" onclick="window.location ='<?php echo ConfigUrl::base()?>index/listPlans'"/>
            <input type="submit"  value="Submit" name="btnProfile" class="btn_styles"/>
    </td>
    </tr>
    </table>
    </form>


    
</div>

<script type="text/javascript" src="<?php echo ConfigUrl::root()?>public/js/library/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="<?php echo ConfigUrl::root()?>public/js/library/jquery.cookie.js"></script>