{% extends 'base.html.twig' %}

{% block title %}Edit Referral Source
{% endblock %}

{% block body %}
	{{ block('nav', 'internal/libs/nav.html.twig') }}

	<main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
		{{ block('topnav', 'internal/libs/top-nav.html.twig') }}

		<section>
			<div class='page-header min-vh-100'>
				<div class='container'>
					<div class="row">
						<div class="col-6 d-lg-flex d-none h-100 my-auto pe-0 position-absolute top-0 start-0 text-center justify-content-center flex-column">
							<div class="position-relative bg-gradient-primary h-100 m-3 px-7 border-radius-lg d-flex flex-column justify-content-center" style="background-image: url('/assets/img/illustrations/illustration-signup.jpg'); background-size: cover;"></div>
						</div>
						<div class="col-xl-4 col-lg-5 col-md-7 d-flex flex-column ms-auto me-auto ms-lg-auto me-lg-5">
							<div class="card card-plain">
								<div class="card-header">
									<h4 class="font-weight-bolder">Edit Referral Source</h4>
									<p class="mb-0">{{ rs.name }}</p>
								</div>
								<div class="card-body">
									{{ form_errors(form) }}

									{{ form_start(form) }}
									<div class='input-group input-group-outline mb-3 is-filled'>
										<label for='ref_src_name' class='form-label'>Name</label>
										<input type='text' name='{{ field_name(form.name) }}' value='{{ field_value(form.name) }}' id='ref_src_name' class='form-control' required='required'/>
									</div>

									<div class='input-group input-group-outline mb-3 is-filled'>
										<label for='ref_src_agency' class='form-label'>Agency</label>
										<input type='text' name='{{ field_name(form.agency) }}' value='{{ field_value(form.agency) }}' id='ref_src_agency' class='form-control' required='required'/>
									</div>

									<div class='input-group input-group-outline mb-3 is-filled'>
										<label for='ref_src_email' class='form-label'>Email</label>
										<input type='email' name='{{ field_name(form.email) }}' value='{{ field_value(form.email) }}' id='ref_src_email' class='form-control' required='required'/>
									</div>

									<div class='input-group input-group-outline mb-3 {% if field_value(form.phone) %}is-filled{% endif %}'>
										<label for='ref_src_phone' class='form-label'>Phone</label>
										<input type='phone' name='{{ field_name(form.phone) }}' value='{{ field_value(form.phone) }}' id='ref_src_phone' class='form-control'/>
									</div>

									<div class='input-group input-group-outline mb-3 is-filled'>
										<label for='ref_src_county' class='form-label'>County</label>
										<input type='text' name='{{ field_name(form.county) }}' value='{{ field_value(form.county) }}' id='ref_src_county' class='form-control'/>
									</div>

									<div class='text-center'>
										<button type='submit' class='btn btn-lg bg-gradient-dark btn-lg w-100 mt-4 mb-0'>Save Source</button>
									</div>

									{{ form_end(form) }}
								</div>
							</div>
						</div>
					</div>
				</div>
			</section>
		</main>
	{% endblock %}
