<!DOCTYPE html>
<html lang="en">
  
<head>
    <%- include('./partials/head'); -%>
    
</head>
<body onload="startTime()">
    <%- include('./partials/header_sidebar'); -%>
    
    <!-- tap on top starts-->

        <!-- Page Sidebar Ends-->
        <div class="page-body">
          <div class="container-fluid">
            <div class="page-title">
              <div class="row">
                <div class="col-sm-6">
                  <h3> <%=lan.Add%> <%=lan.Customer%></h3>
                </div>
                <div class="col-sm-6">
                  <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="/index"><i data-feather="home"></i></a></li>
                    <li class="breadcrumb-item"><%=lan.Dashboard%></li>
                    <li class="breadcrumb-item active"><%=lan.Customer%></li>
                    <li class="breadcrumb-item active"><%=lan.Add%> <%=lan.Customer%></li>
                  </ol>
                </div>
              </div>
            </div>
          </div>
          <!-- Container-fluid starts-->
          <div class="container-fluid">
            <div class="row">
              <div class="col-sm-12">
                <div class="card">
                  <div class="card-body">
                    <form  class="needs-validation" id="add_cus_form" novalidate="" action="/customer/add_customer" method="post">
                      <div class="row">

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                          <label class="col-form-label"><%=lan.Name%></label>
                          <input class="form-control cdcheck" type="text" name="name" placeholder="<%=lan.Enter%> <%=lan.Name%>" required>
                        </div>

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                          <label class="col-form-label"><%=lan.Email%></label>
                          <input class="form-control cdcheck" type="email" name="email" placeholder="<%=lan.Enter%> <%=lan.Email%>" required>
                        </div>

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                            <label class="col-form-label"><%=lan.Country%> <%=lan.Code%></label>
                            <select class="js-example-basic-single cdcheck" id="country_code" name="country_code" required>
                                <option value selected disabled><%=lan.Country%> <%=lan.List%></option>
                                <% CountryCode.forEach((data, x) => { %>
                                    <option value="<%= data %>"> <%= nameCode[x] %> <%= data %> </option>
                                <% }) %>
                            </select>
                        </div>

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                            <label class="col-form-label"><%=lan.Number%></label>
                            <input class="form-control cdcheck" type="number" name="phone" id="cphone" placeholder="<%=lan.Enter%> <%=lan.Number%>" required>
                        </div>

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                          <label class="col-form-label"><%=lan.Password%></label>
                          <input class="form-control cdcheck" type="password" name="password" placeholder="**********" required>
                        </div>

                        <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6" style="margin-top: 40px;">
                          <div class="d-flex mb-2">
                            <div class="icon-state switch-outline">
                              <label class="switch">
                                <input type="checkbox" name="status" required><span class="switch-state bg-success"></span>
                              </label>
                            </div>
                            <label class="col-form-label m-l-10"><%=lan.Status%></label>
                          </div>
                        </div>
                        
                        <div class="text-center">
                          <p class="text-danger d-none mt-3" id="customer_detail_error"><%=lan.Please_Enter_All_Detail%>.</p>
                          <p class="text-danger d-none mt-3" id="customer_phoneno_error"><%=lan.This_Phone_No_Alread_Registered%>.</p>
                        </div>
                        </div>
                      </form>
                    <div class="text-end mt-5">
                      <button class="btn btn-square btn-primary btn-air-primary add_detail_btn b-r-10" id="add_customer" type="submit"><%=lan.Submit%></button> 
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>

        <%- include('./partials/footer'); -%>
        <%- include('./partials/script'); -%>
  </body>
</html>