{% extends "::base.html.twig" %}  
{% block image %}{% endblock %}
{% block clientname %}{% endblock %}   
{% block body %}



<div id="user_edit" style="zoom: 90%; padding-left:40px;">

<div id="override_javascript_alert"></div>

    <form action="{{ path('DorcasTabithaBundle_print_pledgeShow', { 'client_id' : client.clientid } ) }}" method="post" {{ form_enctype(form) }} class="dorcas" style="font-size:14px;">


		<body style="padding: 60px; padding-top:20px; background-color: #cdf1f1; "> 


			<center><img src="{{ asset('bundles/dorcastabitha/images/dorcasLogoVertical.png') }}" alt="Dorcas">
			<h4>
			187 High House Road<br />
			Cary, NC 27511<br />
			</h4>

			<h2>Pledge Confirmation</h2></center>
			

			<p style="line-height:180%; padding-left: 20px;">
				

				<strong>Date:</strong> {{ "now"|date("m/d/Y") }}
				<span style="padding-left:250px;"><strong>Counselor:</strong> {{ pledge.counselor }}</span>
				<br />
				<br />
				<strong>Client Name:</strong> {{ client.FullName }} 
				<br />
				<strong>Client Address:</strong> {{ client.fulladdress }}
				<br />
				
				<div style="border:1px solid;background-color:#cdf1f1; padding:20px; height:80px;">
					
					<div style="float: left; line-height: 150%;">
						<strong>Assistance Offered by Dorcas: </strong> 
						<br />
						<strong>Amount Offered by Other Agency: </strong>
						<br />
						<strong>Amount Offered by Other Agency: </strong>
						<br />
					</div>
					<div style="float: left;line-height: 150%;padding-left: 20px;">
						<br />
						{{ form_widget(form.other_desc, { 'attr': {'size': '15', 'tabindex':'2'} }) }}
						<br />
						{{ form_widget(form.other_desc2, { 'attr': {'size': '15','tabindex':'4'} }) }}
						<br />
						<br />&nbsp;
					</div>
					<div style="float: right; line-height:150%;">
						{{ form_widget(form.pledge_dorcas, { 'attr': {'size': '15','tabindex':'1' , 'onchange': 'isNumber(this)' } }) }}
						<br />
						{{ form_widget(form.pledge_other, { 'attr': {'size': '15','tabindex':'3' , 'onchange': 'isNumber(this)'} }) }}
						<br />
						 {{ form_widget(form.pledge_other2, { 'attr': {'size': '15','tabindex':'5', 'onchange': 'isNumber(this)' } }) }}
					</div>
				</div>				
				<br />
			<div style="padding: 20px; line-height: 180%; height:180px; ">
				<div style=" float: left; padding-right: 10px;">
					<strong>Type of Assistance (Rent, Water, Oasis, Gas, etc.):</strong> 
				</div>
				<div style="padding-left:20px; float: right;">
					 {{ form_widget(form.check_purpose, { 'attr': {'style': 'width: 160px;'} }) }}
				</div>
				
				<div style="float: left;">	
					<div style="float: left;">
						<strong>{{ form_label(form.account_number) }}</strong>
					</div>
				
					<div style="padding-left: 10px; float: left;">
						{{ form_widget(form.account_number, { 'attr': {'size': '15'} }) }} 
					</div>
				
				
					<div style="padding-left: 45px; padding-right: 10px; float: left;">
						 <strong>Name on Bill: </strong>
					</div>
					<div style="padding-left: 8px;">
						 {{ form_widget(form.name_on_bill, { 'attr': {'size': '24'} }) }}
					</div>
				</div>
				<br />
				<div style="float: left; ">
					<strong>Vendor Name:</strong>
					<br />
					<strong>{{ form_label(form.vendor_address) }}</strong>
				</div>
				<div style="float:right;">
					{{ form_widget(form.vendor_name, { 'attr': {'size': '50'} }) }}
					<br />
					{{ form_widget(form.vendor_address, { 'attr': {'size': '50'} }) }} 
				</div>
					
				
				<br />&nbsp;<br /><br />&nbsp;
				
				<div style="height:60px;">
					<div style="float: left;">
						<strong>Pledge Made By:</strong>
					</div>
					<div style="float: left; padding-left:14px;">
						<div id="phone">
							<strong>Phone: </strong>{{ form_widget(form.vendor_phone, { 'attr': {'size': '10'} }) }}
						</div>
						
						<div id="online ">
							<strong>On-line: </strong>{{ form_widget(form.on_line, { 'attr': {'size': '10'} }) }}
						</div>
					</div>
					<div style=" padding-left: 5px; float:right;">
						<div id="vendor">
							<strong>Vendor Contact: </strong>{{ form_widget(form.vendor_contact, { 'attr': {'size': '30' } }) }}
						</div>
						
						<div id="confnum">
							<strong>Confirmation Number: </strong>{{ form_widget(form.confirm_num, { 'attr': {'size': '24'} }) }}
						</div>
					</div>
				</div>
			</div>
				
				

				{{ form_rest(form) }}



			</p>    
			
			
			<div style="border:2px solid; padding: 14px; font-size:12px;">
				<strong>ATTENTION:</strong> This is to confirm that Dorcas Ministries has pledged the above 
				stated amount toward the payment of the above named clients's bill.  A check in
				 this amount will be requested from our bookkeeper.
				 <br /><br />
				 If you have any questions, you may contact Dorcas Ministries at:
				 <center><strong>919-469-9861, ext. 201</strong></center>
				 <br />
			 </div>
			
			<div style="position:absolute; top:10px; left:10px;">
				<input type="submit" value="Create Printable Pledge Confirmation" >
			</div>
			<br />&nbsp;<br />
			
		</body>
    </form>
</div>

{% endblock %}

{% block logout %}{% endblock %}

{% block javascripts %}

{{ parent() }}

<script type="text/javascript">


window.alert = function(message) {
	$('#override_javascript_alert').html(message).dialog({
		modal:true,
		title:'Tabitha Validation Message',
		buttons: {
			'OK':function(){
				$(this).dialog('close');
			}
		}
	});
};

function closeandreload(){ 
  opener.location.reload(); // or opener.location.href = opener.location.href; 
  window.close(); // or self.close(); 
}

function isNumber(field)
{
     if( isNaN(field.value)){
        alert("&#8227 Please enter whole number only, no <br />&nbsp;  dollar sign.");
        field.value = 0;
        field.focus();
         }
}

</script>
   
{% endblock %}

{% block stylesheets %}

{{ parent() }}

<style >
input
{
    font-size:14px;
}
</style>
{% endblock %}

 
