{% extends 'dashboard_screen/base.html' %}

{% block content %}

            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">
                    <div class="container">
                        <div class="row">

                            <div class="col-lg-12">
                                 <!-- Basic Form Wizard -->

                            	<div class="card-box">
                            		<h4 class="m-t-0 header-title"><b>Add New Client</b></h4>

									<form id="id_ajax_form_edit_client" action="/dashboard/edit_client/{{ client.client_id }}/" class="form-horizontal" method="post" enctype="multipart/form-data">
                                        {% csrf_token %}
                                        <input type="hidden"  name="client_id" value="{{ client.client_id }}"/>
                                        <div>
                                               <div class="col-lg-2">
                                                    <div class="p-20">
                                                        <h5><b>Client Code: (*)</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" class="form-control" id="state-warning" maxlength="10" autofocus required name="client_code" placeholder="Unique" onKeyUp="this.value=this.value.toUpperCase();" value="{{ client.client_code }}"/>
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-university"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                         <!--      <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Username: (*)</b></h5>
                                                        <p class="text-muted m-b-15 font-13">
                                                             For <code>Website</code> access.
                                                        </p>
                                                        <div class="input-group m-t-15">
												            <input type="text" class="form-control" id="state-warning" maxlength="25" disabled required name="client_username" placeholder="Enter Username" value="{{ client.client_user.username }}" />
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-users"></i></span>
                                                        </div>
											        </div>
                                               </div> -->

                                         <!--      <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Password: (*)</b></h5>
                                                        <p class="text-muted m-b-15 font-13">
                                                             For <code>Website</code> access.
                                                        </p>
                                                        <div class="input-group m-t-15">
												            <input type="password" class="form-control" id="state-warning" maxlength="25" disabled  required name="client_password" placeholder="Enter password" value=""/>
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-lock"></i></span>
                                                        </div>
											        </div>
                                               </div> -->

                                               <div class="col-lg-4">
                                                    <div class="p-20">
                                                        <h5><b>Email: (*)</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" class="form-control" id="state-warning" required name="client_email" placeholder="Enter Email" value="{{client.business_email}}"/>
                                                            <span class="input-group-addon bg-custom b-0 text-white"> <i class="fa fa-envelope-o"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-4">
                                                    <div class="p-20">
                                                        <h5><b>Business Legal Name: (*)</b></h5>
                                                        <div class="input-group m-t-15">
                                                            <input type="text" name="client_legal_name" required class="form-control" id="state-warning" placeholder="Enter Legal Name" value="{{ client.business_legal_name }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-2">
                                                    <div class="p-20">
                                                        <h5><b>UPIN Number: (*)</b></h5>
                                                        <div class="input-group m-t-15">
												             <input type="text" name="business_UPIN_number" required class="form-control" id="state-warning" onKeyUp="this.value=this.value.toUpperCase();" value="{{ client.business_UPIN_number}}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-envelope-o"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Representative First Name: (*)</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" class="form-control" id="state-warning"  required name="client_first_name" placeholder="Enter First Name" value="{{ client.first_name }}"/>
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Representative Last Name: (*)</b></h5>
                                                        <div class="input-group m-t-15">
                                                            <input type="text" name="client_last_name" required class="form-control" id="state-warning" placeholder="Enter Last Name" value="{{ client.last_name }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-4">
                                                    <div class="p-20">
                                                        <h5><b>Attending Physician Name: (*)</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" class="form-control" id="state-warning"  required name="client_attending_physician_name" value="{{ client.attending_physician_name }}" />
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa fa-user"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-2">
                                                    <div class="p-20">
                                                        <h5><b>Zip Code:</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" name="client_zipcode" class="form-control" id="exampleInputEmail1" placeholder="Zip Code" value="{{ client.business_zipcode }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-map-marker"></i></span>
                                                        </div>
											        </div>
                                               </div>





                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Business Phone:</b></h5>
                                                        <div class="input-group m-t-15">
												             <input type="tel" step="1" name="client_phone" class="form-control" id="exampleInputPassword1" placeholder="Phone" value="{{ client.business_phone }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-phone"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Contact Phone:</b></h5>
                                                        <div class="input-group m-t-15">
												             <input type="tel" step="1" name="client_contact_phone" class="form-control" id="exampleInputPassword1" placeholder="Phone" value="{{ client.contact_phone }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-phone"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Fax:</b></h5>
                                                        <div class="input-group m-t-15">
												             <input type="tel" step="1" name="client_fax" class="form-control" id="exampleInputPassword1" placeholder="Fax" value="{{ client.business_fax }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa fa-fax"></i></span>
                                                        </div>
											        </div>
                                               </div>

                                               <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>City:</b></h5>
                                                        <div class="input-group m-t-15">
												           <input type="text" name="client_city" class="form-control" id="id_patient_city" placeholder="Enter City" value="{{ client.business_city }}">
                                                           <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map"></i></span>
                                                        </div>
											        </div>
                                               </div>






                                                <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Address:</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" name="client_address" class="form-control" id="exampleInputEmail1" placeholder="Enter Business address" value="{{ client.business_address }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map "></i></span>
                                                        </div>
											        </div>
                                               </div>

                                                <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>Address2:</b></h5>
                                                        <div class="input-group m-t-15">
												            <input type="text" name="client_address2" class="form-control" id="exampleInputEmail1" placeholder="Enter Business address" value="{{ client.business_address2 }}">
                                                            <span class="input-group-addon bg-custom b-0 text-white"><i class="fa ion-map "></i></span>
                                                        </div>
											        </div>
                                               </div>
                                                <div class="col-lg-3">
                                                    <div class="p-20">
                                                        <h5><b>State:</b></h5>
                                                        <div class="input-group m-t-15">
												            <select id="id_patient_state" name="client_state" class="selectpicker" data-style="btn-white">
                                                                    {% if states %}
                                                                       {% for item in states %}
                                                                         <option value="{{ item.code }}" {% if item.code == client.business_state %}selected {% endif %}>{{ item.name }}</option>
                                                                       {% endfor %}
                                                                    {% endif %}
                                                               </select>
                                                        </div>
											        </div>
                                               </div>


                                                <div class="col-lg-5">

                                                    <div class="col-lg-12">
                                                        <div class="form-group ">
                                                            <p class="text-muted font-13 m-b-15 m-t-20">Please select how the Client wants to get his Report:</p>
                                                            <div class="col-sm-12">
                                                                <div class="col-lg-3">
                                                                    <div class="col-sm-offset-0">
                                                                        <div class="checkbox checkbox-custom">
                                                                            <input id="checkbox1" type="checkbox"  name="e_fax" {% if client.e_fax == 1 %} checked {% endif %}>
                                                                            <label for="checkbox1">
                                                                                E-Fax
                                                                            </label>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="col-lg-3">
                                                                    <div class="col-sm-offset-1">
                                                                        <div class="checkbox checkbox-custom">
                                                                            <input id="checkbox2" type="checkbox" name="website" {% if client.website == 1%} checked{% endif %}>
                                                                            <label for="checkbox2">
                                                                                WebSite
                                                                            </label>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-lg-3">
                                                                    <div class="col-sm-offset-1">
                                                                        <div class="checkbox checkbox-custom">
                                                                            <input id="checkbox3" type="checkbox" name="printed" {% if client.printed == 1 %} checked{% endif %}>
                                                                            <label for="checkbox3">
                                                                                Printed
                                                                            </label>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-lg-3">
                                                                    <div class="col-sm-offset-1">
                                                                        <div class="checkbox checkbox-custom">
                                                                            <input id="checkbox4" type="checkbox" name="interface" disabled {% if client.interface == 1 %} checked="checked" {% endif %}>
                                                                            <label for="checkbox5">
                                                                                Interface
                                                                            </label>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                            </div>


                                                        </div>
                                                    </div>
                                                </div>



                                                <div class="col-lg-12">
                                                    <div class="form-group ">
                                                        <p class="text-muted font-13 m-b-15 m-t-20">Please select where the Client wants to get his Notification.</p>
                                                        <div class="col-sm-12">
                                                            <div class="radio radio-info radio-inline">
                                                                <input type="radio" id="inlineRadio1" value="1" name="notification" {% if client.notification %} checked="checked" {% endif %}>
                                                                <label for="inlineRadio1"> Email </label>
                                                            </div>

                                                            <div class="radio radio-inline">
                                                                <input type="radio" id="inlineRadio2" value="0" name="notification" {% if not client.notification %} checked="checked" {% endif %}>
                                                                <label for="inlineRadio2"> WebSite </label>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="form-group clearfix">
                                                     <label class="col-lg-6 control-label ">(*) Mandatory</label>
                                                </div>





                                                <div class="form-group m-b-0">
	                                                <div class="col-sm-offset-10 col-sm-10">
	                                                  <button type="submit" name="edit_client" class="btn btn-default waves-effect waves-light">Save</button>
	                                                </div>
	                                            </div>


                                                <div class="form-group clearfix">
                                                     <label class="col-lg-6 control-label ">{{ message }}</label>
                                                </div>
                                        </div>
                                    </form>


                            	</div>


                            <!-- End row -->

                            </div> <!-- end col -->
                        </div>

						<!-- end row -->



                    </div> <!-- container -->

                </div> <!-- content -->


{% endblock %}