<?php

/* DorcasTabithaBundle:Search:searchformtwo.html.twig */
class __TwigTemplate_e52d7768a1615eacd76934dbd75152fa extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("::base.html.twig");

        $this->blocks = array(
            'body' => array($this, 'block_body'),
            'javascripts' => array($this, 'block_javascripts'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "::base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_body($context, array $blocks = array())
    {
        // line 4
        echo "
    <div id=\"override_javascript_alertx\"></div>

<div id=\"navbar\" style=\"font-size:18px;\">   
    <ul>       
        <li><a href=\"";
        // line 9
        echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_homepage"), "html", null, true);
        echo "\">Home</a></li>
        <li><a href=\"";
        // line 10
        echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_search_show"), "html", null, true);
        echo "\" style=\"background-color:#00b5cb; font-size:30px;\">Client Search</a></li> 
        <li><a href=\"";
        // line 11
        echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_clientinformation_new"), "html", null, true);
        echo "\">New Client</a></li> 
        ";
        // line 12
        if ($this->env->getExtension('security')->isGranted("ROLE_ADMIN")) {
            // line 13
            echo "            <li><a href=\"";
            echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_users_show"), "html", null, true);
            echo "\">Users</a></li> 
            <li><a href=\"";
            // line 14
            echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_message_show"), "html", null, true);
            echo "\">Message/Reports</a></li> 
        ";
        }
        // line 15
        echo "  
    </ul> 
</div>

    <section class=\"user\" id=\"users\">
                ";
        // line 21
        echo "        <br/>
        <input type=button onClick=\"location.href='javascript: clearform()'\" value='Clear Search' style=\"color:#00b5cb; background-color:white; margin-right: 30px;\">
        ";
        // line 23
        if (($this->getContext($context, "allnumberrecords") > 100)) {
            // line 24
            echo "            <input type=button onClick=\"jsSubmit()\" value=\"Display ALL Records\"  style=\"color:#00b5cb; background-color:white; margin-right: 30px;\">  
        ";
        }
        // line 26
        echo "
        ";
        // line 27
        echo $this->env->getExtension('actions')->renderAction("DorcasTabithaBundle:Search:renew", array(), array());
        // line 28
        echo "
    </section>

    <section class=\"users\" id=\"users\">
        <section class=\"previous-users\">       
           ";
        // line 33
        $this->env->loadTemplate("DorcasTabithaBundle:Search:searchloop.html.twig")->display(array_merge($context, array("clients" => $this->getContext($context, "clients"), "numberrecords" => $this->getContext($context, "numberrecords"), "allnumberrecords" => $this->getContext($context, "allnumberrecords"))));
        // line 34
        echo "        </section>
    </section>

    </div>
</div>

";
    }

    // line 42
    public function block_javascripts($context, array $blocks = array())
    {
        // line 43
        echo "
    ";
        // line 44
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "           
 
<script type=\"text/javascript\">

function jsSubmit(){ 
    var form = document.forms[\"clientform\"];
    form.action =\"true\";
    form.submit();
}

function displayemail()
{
    var textareaid = document.getElementById('emailList');
    if ( textareaid.style.display=='none')
    {
        textareaid.style.display='block';
    }
    else
    {
        textareaid.style.display='none';
    }

}

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 = \"\";  
}  


function warnUsersDelete(uriLocation)
{
     alertMessage = '<p style = \"color:red;\"> Warning: Are you sure you want to delete this client record? </p>';
     warnRedirect(uriLocation, alertMessage);
}

warnRedirect = function(uriLocation, message) {
\t\$('#override_javascript_alertx').html(message).dialog({
\t\tmodal: true,
                title:'Tabitha Warning Message',
\t\t\tbuttons: {
\t\t\t\t\"Delete Client Record\": function() {
                                        window.location = uriLocation;
\t\t\t\t\t\$( this ).dialog( \"close\" );
\t\t\t\t},
\t\t\t\tCancel: function() {
\t\t\t\t\t\$( this ).dialog( \"close\" );
\t\t\t\t}
\t\t\t}
\t\t});
\t};
        
 
</script>

";
    }

    public function getTemplateName()
    {
        return "DorcasTabithaBundle:Search:searchformtwo.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  108 => 44,  105 => 43,  102 => 42,  92 => 34,  90 => 33,  83 => 28,  81 => 27,  78 => 26,  74 => 24,  72 => 23,  68 => 21,  61 => 15,  56 => 14,  51 => 13,  49 => 12,  45 => 11,  41 => 10,  37 => 9,  30 => 4,  27 => 3,);
    }
}
