<?php require_once './utility/texteditor_utility.php';?>
<?php
$req = $_POST['List'];
if(empty($req)){
		$req ="Add";
}
$ctrl_name = BASE_URL."/sections";
$page_name = BASE_URL."/sections/".$req;
$num = $cnt;
?>
<style>
		.black_overlay{
			display: none;
			position:fixed;
			top: 0%;
			left: 0%;
			width: 100%;
			height: 100%;
			background-color: black;
			z-index:1001;
			-moz-opacity: 0.7;
			opacity:.70;
			filter: alpha(opacity=70);
		}
		.white_content {
			display: none;
			position:fixed;
			top: 30%;
			left: 32%;
			width: 470px;
			height: 600px;
			z-index:1002;
			overflow: auto;
		}
</style>
<h1 class="page-header">WelcomeText</h1>          
<div class="bs-example table-responsive">
	<table align="center" width="100%" border="0">    	
    	 <?php if(!empty($error_msg)) {?>     
            <tr>
                <td align="center">  
                  <div class="col-lg-8 alert alert-danger" style="clear:right">
                    <?php echo $error_msg;?>
                 </div>             
                </td>
             </tr>   
			 
         <?php } ?> 
		 	<tr>
                <td align="center">  
                  <div style="clear:right" align="right">
                   
                 </div>             
                </td>
             </tr>   
        <tr>
        	<td align="center">       
             <div class="col-lg-12">
             <div class="well">
                  <form name="frm" id="frm" method="post" class="bs-example form-horizontal">
                  <input type="hidden" name="act" id="act" value="" />
				  <input type="hidden" name="List" value="<?php echo $_REQUEST['List']?>">
					<input type="hidden" name="section_id" id="section_id" value="<?php echo $userDetails->id?>" />
                    <fieldset>                  
                      <div class="form-group">
                          <label class="col-lg-3 control-label" for="name">Welcome Text 1</label>
                        <div class="col-lg-8">
                          <textarea name="welcometext1" id="welcometext1" cols="40" rows="10"><?php echo $userDetails->welcometext1?></textarea>
                        </div>
                      </div>
                      
                      <div class="form-group">
                          <label class="col-lg-3 control-label" for="designer_lname">Welcome Text 2</label>
                        <div class="col-lg-8">
                          <textarea name="welcometext2" id="welcometext2" cols="40" rows="10"><?php echo $userDetails->welcometext2?></textarea>
                        </div>
                      </div>
                      
                      
                  
                      <div class="form-group">
                        <div class="col-lg-5 col-lg-offset-1">                    
                          <button class="btn btn-primary" name="Submit" type="submit" value="Submit">Submit</button>&nbsp;
                        </div>
                      </div>
                    </fieldset>
                  </form>
            </div>
          </div>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
$(document).ready(function() {
    $('#frm').bootstrapValidator({
        message: 'This value is not valid',
        fields: {
            name: {
                message: 'The Name is not valid',
                validators: {
                    notEmpty: {
                        message: 'The Name is required and can\'t be empty'
                    }
                }
            }
        }
    });
});
</script>