<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/
?>
        	<div class="new-form-ui" id="ffdiv">
	            <label>Feedforward</label>
	            <div class="division">
	            	<select id="ff_id" name="ff_id" onchange="getManagerRatings(this.value)">
						<option  value="">Select Feedforward</option>
						<?php if(!empty($this->ffdataarr)) { 
									foreach($this->ffdataarr as $value) {?>
							<option  value="<?php echo $value['id']?>"><?php echo $value['mode']?></option>
						<?php }}?>
					</select>
					<span class="errors" id="errors-ff_id"></span>
				</div>
        	</div>
        	
			<div id="feedforward_mgr_data" class="feedforward_mgr_data">
			</div>

<script type="text/javascript">

function getManagerRatings(id){
	$("#feedforward_mgr_data").html("");
	if(id)
	{
		$.ajax({
         	url: base_url+"/feedforwardmanager/getmanagersratings/format/html",
         	type : 'POST',	
			data : 'id='+id,
			dataType: 'html',
			beforeSend: function () {
				$.blockUI({ width:'50px',message: $("#spinner").html() });
			},
			success : function(response){
				$.unblockUI();
				$("#feedforward_mgr_data").html(response);	
			}
    	});			
	}else
	{
		$("#feedforward_mgr_data").html("");
	}
}

</script>
