{% extends "::base.html.twig" %}        

{% block body %}
    <div id="wrapper" style="height:1100px;" >
            <form id="clientform" action="{{ path('DorcasTabithaBundle_referrals_update', { 'client_id' : referrals.client.clientid } ) }}" method="post" {{ form_enctype(form) }} class="dorcas">           
                {% include 'DorcasTabithaBundle:Referrals:referralslayout.html.twig' %}
            </form>
    </div>
{% endblock %}

{% block javascripts %}

{{ parent() }}

<script type="text/javascript">

$(function() {
//    $( ".datepicker" ).datepicker({ showAnim: "slideDown" });
    $( ".datepicker" ).datepicker({ changeMonth: true, changeYear: true, yearRange:"-90:+0", maxDate: "+0d"
        });
        });

    function mkdate(field)
    {
        var checkboxid = document.getElementById('referralsform_margaret_keller');
        var textboxid = document.getElementById('referralsform_margaret_keller_date');
        checkboxid.checked = true;
        if (textboxid.value == "") {
            checkboxid.checked = false;
        }
    }

    function wwdate(field)
    {
        var checkboxid = document.getElementById('referralsform_western_wake');
        var textboxid = document.getElementById('referralsform_western_wake_date');
        checkboxid.checked = true;
        if (textboxid.value == "") {
            checkboxid.checked = false;
        }
    }

    function ohdate(field)
    {
        var checkboxid = document.getElementById('referralsform_oxford_house');
        var textboxid = document.getElementById('referralsform_oxford_house_date');
        checkboxid.checked = true;
        if (textboxid.value == "") {
            checkboxid.checked = false;
        }
    }

    function ccdate(field)
    {
        var checkboxid = document.getElementById('referralsform_childcare');
        var textboxid = document.getElementById('referralsform_childcare_date');
        checkboxid.checked = true;
        if (textboxid.value == "") {
            checkboxid.checked = false;
        }
    }

</script>
    
{% endblock %}