 
<?php $__env->startSection('content'); ?>

			<div class="row">
		    	<div class="col-lg-12">
		    		<h4 class="page-header">Cities</h4>
		    	</div>
		    </div>
            <div class="row">
                <div class="col-lg-12">
                	<?php if(session('status')): ?>
					<div class="alert alert-success">
						<?php echo e(session('status')); ?>

					</div>
					<?php endif; ?>
					<?php if(count($errors) > 0): ?>
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								<?php foreach($errors->all() as $error): ?>
									<li><?php echo e($error); ?></li>
								<?php endforeach; ?>
							</ul>
						</div>
					<?php endif; ?>
				</div>
			</div> 	
		<form class="form-horizontal" method="post" action="<?php echo e(url('admin/telephone/edit')); ?>">
			<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">	
			<input type="hidden" name="cityID" value="<?php echo e($city->id); ?>">

			<div class="panel panel-default">
			    <div class="panel-heading">
			      <h4 class="panel-title">
			        <div class="accordian-item"  style="color: #317aba;">
			         	<?php echo e($city->name); ?> Telephone Rates
			        </div>
			      </h4>
			    </div>
			    <div class="panel-body">
					<div class="col-md-12">
						<div class="row">
							<div class="form-group">
									<div class="col-sm-12 col-md-2 morePadding morePadding2" onclick="inputFocus('res_access')">
										<input type="number" min="0" step=".01" class="form-control" id="res_access" name="res_access" value="<?php echo e(old('res_access') ? old('res_access') : $telephone->res_access); ?>" title="Res. Access"
										<?php if($errors->first('res_access') != ''): ?>
										style="border: 1px solid red;"
										<?php endif; ?>
										onchange="totaled()"
										>
										<span id="res_access-label" class="label-text">Res. Access</span>	
									</div>
									<div class="col-sm-12 col-md-2 morePadding morePadding2" onclick="inputFocus('eas')">
										<input type="number" min="0" step=".01" class="form-control" id="eas" name="eas" value="<?php echo e(old('eas') ? old('eas') : $telephone->eas); ?>" title="EAS"
										<?php if($errors->first('eas') != ''): ?>
										style="border: 1px solid red;"
										<?php endif; ?>
										onchange="totaled()"
										>
										<span id="eas-label" class="label-text">EAS</span>	
									</div>
									<div class="col-sm-12 col-md-2 morePadding morePadding2" onclick="inputFocus('services')">
										<input type="number" min="0" step=".01" class="form-control" id="services" name="services" value="<?php echo e(old('services') ? old('services') : $telephone->services); ?>" title="Services"
										<?php if($errors->first('services') != ''): ?>
										style="border: 1px solid red;"
										<?php endif; ?>
										onchange="totaled()"
										>
										<span id="services-label" class="label-text">Services</span>	
									</div>
									<div class="col-sm-12 col-md-2 morePadding morePadding2" onclick="inputFocus('nineoneone')">
										<input type="number" min="0" step=".01" class="form-control" id="nineoneone" name="nineoneone" value="<?php echo e(old('nineoneone') ? old('nineoneone') : $telephone->nineoneone); ?>" title="911"
										<?php if($errors->first('nineoneone') != ''): ?>
										style="border: 1px solid red;"
										<?php endif; ?>
										onchange="totaled()"
										>
										<span id="nineoneone-label" class="label-text">911</span>	
									</div>
									<div class="col-sm-12 col-md-2 morePadding morePadding2" onclick="inputFocus('federal')">
										<input type="number" min="0" step=".01" class="form-control" id="federal" name="federal" value="<?php echo e(old('federal') ? old('federal') : $telephone->federal); ?>" title="Federal"
										<?php if($errors->first('federal') != ''): ?>
										style="border: 1px solid red;"
										<?php endif; ?>
										onchange="totaled()"
										>
										<span id="federal-label" class="label-text">Federal</span>	
									</div>
									<div class="col-sm-12 col-md-2 morePadding morePadding2">
										<input type="text" class="form-control" id="total" name="total" value="$0.00" title="Total" disabled style="border: none;">	
									</div>
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="row">
							<div class="form-group">
								<div class="col-sm-12 col-md-4 morePadding morePadding2">
									<input type="submit" class="btn btn-primary" name="submit" value="Save">
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extras'); ?>
	<style>
			input:focus+.label-text, input:not([value=""])+.label-text, select+.label-text
		    		{
		    font-weight: normal;
		    padding: 0;
		    padding-left: 20px;
		    -webkit-transform: translateY(-2rem) scale(.7);
		    transform: translateY(-2rem) scale(.7);
		}
		input+.label-text, select+.label-text, .hasValue{
		    font-size: 1.5rem;
		    font-weight: 400;
		    position: absolute;
		    top: 0;
		    left: 0;
		    display: block;

		    padding-left: 20px;
		    padding-top: 5px;
		    padding-bottom: 5px;
		    opacity: .8;
		    transition: all .3s ease-out,opacity 150ms ease .3s;
		    -webkit-transform: translateY(0) scale(1);
		    transform: translateY(0) scale(1);
		    -webkit-transform-origin: left top;
		    transform-origin: left top;
		}
		span {
		    font-size: 1rem;
		    font-weight: 600;
		    display: block;
		    padding-top: .25rem;
		    padding-bottom: .25rem;
		    margin-left: 1rem;
		    color: #317aba;
		}
		.hasValue
		{
		    font-weight: normal;
		    padding: 0;
		    padding-left: 20px;
		    -webkit-transform: translateY(-2rem) scale(.7);
		    transform: translateY(-2rem) scale(.7);    
		}
		
		.moveOver
		{
			padding-left: 9px;
			padding-bottom: 5px;
			padding-top: 5px;
			margin-bottom: 15px;
			font-weight: normal;
			border: none;
			border-radius: 10px;
			background-color: #eee;
			width: 100%;
		}
		

		@media (max-width: 959px)
		{
			.morePadding {
			    margin-top: 1.5em;
			}
		}

		@media (min-width: 960px)
		{
			.morePadding {
			    margin-top: 1em;
			}
		}
		
		.accordion-ts {float: right; color: #888; margin-top: -20px; font-weight: normal; font-size: 14px;}
		
		.accordian-item{
			cursor: pointer;
		}
		
		.serviceGroup {
			margin-bottom: 0;
		}
			
		.noFloat{
			clear: left;
			border: none;
		}
		
		.otherStuff {
			padding-top: 0;
			padding-left: 0;
			margin-left: 0;
		}
		
		.servicesList {
			max-height: 600px;
			overflow: scroll;
		}
		
	</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('bottom'); ?>
<script>
	function inputFocus(id)
	{
		document.getElementById(id).focus();
	}


</script>

<script>
	$('.form-control').each(function() {
	   var elem = $(this);

	   // Save current value of element
	   elem.data('oldVal', elem.val());

	   // Look for changes in the value
	   elem.bind("propertychange change click keyup input paste", function(event){
	      // If value has changed...
	      if (elem.data('oldVal') != elem.val()) {
	       // Updated stored value
	       elem.data('oldVal', elem.val());
	       var elem2 = $('#'+elem.attr('id')+"-label");
	       elem2.addClass('hasValue');
	       elem2.removeClass('label-text');
	       if(elem.val() == "")
	       {
		       
	    	   elem2.addClass('label-text');
		       elem2.removeClass('hasValue');
	       }
	     }
	   });
	 });



	function totaled()
	{
		var total = 0;
		if(document.getElementById('res_access').value != '')
		{
			total += +document.getElementById('res_access').value;
		}
		if(document.getElementById('eas').value != '')
		{
			total += +document.getElementById('eas').value;
		}
		if(document.getElementById('services').value != '')
		{
			total += +document.getElementById('services').value;
		}
		if(document.getElementById('nineoneone').value != '')
		{
			total += +document.getElementById('nineoneone').value;
		}
		if(document.getElementById('federal').value != '')
		{
			total += +document.getElementById('federal').value;
		}
		
		document.getElementById('total').value = '$' + total.toFixed(2);
	}
	totaled();

									
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('residential.templates.uadmin', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>