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

{% block body %}

<div id="navbar" style="font-size:18px;">   
    <ul>       
        <li><a href="{{ path('DorcasTabithaBundle_homepage' ) }}">Home</a></li>
        <li><a href="{{ path('DorcasTabithaBundle_search_show' ) }}" style="background-color:#00b5cb; font-size:30px;">Client Search</a></li> 
        <li><a href="{{ path('DorcasTabithaBundle_clientinformation_new' ) }}">New Client</a></li> 
        {% if is_granted('ROLE_ADMIN') %}
            <li><a href="{{ path('DorcasTabithaBundle_users_show' ) }}">Users</a></li> 
            <li><a href="{{ path('DorcasTabithaBundle_message_show' ) }}">Message/Reports</a></li>
        {% endif %}  
    </ul> 
</div>
    <section class="user" id="users">
                {# .. #}
        <br/>
        <input type=button onClick="location.href='javascript: clearform()'" value='Clear Search' style="color:#00b5cb; background-color:white; margin-right: 30px;">
        {% render 'DorcasTabithaBundle:Search:new' %}

    </section>

    <section class="users" id="users">
        <section class="previous-users">  
           {% if clients is defined %}
               {% include 'DorcasTabithaBundle:Search:searchloop.html.twig' with { 'clients': clients, 'numberrecords': numberrecords } %}
           {% else %}
               <p> </p>
                <br />
           {% endif %}

            
        </section>
    </section>

    </div>
</div>

{% endblock %}

{% block javascripts %}

    {{ parent() }} 

<script type="text/javascript">

function displayemail()
{
    var textareaid = document.getElementById('clientinformationform_emailList');
    textareaid.style.display='block';
}

function clearform()
{
    var textboxid = document.getElementById('clientinformationform_ssn');
    textboxid.value = "";
    var input = document.getElementById('clientinformationform_first_name');
    input.value = "";
    var input = document.getElementById('clientinformationform_last_name');
    input.value = "";
    var input = document.getElementById('clientinformationform_alias');
    input.value = "";
    var input = document.getElementById('clientinformationform_current_address');
    input.value = "";
    var input = document.getElementById('clientinformationform_prev_address1');
    input.value = "";
    var input = document.getElementById('clientinformationform_other_adult_oneLastName');
    input.value = "";
    var input = document.getElementById('clientinformationform_other_adult_twoLastName');
    input.value = "";  
    var input = document.getElementById('clientinformationform_other_adult_oneFirstName');
    input.value = "";  
    var input = document.getElementById('clientinformationform_other_adult_twoFirstName');
    input.value = "";  
}          
 
</script>

{% endblock %}