{% include 'common/header.html.twig' with {'assets': assets } %}
<!-- begin::Body -->
<body style="background-image: url({{ assets }}media/demos/demo4/bg-image-parti-header.jpg); background-position: center top; background-size: 100% 338px;" class="kt-page--loading-enabled kt-page--loading kt-quick-panel--right kt-demo-panel--right kt-offcanvas-panel--right kt-header--fixed kt-header--minimize-menu kt-header-mobile--fixed kt-subheader--enabled kt-subheader--transparent kt-page--loading">

<!-- begin:: Page -->

<!-- begin:: Header Mobile -->
{% include 'common/header_mobile.html.twig' %}

<!-- end:: Header Mobile -->
<div class="kt-grid kt-grid--hor kt-grid--root">
    <div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--ver kt-page">
        <div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor kt-wrapper" id="kt_wrapper">

            <!-- begin:: Header -->
            {{ render(controller('App\\Controller\\Common\\Top::index')) }}
            <!-- end:: Header -->

            <div class="kt-body kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor kt-grid--stretch" id="kt_body">
                <div class="kt-content kt-content--fit-top  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">

                    <!-- begin:: Subheader -->
                    {% include 'common/subheader.html.twig' %}

                    <!-- end:: Subheader -->

                    <!-- begin:: Content -->
                    <div class="kt-container  kt-grid__item kt-grid__item--fluid">
                        <div class="kt-portlet kt-portlet--tabs">
                            <div class="kt-portlet__head">
                                <div class="kt-portlet__head-toolbar">
                                    <ul class="nav nav-tabs nav-tabs-space-xl nav-tabs-line nav-tabs-bold nav-tabs-line-3x nav-tabs-line-brand" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" data-toggle="tab" href="#kt_user_edit_tab_1" role="tab">
                                                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
                                                    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                        <polygon points="0 0 24 0 24 24 0 24" />
                                                        <path d="M12.9336061,16.072447 L19.36,10.9564761 L19.5181585,10.8312381 C20.1676248,10.3169571 20.2772143,9.3735535 19.7629333,8.72408713 C19.6917232,8.63415859 19.6104327,8.55269514 19.5206557,8.48129411 L12.9336854,3.24257445 C12.3871201,2.80788259 11.6128799,2.80788259 11.0663146,3.24257445 L4.47482784,8.48488609 C3.82645598,9.00054628 3.71887192,9.94418071 4.23453211,10.5925526 C4.30500305,10.6811601 4.38527899,10.7615046 4.47382636,10.8320511 L4.63,10.9564761 L11.0659024,16.0730648 C11.6126744,16.5077525 12.3871218,16.5074963 12.9336061,16.072447 Z" fill="#000000" fill-rule="nonzero" />
                                                        <path d="M11.0563554,18.6706981 L5.33593024,14.122919 C4.94553994,13.8125559 4.37746707,13.8774308 4.06710397,14.2678211 C4.06471678,14.2708238 4.06234874,14.2738418 4.06,14.2768747 L4.06,14.2768747 C3.75257288,14.6738539 3.82516916,15.244888 4.22214834,15.5523151 C4.22358765,15.5534297 4.2250303,15.55454 4.22647627,15.555646 L11.0872776,20.8031356 C11.6250734,21.2144692 12.371757,21.2145375 12.909628,20.8033023 L19.7677785,15.559828 C20.1693192,15.2528257 20.2459576,14.6784381 19.9389553,14.2768974 C19.9376429,14.2751809 19.9363245,14.2734691 19.935,14.2717619 L19.935,14.2717619 C19.6266937,13.8743807 19.0546209,13.8021712 18.6572397,14.1104775 C18.654352,14.112718 18.6514778,14.1149757 18.6486172,14.1172508 L12.9235044,18.6705218 C12.377022,19.1051477 11.6029199,19.1052208 11.0563554,18.6706981 Z" fill="#000000" opacity="0.3" />
                                                    </g>
                                                </svg> Profile
                                            </a>
                                        </li>

                                        <li class="nav-item">
                                            <a class="nav-link" data-toggle="tab" href="#kt_user_edit_tab_2" role="tab">
                                                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
                                                    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                        <polygon points="0 0 24 0 24 24 0 24" />
                                                        <path d="M12,11 C9.790861,11 8,9.209139 8,7 C8,4.790861 9.790861,3 12,3 C14.209139,3 16,4.790861 16,7 C16,9.209139 14.209139,11 12,11 Z" fill="#000000" fill-rule="nonzero" opacity="0.3" />
                                                        <path d="M3.00065168,20.1992055 C3.38825852,15.4265159 7.26191235,13 11.9833413,13 C16.7712164,13 20.7048837,15.2931929 20.9979143,20.2 C21.0095879,20.3954741 20.9979143,21 20.2466999,21 C16.541124,21 11.0347247,21 3.72750223,21 C3.47671215,21 2.97953825,20.45918 3.00065168,20.1992055 Z" fill="#000000" fill-rule="nonzero" />
                                                    </g>
                                                </svg> Stores
                                            </a>
                                        </li>

                                        <li class="nav-item">
                                            <a class="nav-link" data-toggle="tab" href="#kt_user_edit_tab_3" role="tab">
                                                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
                                                    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                        <rect x="0" y="0" width="24" height="24" />
                                                        <path d="M4,4 L11.6314229,2.5691082 C11.8750185,2.52343403 12.1249815,2.52343403 12.3685771,2.5691082 L20,4 L20,13.2830094 C20,16.2173861 18.4883464,18.9447835 16,20.5 L12.5299989,22.6687507 C12.2057287,22.8714196 11.7942713,22.8714196 11.4700011,22.6687507 L8,20.5 C5.51165358,18.9447835 4,16.2173861 4,13.2830094 L4,4 Z" fill="#000000" opacity="0.3" />
                                                        <path d="M12,11 C10.8954305,11 10,10.1045695 10,9 C10,7.8954305 10.8954305,7 12,7 C13.1045695,7 14,7.8954305 14,9 C14,10.1045695 13.1045695,11 12,11 Z" fill="#000000" opacity="0.3" />
                                                        <path d="M7.00036205,16.4995035 C7.21569918,13.5165724 9.36772908,12 11.9907452,12 C14.6506758,12 16.8360465,13.4332455 16.9988413,16.5 C17.0053266,16.6221713 16.9988413,17 16.5815,17 C14.5228466,17 11.463736,17 7.4041679,17 C7.26484009,17 6.98863236,16.6619875 7.00036205,16.4995035 Z" fill="#000000" opacity="0.3" />
                                                    </g>
                                                </svg> Change Password
                                            </a>
                                        </li>

                                        <li class="nav-item" style="display: none">
                                            <a class="nav-link" data-toggle="tab" href="#kt_user_edit_tab_4" role="tab">
                                                <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1" class="kt-svg-icon">
                                                    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                                        <rect x="0" y="0" width="24" height="24" />
                                                        <path d="M6,2 L18,2 C18.5522847,2 19,2.44771525 19,3 L19,12 C19,12.5522847 18.5522847,13 18,13 L6,13 C5.44771525,13 5,12.5522847 5,12 L5,3 C5,2.44771525 5.44771525,2 6,2 Z M7.5,5 C7.22385763,5 7,5.22385763 7,5.5 C7,5.77614237 7.22385763,6 7.5,6 L13.5,6 C13.7761424,6 14,5.77614237 14,5.5 C14,5.22385763 13.7761424,5 13.5,5 L7.5,5 Z M7.5,7 C7.22385763,7 7,7.22385763 7,7.5 C7,7.77614237 7.22385763,8 7.5,8 L10.5,8 C10.7761424,8 11,7.77614237 11,7.5 C11,7.22385763 10.7761424,7 10.5,7 L7.5,7 Z" fill="#000000" opacity="0.3" />
                                                        <path d="M3.79274528,6.57253826 L12,12.5 L20.2072547,6.57253826 C20.4311176,6.4108595 20.7436609,6.46126971 20.9053396,6.68513259 C20.9668779,6.77033951 21,6.87277228 21,6.97787787 L21,17 C21,18.1045695 20.1045695,19 19,19 L5,19 C3.8954305,19 3,18.1045695 3,17 L3,6.97787787 C3,6.70173549 3.22385763,6.47787787 3.5,6.47787787 C3.60510559,6.47787787 3.70753836,6.51099993 3.79274528,6.57253826 Z" fill="#000000" />
                                                    </g>
                                                </svg> Settings
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="kt-portlet__body">
                                <form action="{{ action_save_url }}" method="post" name="adform" id="adform">
                                    <div class="tab-content">
                                        <div class="tab-pane active" id="kt_user_edit_tab_1" role="tabpanel">
                                            <div class="kt-form kt-form--label-right">
                                                <div class="kt-form__body">
                                                    <div class="kt-section kt-section--first">
                                                        <div class="kt-section__body">
                                                            <form action="{{ action_save_url }}" method="post" name="adform" id="adform">
                                                                <div class="row">
                                                                    <label class="col-xl-3"></label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <h3 class="kt-section__title kt-section__title-sm">Basic Information:</h3>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Logo</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="kt-avatar kt-avatar--outline kt-avatar--circle-" id="kt_user_edit_avatar">
                                                                            <div class="kt-avatar__holder" style="background-image: url('assets/media/company-logos/merchant-logo.jpg');"></div>
                                                                            <label class="kt-avatar__upload" data-toggle="kt-tooltip" title="" data-original-title="Change avatar">
                                                                                <i class="fa fa-pen"></i>
                                                                                <input type="file" name="profile_avatar" accept=".png, .jpg, .jpeg">
                                                                            </label>
                                                                            <span class="kt-avatar__cancel" data-toggle="kt-tooltip" title="" data-original-title="Cancel avatar">
                                                                                    <i class="fa fa-times"></i>
                                                                                 </span>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Company Name</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <input class="form-control" name="company" type="text" value="{{ company }}">
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Address</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <input class="form-control" name="address" type="text" value="{{ address }}">
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Postalcode</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <input class="form-control" name="postalcode" type="text" value="{{ postalcode }}">
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Contact Phone</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text"><i class="la la-phone"></i></span></div>
                                                                            <input type="text" name="phone" class="form-control" value="{{ phone }}" aria-describedby="basic-addon1">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Mobile</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text"><i class="la la-mobile"></i></span></div>
                                                                            <input type="text" name="mobile" class="form-control" value="{{ mobile }}" aria-describedby="basic-addon1">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Email Address</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="input-group">
                                                                            <div class="input-group-prepend"><span class="input-group-text"><i class="la la-at"></i></span></div>
                                                                            <input type="text" name="email" class="form-control" value="{{ email }}" placeholder="Email" aria-describedby="basic-addon1">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Company Site</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="input-group">
                                                                            <input type="text" name="website" class="form-control" value="{{ website }}">

                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Vat</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="input-group">
                                                                            <input type="text" name="vat" class="form-control" value="{{ vat }}" onkeypress="return allowNumbersOnly(event)">

                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Country</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <select class="form-control select_filter_box" name="country" id="country">
                                                                            <option value="-1">{{ lbl_select }}</option>
                                                                            {% for country in countries %}
                                                                                {% if country.countryid  == merchant_country %}
                                                                                    <option value="{{ country.countryid }}" selected>{{ country.name }}</option>
                                                                                {% else %}
                                                                                    <option value="{{ country.countryid }}">{{ country.name }}</option>
                                                                                {% endif %}
                                                                            {% endfor %}
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">City</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <select class="form-control select_filter_box" name="cities" id="cities">
                                                                            <option value="-1">{{ lbl_select }}</option>
                                                                            {% for city in cities %}
                                                                                {% if city.id == merchant_city %}
                                                                                    <option value="{{ city.id }}" selected>{{ city.description }}</option>
                                                                                {% else %}
                                                                                    <option value="{{ city.id }}">{{ city.description }}</option>
                                                                                {% endif %}
                                                                            {% endfor %}
                                                                        </select>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group row">
                                                                    <label class="col-xl-3 col-lg-3
                                                                    col-form-label">Schedule</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <table class="table table-bordered table-hover text-center">
                                                                            <thead>
                                                                            <tr>
                                                                                <th colspan="3">Morning</th>
                                                                                <th colspan="2">Evening</th>
                                                                            </tr>
                                                                            <tr>
                                                                                <th><span>Day</span></th>
                                                                                <th><span>From</span></th>
                                                                                <th><span>To</span></th>
                                                                                <th><span>From</span></th>
                                                                                <th><span>To</span></th>
                                                                            </tr>
                                                                            </thead>
                                                                            <tbody class="text-left">
                                                                                {% for day in days %}

                                                                                        <tr>
                                                                                            <td>
                                                                                                <span>{{ day.description }}</span>
                                                                                            </td>
                                                                                            <td>
                                                                                                <select
                                                                                                        class="form-control select_filter_box" name="time_morning_from[{{ day.day_id }}][]">
                                                                                                    <option value="-1">{{ lbl_select }}</option>
                                                                                                    {% if schedule is
                                                                                                        not empty  %}
                                                                                                        {% for s in schedule  %}
                                                                                                            {% if day.day_id == s.day_id %}
                                                                                                            {% for h in hours %}
                                                                                                                {% if s.time_morning_from == h %}
                                                                                                                    <option value="{{ h }}" selected>{{ h }}</option>
                                                                                                                {% else%}
                                                                                                                    <option value="{{ h }}">{{ h }}</option>
                                                                                                                {% endif %}
                                                                                                            {% endfor %}
                                                                                                            {% endif %}
                                                                                                        {% endfor %}
                                                                                                    {% else %}
                                                                                                        {% for h in hours %}
                                                                                                            <option value="{{ h }}">{{ h }}</option>
                                                                                                        {% endfor %}
                                                                                                    {% endif %}
                                                                                                </select>
                                                                                            </td>
                                                                                            <td>
                                                                                                <select
                                                                                                        class="form-control select_filter_box" name="time_morning_to[{{ day.day_id }}][]">
                                                                                                    <option value="-1">{{ lbl_select }}</option>
                                                                                                    {% if schedule is
                                                                                                        not empty  %}
                                                                                                        {% for s in schedule  %}
                                                                                                            {% if day.day_id == s.day_id %}
                                                                                                                {% for h in hours %}
                                                                                                                    {% if s.time_morning_to == h %}
                                                                                                                        <option value="{{ h }}" selected>{{ h }}</option>
                                                                                                                    {% else%}
                                                                                                                        <option value="{{ h }}">{{ h }}</option>
                                                                                                                    {% endif %}
                                                                                                                {% endfor %}
                                                                                                            {% endif %}
                                                                                                        {% endfor %}
                                                                                                    {% else %}
                                                                                                        {% for h in hours %}
                                                                                                            <option value="{{ h }}">{{ h }}</option>
                                                                                                        {% endfor %}
                                                                                                    {% endif %}
                                                                                                </select>
                                                                                            </td>

                                                                                            {# evening #}
                                                                                            <td>
                                                                                                <select
                                                                                                        class="form-control select_filter_box" name="time_evening_from[{{ day.day_id }}][]">
                                                                                                    <option value="-1">{{ lbl_select }}</option>
                                                                                                    {% if schedule is
                                                                                                        not empty  %}
                                                                                                        {% for s in schedule  %}
                                                                                                            {% if day.day_id == s.day_id %}
                                                                                                                {% for h in hours %}
                                                                                                                    {% if s.time_evening_from == h %}
                                                                                                                        <option value="{{ h }}" selected>{{ h }}</option>
                                                                                                                    {% else%}
                                                                                                                        <option value="{{ h }}">{{ h }}</option>
                                                                                                                    {% endif %}
                                                                                                                {% endfor %}
                                                                                                            {% endif %}
                                                                                                        {% endfor %}
                                                                                                    {% else %}
                                                                                                        {% for h in hours %}
                                                                                                            <option value="{{ h }}">{{ h }}</option>
                                                                                                        {% endfor %}
                                                                                                    {% endif %}
                                                                                                </select>
                                                                                            </td>
                                                                                            <td>
                                                                                                <select
                                                                                                        class="form-control select_filter_box" name="time_evening_to[{{ day.day_id }}][]">
                                                                                                    <option value="-1">{{ lbl_select }}</option>
                                                                                                    {% if schedule is
                                                                                                        not empty  %}
                                                                                                        {% for s in schedule  %}
                                                                                                            {% if day.day_id == s.day_id %}
                                                                                                                {% for h in hours %}
                                                                                                                    {% if s.time_evening_to == h %}
                                                                                                                        <option value="{{ h }}" selected>{{ h }}</option>
                                                                                                                    {% else%}
                                                                                                                        <option value="{{ h }}">{{ h }}</option>
                                                                                                                    {% endif %}
                                                                                                                {% endfor %}
                                                                                                            {% endif %}
                                                                                                        {% endfor %}
                                                                                                    {% else %}
                                                                                                        {% for h in hours %}
                                                                                                            <option value="{{ h }}">{{ h }}</option>
                                                                                                        {% endfor %}
                                                                                                    {% endif %}
                                                                                                </select>
                                                                                            </td>
                                                                                        </tr>

                                                                                {% endfor %}
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </div>

                                                                <div class="form-group form-group-last row">
                                                                    <label class="col-xl-3 col-lg-3 col-form-label">Company photos</label>
                                                                    <div class="col-lg-9 col-xl-6">
                                                                        <div class="dropzone dropzone-default dropzone-brand" id="kt_dropzone_2">
                                                                            <div class="dropzone-msg dz-message needsclick">
                                                                                <h3 class="dropzone-msg-title">Drop files here or click to upload.</h3>
                                                                                <span class="dropzone-msg-desc">Upload up to 10 files</span>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="tab-pane" id="kt_user_edit_tab_2" role="tabpanel">
                                            <div class="kt-form kt-form--label-right">
                                                <div class="kt-form__body">
                                                    <div class="kt-section kt-section--first">
                                                        <div class="kt-section__body">
                                                            <div class="form-group row">
                                                                <h3 class="kt-section__title kt-section__title-sm">Stores:</h3>
                                                                <div class="col-lg-12 col-xl-12">
                                                                    <table id="store_table" class="table table-bordered">
                                                                        <thead>
                                                                            <th class="datatable_th"><span>Title</span></th>
                                                                            <th class="datatable_th"><span>Address</span></th>
                                                                            <th class="datatable_th"><span>Lat</span></th>
                                                                            <th class="datatable_th"><span>Long</span></th>
                                                                        </thead>
                                                                        <tbody>
                                                                        {% for store in stores %}
                                                                            <tr id="store-row{{ loop.index - 1 }}">
                                                                                <td class="datatable_td">
                                                                                    <input type="text" value="{{ store.title }}" name="stores[{{ loop.index - 1 }}][title]" class="form-control"/>
                                                                                </td>
                                                                                <td class="datatable_td">
                                                                                    <input type="text" id="address"
                                                                                           value="{{
                                                                                    store.address }}"
                                                                                           store_id="{{ store.merchants_store_id }}" name="stores[{{
                                                                                           loop.index - 1
                                                                                    }}][address]" class="form-control" />
                                                                                </td>
                                                                                <td class="datatable_td">
                                                                                    <input type="text" id="lat"
                                                                                           store_id="{{ store.merchants_store_id }}"
                                                                                           value="{{
                                                                                    store.address_lat }}"
                                                                                           name="stores[{{ loop.index
                                                                                           - 1 }}][lat]" class="form-control" readonly="readonly"/>
                                                                                </td>
                                                                                <td class="datatable_td">
                                                                                    <input type="text" id="long"
                                                                                           store_id="{{ store.merchants_store_id }}"
                                                                                           value="{{
                                                                                    store.address_long }}"
                                                                                           name="stores[{{ loop.index - 1 }}][long]" class="form-control" readonly="readonly"/>
                                                                                </td>
                                                                                <td class="datatable_td"><button type="button" row="{{ loop.index }}" id="remove_store" store_id="{{ store.merchants_store_id }}" class="btn btn-brand"><i class="fa fa-minus-circle"></i></button></td>
                                                                            </tr>
                                                                        {% endfor %}
                                                                            <tfoot>
                                                                                <td colspan="4"></td>
                                                                                <td class="text-left">
                                                                                    <button type="button" onclick="addStore();" class="btn btn-brand">
                                                                                        <i class="fa fa-plus-circle"></i></button>
                                                                                </td>
                                                                            </tfoot>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="tab-pane" id="kt_user_edit_tab_3" role="tabpanel">
                                            <div class="kt-form kt-form--label-right">
                                                <div class="kt-form__body">
                                                    <div class="kt-section kt-section--first">
                                                        <div class="kt-section__body">
                                                            <div class="row">
                                                                <label class="col-xl-3"></label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <h3 class="kt-section__title kt-section__title-sm">Change Or Recover Your Password:</h3>
                                                                </div>
                                                            </div>
                                                            <div class="form-group row">
                                                                <label class="col-xl-3 col-lg-3 col-form-label">Current Password</label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <input type="password" name="password" class="form-control" value="" placeholder="Current password">
                                                                </div>
                                                            </div>
                                                            <div class="form-group row">
                                                                <label class="col-xl-3 col-lg-3 col-form-label">New Password</label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <input type="password" name="password_new" class="form-control" value="" placeholder="New password">
                                                                </div>
                                                            </div>
                                                            <div class="form-group form-group-last row">
                                                                <label class="col-xl-3 col-lg-3 col-form-label">Verify Password</label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <input name="password_new_verify" type="password" class="form-control" value="" placeholder="Verify password">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="kt-separator kt-separator--space-lg kt-separator--fit kt-separator--border-solid"></div>
                                                <div class="kt-form__actions">
                                                    <div class="row">
                                                        <div class="col-xl-3"></div>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <a href="#" class="btn btn-label-brand btn-bold">Save changes</a>
                                                            <a href="#" class="btn btn-clean btn-bold">Cancel</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="tab-pane" id="kt_user_edit_tab_4" role="tabpanel">
                                            <div class="kt-form kt-form--label-right">
                                                <div class="kt-form__body">
                                                    <div class="kt-section kt-section--first">
                                                        <div class="kt-section__body">
                                                            <div class="row">
                                                                <label class="col-xl-3"></label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <h3 class="kt-section__title kt-section__title-sm">Setup Email Notification:</h3>
                                                                </div>
                                                            </div>
                                                            <div class="form-group form-group-sm row">
                                                                <label class="col-xl-3 col-lg-3 col-form-label">Email Notification</label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <span class="kt-switch">
                                                                        <label>
                                                                            <input type="checkbox" checked="checked" name="email_notification_1">
                                                                            <span></span>
                                                                        </label>
                                                                    </span>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="kt-separator kt-separator--border-dashed kt-separator--portlet-fit kt-separator--space-lg"></div>
                                                    <div class="kt-section kt-section--first">
                                                        <div class="kt-section__body">
                                                            <div class="row">
                                                                <label class="col-xl-3"></label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <h3 class="kt-section__title kt-section__title-sm">Activity Related Emails:</h3>
                                                                </div>
                                                            </div>
                                                            <div class="form-group row">
                                                                <label class="col-xl-3 col-lg-3 col-form-label">When To Email</label>
                                                                <div class="col-lg-9 col-xl-6">
                                                                    <div class="kt-checkbox-list">
                                                                        <label class="kt-checkbox">
                                                                            <input type="checkbox"> You have a new request.
                                                                            <span></span>
                                                                        </label>
                                                                        <label class="kt-checkbox">
                                                                            <input type="checkbox"> You're sent a direct message.
                                                                            <span></span>
                                                                        </label>
                                                                        <label class="kt-checkbox">
                                                                            <input type="checkbox" checked="checked"> Someone cancel a request.
                                                                            <span></span>
                                                                        </label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                                    <!--begin: Form Actions -->
                                    <div class="kt-form__actions" style="float:right">
                                        <button id="btn_submit" class="btn btn-brand btn-md btn-tall btn-wide kt-font-bold kt-font-transform-u" data-ktwizard-type="action-submit">
                                            Save
                                        </button>
                                    </div>
                                    <!--end: Form Actions -->
                            </div>
                        </div>
                    </div>

                    <!-- end:: Content -->

                    <!-- begin:: Footer -->

                    <!--begin::Page Scripts(used by this page) -->
                    <script src="{{ assets }}js/pages/dashboard.js" type="text/javascript"></script>
                    <script src="{{ assets }}js/pages/custom/inbox/inbox.js" type="text/javascript"></script>
                    <!--end::Page Scripts -->

                    <script type="text/javascript">

                        var store_row= '{{ stores|length }}';

                        function addStore() {

                            html  = '<tr id="store-row' + store_row + '">';
                            html += '<td class="datatable_td"><input type="text" name="stores[' + store_row + '][title]" class="form-control"/></td>';
                            html += '<td class="datatable_td"><input type="text" store_id="' + store_row + 1
                            '" id="address" name="stores[' +
                                store_row +
                                '][address]" class="form-control" /></td>';
                            html += '<td class="datatable_td"><input type="text" id="lat" store_id="' + store_row + 1
                            '" ' +
                            'name="stores[' +
                                store_row + '][lat]" class="form-control" readonly="readonly" /></td>';
                            html += '<td class="datatable_td"><input type="text" id="long" store_id="' + store_row + 1
                            '" name="stores[' +
                                store_row + '][long]" class="form-control" readonly="readonly" /></td>';
                            html += '<td class="datatable_td"><button type="button" row="' + store_row + '" id="remove_store" store_id="0" class="btn btn-brand"><i class="fa fa-minus-circle"></i></button></td>';
                            html += '</tr>';

                            $('#store_table tbody').append(html);

                            store_row++;

                        }

                        $(document).on('focusout', '#address', function (e) {

                            var address = $(this).val();

                            var store_id = $(this).attr('store_id');

                            $.ajax({
                                url: '{{ get_cords }}',
                                datatype: 'json',
                                data: {
                                    address: address,
                                },
                                method: 'POST',
                                success: function (json) {

                                    var result = $.parseJSON(json);

                                    $("#lat[store_id='" + store_id + "']").val(result.lat);
                                    $("#long[store_id='" + store_id + "']").val(result.long);

                                } //end function
                            }); //end ajax
                        });


                        $(document).on('click', '#remove_store', function (e) {

                            var store_id = $(this).attr('store_id') ;
                            var row = $(this).attr('row') ;

                            store_row--;

                            if (store_id == 0) {

                                $('#store-row' + row).remove();

                                return false;
                            }

                            $.ajax({
                                url: '{{ remove_store_url }}',
                                datatype: 'json',
                                data: {
                                    store_id: store_id,
                                },
                                method: 'POST',
                                success: function (json) {
                                    var result = $.parseJSON(json);

                                    if (result['success'] == true) {
                                        $('#store-row' + row).remove();
                                    }
                                } //end function
                            }); //end ajax
                        });//end click

                    </script>

                    {{ render(controller('App\\Controller\\Common\\Scripts::index')) }}

                    {{ render(controller('App\\Controller\\Common\\Footer::index')) }}