{{ header }}
<style type="text/css">
  .about-bg {
     margin-top: 0px !important;
}
</style>
<script type="application/javascript" crossorigin="anonymous" src="{{ srcUrl }}"  loaded=true;"></script>
<section class="about-bg">
<div id="account-edit" class="container personal-frm">
  <ul class="breadcrumb" style="height: 50px !important;">
    {% for breadcrumb in breadcrumbs %}
    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  {% if error_warning %}
  <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
  {% endif %}
  

  <div class="container mt-4">
        <div class="vertical-tabs row">
            <ul class="nav nav-tabs col-sm-3" role="tablist">
                <li class="nav-item">
                  <a class="nav-link active" data-toggle="tab" href="#account_tab" role="tab" aria-controls="home">My Account</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link " data-toggle="tab" href="#member_tab" role="tab" aria-controls="home">Membership Details</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link " href="password" >Change Password</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link " href="javascript:void(0)">Archive/Issues</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link " href="election">Election</a>
                </li>



                <!-- <li class="nav-item">
                  <a class="nav-link" href="" aria-controls="profile">Conference</a>
                </li>

                <li class="nav-item">
                  <a class="nav-link " data-toggle="tab" href="#journal_tab" role="tab" aria-controls="home">Online Journal Access</a>
                </li> -->
                <li class="nav-item">
                  <a class="nav-link " data-toggle="tab" href="#award_tab" role="tab" aria-controls="home">Award</a>
                </li>
				<li class="nav-item">
                  <a class="nav-link " href="javascript:void(0)" onclick="openJsCheckout()" >Pay Membership Fee</a>
                </li>
				<li class="nav-item">
                  <a class="nav-link " href="{{ other_payment }}" >Other Payment</a>
                </li>
				<li class="nav-item">
                  <a class="nav-link " href="{{ invoice_list }}" >Invoice Download</a>
                </li>

            </ul>
            <div class="tab-content col-sm-8">
                <div class="tab-pane active" id="account_tab" role="tabpanel">
                  <div class="sv-tab-panel">
                      <h3>Personal Details</h3>
					    {% if success %}
            <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
            {% endif %}
            {% if error_warning %}
            <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
            {% endif %}
                      <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
                        <fieldset>
                          <legend class="mb-4">{{ text_your_details }}</legend>
                          {#<div class="form-group required">#}
                          {#   <p class="label-txt" for="input-firstname">{{ entry_firstname }}</p>#}
                            {#<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }} </label>#}
                          {#  <div class="col-sm-10">#}
                              
                          {#  </div>#}
                          {#</div>#}
                          <div class="row">
                          <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-firstname">{{ entry_firstname }}</p>
                            <input type="text"  name="firstname" value="{{ firstname }}" id="input-firstname" class="form-control input" />
  <input type="hidden" value="{{ breadcrumbs1.texturll}}"  id="input-url">                   
				          {% if error_firstname %}
                              <div class="text-danger">{{ error_firstname }}</div>
                              {% endif %}
                                <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>
                            <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-firstname">{{ entry_lastname }}</p>
                            <input type="text" name="lastname" value="{{ lastname }}" id="input-lastname" class="form-control input" />
                              {% if error_lastname %}
                              <div class="text-danger">{{ error_lastname }}</div>
                              {% endif %}
                                <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>
                          {#<div class="form-group required">#}
                          {#  <label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>#}
                          {#  <div class="col-sm-10">#}
                          {#    <input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />#}
                          {#    {% if error_lastname %}#}
                          {#    <div class="text-danger">{{ error_lastname }}</div>#}
                          {#    {% endif %}#}
                          {#  </div>#}
                          {#</div>#}
                          <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-firstname">{{ entry_email }}</p>
                             <input type="email" name="email" value="{{ email }}" id="input-email" class="form-control input" />
                             <input type="hidden"  value="{{ balance }}" id="input-balance" class="form-control input" />
                              {% if error_email %}
                              <div class="text-danger">{{ error_email }}</div>
                              {% endif %}
                              <div class="line-box">
                                  <div class="line"></div>
                              </div>
                          </div>

                          

                          {#<div class="form-group required">#}
                          {#  <label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>#}
                          {#  <div class="col-sm-10">#}
                          {#    <input type="email" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />#}
                          {#    {% if error_email %}#}
                          {#    <div class="text-danger">{{ error_email }}</div>#}
                          {#    {% endif %}#}
                          {#  </div>#}
                          {#</div>#}

                          <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-email2">E Mail(Secondary)</p>
                             <input type="email" name="email2" value="{{ email2 }}" id="input-email2" class="form-control input" />
                              <div class="line-box">
                                  <div class="line"></div>
                              </div>
                          </div>

                          {#<div class="form-group required">#}
                          {#  <label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>#}
                          {#  <div class="col-sm-10">#}
                          {#    <input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />#}
                          {#    {% if error_telephone %}#}
                          {#    <div class="text-danger">{{ error_telephone }}</div>#}
                          {#    {% endif %}#}
                          {#  </div>#}
                          {#</div>#}

                            <div class="form-group col-sm-6 required">
                              <p class="label-txt" for="input-firstname">Mobile Number</p>
                              <input type="tel" name="telephone" value="{{ telephone }}" id="input-telephone" class="form-control input" maxlength="12" />
                                {% if error_telephone %}
                                <div class="text-danger">{{ error_telephone }}</div>
                                {% endif %}
                                  <div class="line-box">
                                      <div class="line"></div>
                                  </div>
                            </div>

                            <div class="form-group col-sm-6 ">
                            <p class="label-txt" for="input-mobile">TelePhone</p>
                            <input type="tel" name="mobile" value="{{ mobile }}" id="input-mobile" class="form-control input" maxlength="12" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-6 required">
                            <p class="label-txt" for="input-designation">Designation</p>
                            <input type="text" maxlength="80" name="designation" value="{{ designation }}" id="input-designation" class="form-control input" />
                                <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <!-- <div class="form-group col-sm-6 ">
                            <p class="label-txt" for="input-fpsi">FPSI Year</p> -->
                            <input type="hidden" maxlength="10" placeholder="" name="fpsi" value="{{ fpsi }}" id="input-fpsi" class="form-control input" />
                            <!-- <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div> -->

                            <div class="form-group col-sm-12 required">
                            <p class="label-txt" for="input-specialization">Specialization</p>
                            <input type="text" maxlength="80" name="specialization" value="{{ specialization }}" id="input-specialization" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-12 required">
                            <p class="label-txt" for="input-allied">Allied</p>
                            <input type="text" maxlength="80" name="allied" value="{{ allied }}" id="input-allied" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-12 required">
                            <p class="label-txt" for="input-anydetail">Other Details</p>
                            <input type="text" maxlength="80" name="anydetail" value="{{ anydetail }}" id="input-anydetail" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>


                            <div class="col-sm-12 mt-4"><legend class="mb-4">Address Information</legend></div>

                            <div class="form-group col-sm-12 required">
                            <p class="label-txt" for="input-add1">Address 1</p>
                            <input type="text" maxlength="80" name="add1" value="{{ add1 }}" id="input-add1" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-12">
                            <p class="label-txt" for="input-add2">Address 2</p>
                            <input type="text" maxlength="80" name="add2" value="{{ add2 }}" id="input-add2" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-pincode">Pincode</p>
                            <input type="text" maxlength="6" name="pincode" value="{{ pincode }}" id="input-pincode" class="form-control input" />
                            <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group col-sm-6">
                            <p class="label-txt" for="input-city">City</p>
                            <input type="text" maxlength="60" name="city" value="{{ city }}" id="input-city" class="form-control input" />
                                <div class="line-box">
                                    <div class="line"></div>
                                </div>
                            </div>

                            <div class="form-group">
                            <label class="col-sm-2 control-label" for="input-telephone">State</label>
                              <div class="col-sm-10">
                                <select name="state" id="input-state" class="form-control">
                                  <option value="">Select</option>
                                  {% for allstate in states %}
                                  <option value="{{ allstate.name }}" {% if allstate.name == state %} selected {% endif %} >{{ allstate.name }}</option>
                                  {% endfor %}
                                </select>
                              </div>
                            </div>

                            <div class="form-group hidden" style="display: none;">
                            <label class="col-sm-2 control-label" for="input-telephone">Zone</label>
                              <div class="col-sm-10">
                                <select name="zone" id="input-state" class="form-control">
                                  <option value="">Select</option>
                                  {% for zone in zones %}
                                  <option value="{{ zone.code }}" {% if zone.code == customerzone %} selected {% endif %} >{{ zone.name }}</option>
                                  {% endfor %}
                                </select>
                              </div>
                            </div>

                          </div>
                          
                          {% for custom_field in custom_fields %}
                          {% if custom_field.type == 'select' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <select name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">
                                <option value="">{{ text_select }}</option>
                                {% for custom_field_value in custom_field.custom_field_value %}
                                {% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
                                <option value="{{ custom_field_value.custom_field_value_id }}" selected="selected">{{ custom_field_value.name }}</option>
                                {% else %}
                                <option value="{{ custom_field_value.custom_field_value_id }}">{{ custom_field_value.name }}</option>
                                {% endif %}
                                {% endfor %}
                              </select>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'radio' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <div>
                                {% for custom_field_value in custom_field.custom_field_value %}
                                <div class="radio">
                                  {% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id == account_custom_field[custom_field.custom_field_id] %}
                                  <label>
                                    <input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
                                    {{ custom_field_value.name }}</label>
                                  {% else %}
                                  <label>
                                    <input type="radio" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{{ custom_field_value.custom_field_value_id }}" />
                                    {{ custom_field_value.name }}</label>
                                  {% endif %}
                                </div>
                                {% endfor %}
                              </div>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'checkbox' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <div>
                                {% for custom_field_value in custom_field.custom_field_value %}
                                <div class="checkbox">
                                  {% if account_custom_field[custom_field.custom_field_id] and custom_field_value.custom_field_value_id in account_custom_field[custom_field.custom_field_id] %}
                                  <label>
                                    <input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" checked="checked" />
                                    {{ custom_field_value.name }}</label>
                                  {% else %}
                                  <label>
                                    <input type="checkbox" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}][]" value="{{ custom_field_value.custom_field_value_id }}" />
                                    {{ custom_field_value.name }}</label>
                                  {% endif %}
                                </div>
                                {% endfor %}
                              </div>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'text' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'textarea' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <textarea name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" rows="5" placeholder="{{ custom_field.name }}" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control">{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}</textarea>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'file' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <button type="button" id="button-custom-field{{ custom_field.custom_field_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default"><i class="fa fa-upload"></i> {{ button_upload }}</button>
                              <input type="hidden" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }} {% endif %}" />
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'date' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <div class="input-group date">
                                <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
                                <span class="input-group-btn">
                                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                                </span></div>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'time' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <div class="input-group time">
                                <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
                                <span class="input-group-btn">
                                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                                </span></div>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% if custom_field.type == 'time' %}
                          <div class="form-group{% if custom_field.required %} required {% endif %} custom-field" data-sort="{{ custom_field.sort_order }}">
                            <label class="col-sm-2 control-label" for="input-custom-field{{ custom_field.custom_field_id }}">{{ custom_field.name }}</label>
                            <div class="col-sm-10">
                              <div class="input-group datetime">
                                <input type="text" name="custom_field[{{ custom_field.location }}][{{ custom_field.custom_field_id }}]" value="{% if account_custom_field[custom_field.custom_field_id] %}{{ account_custom_field[custom_field.custom_field_id] }}{% else %}{{ custom_field.value }}{% endif %}" placeholder="{{ custom_field.name }}" data-date-format="YYYY-MM-DD HH:mm" id="input-custom-field{{ custom_field.custom_field_id }}" class="form-control" />
                                <span class="input-group-btn">
                                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                                </span></div>
                              {% if error_custom_field[custom_field.custom_field_id] %}
                              <div class="text-danger">{{ error_custom_field[custom_field.custom_field_id] }}</div>
                              {% endif %}
                            </div>
                          </div>
                          {% endif %}
                          {% endfor %}
                        </fieldset>
                        <div class="buttons clearfix">
                          {#<div class="pull-left"><a href="{{ back }}" class="btn btn-success">{{ button_back }}</a></div>#}
                          <div class="pull-right">
                            <input type="submit" value="Save" class="btn btn-success" />
                          </div>
                        </div>
					  </form>
                  </div>
                </div>
                <div class="tab-pane" id="member_tab" role="tabpanel">
                    <div class="sv-tab-panel">
                        <h3>Membership Details</h3>

                        <table class="table table-striped col-sm-6 mt-4">
                          <tbody>
                            <tr>
                              <th scope="row">Membership Type:</th>
                              <td>{{ membership }}</td>
                            </tr>
                            
                            

                          </tbody>
                        </table>
                    </div>
                </div>

                <div class="tab-pane" id="journal_tab" role="tabpanel">
                    <div class="sv-tab-panel row">


                        <!-- <div class="col-md-12">
                          <p><b style="text-align: left !important">Activation Code: </b><span id="activation_code">{{ activation_code }}</span></p>
                            <p><b>Validity:</b><span id="code_validity"> {{code_validity}}</span></p>
                        </div> -->
                        
                        
                    </div>
                </div>

                <div class="tab-pane" id="award_tab" role="tabpanel">
                    <div class="sv-tab-panel row">
                        <div class="col-md-8">
                            <h3>Award</h3>

                            <h5>Pending Form</h5>
                            {% if pending_awards %}
                              <table class="table">
                                <thead>
                                  <tr>
                                    <th scope="col">#</th>
                                    <th scope="col">Award</th>
                                    <th scope="col">Edit</th>
                                    <th scope="col">Delete</th>
                                  </tr>
                                </thead>
                                <tbody>
                                  {% for key, award in pending_awards %}
                                  <tr>
                                    <th scope="row">{{key+1}}</th>
                                    <td>{{award.awardname}}</td>
                                    <td><a href="{{award.href}}"><i class="fa fa-edit"></i></a></td>
                                    <td><a href="{{award.delhref}}"><i class="fa fa-trash"></i></a></td>
                                  </tr>
                                  {% endfor %}
                                </tbody>
                              </table>
                            {% else %}
                            <p>No Pending Awards</p>
                            {% endif %}

                            <h5>Submitted Form</h5>
                            {% if submitted_awards %}
                              <table class="table">
                                <thead>
                                  <tr>
                                    <th scope="col">#</th>
                                    <th scope="col">Award</th>
                                    <th scope="col">Year</th>
                                    <th scope="col">View</th>
                                    <!-- <th scope="col">Download</th> -->
                                  </tr>
                                </thead>
                                <tbody>
                                  {% for key, award in submitted_awards %}
                                  <tr>
                                    <th scope="row">{{key+1}}</th>
                                    <td>{{award.awardname}}</td>
                                    <td>{{award.year}}</td>
                                    <td><a href="{{award.href}}"><button class="btn btn-success">View</button></a></td>
                                    <!-- <td><a href="{{award.href}}" download><button class="btn btn-success">Download</button></a></td> -->
                                  </tr>
                                  {% endfor %}
                                </tbody>
                              </table>
                            {% else %}
                            <p>No Pending Awards</p>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</section>
<script type="text/javascript"><!--
// Sort the custom fields
$('.form-group[data-sort]').detach().each(function() {
  if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('.form-group').length) {
    $('.form-group').eq($(this).attr('data-sort')).before(this);
  }

  if ($(this).attr('data-sort') > $('.form-group').length) {
    $('.form-group:last').after(this);
  }

  if ($(this).attr('data-sort') == $('.form-group').length) {
    $('.form-group:last').after(this);
  }

  if ($(this).attr('data-sort') < -$('.form-group').length) {
    $('.form-group:first').before(this);
  }
});
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
  var element = this;

  $('#form-upload').remove();

  $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');

  $('#form-upload input[name=\'file\']').trigger('click');

  if (typeof timer != 'undefined') {
      clearInterval(timer);
  }

  timer = setInterval(function() {
    if ($('#form-upload input[name=\'file\']').val() != '') {
      clearInterval(timer);

      $.ajax({
        url: 'index.php?route=tool/upload',
        type: 'post',
        dataType: 'json',
        data: new FormData($('#form-upload')[0]),
        cache: false,
        contentType: false,
        processData: false,
        beforeSend: function() {
          $(element).button('loading');
        },
        complete: function() {
          $(element).button('reset');
        },
        success: function(json) {
          $(element).parent().find('.text-danger').remove();

          if (json['error']) {
            $(element).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
          }

          if (json['success']) {
            alert(json['success']);

            $(element).parent().find('input').val(json['code']);
          }
        },
        error: function(xhr, ajaxOptions, thrownError) {
          alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
        }
      });
    }
  }, 500);
});
//--></script>
<script type="text/javascript">
 function proceed(value){
        if (value == 'sec_pass'){

            var firstname = document.getElementById("firstname").value;

            if (email == '') {
                alert("Please enter the firstname");
            }
        }
 }
/* $('.date').datetimepicker({
  language: '{{ datepicker }}',
  pickTime: false
});

$('.datetime').datetimepicker({
  language: '{{ datepicker }}',
  pickDate: true,
  pickTime: true
});

$('.time').datetimepicker({
  language: '{{ datepicker }}',
  pickDate: false
}); */
</script>
<script>
function checknow()
{
var ft=document.getElementById("input-firstname").value;
var last=document.getElementById("input-lastname").value;
var des=document.getElementById("input-designation").value;
var addr=document.getElementById("input-add1").value;
var em=document.getElementById("input-email").value;
var u=document.getElementById("input-url").value;

if(ft != ''  && des != '' && em != '')
{

window.location=u;
}else{

alert("Please Fill Firstname | Lastname | Email | Designation | Mobile");
}
}
</script>
<script type="text/javascript">
  function openJsCheckout(){

  if(document.getElementById("paytmError")!==null){ 
      document.getElementById("paytmError").remove(); 
  }

  var transactionToken = "{{ rdata.txnToken }}";
  if(transactionToken){
      invokeBlinkCheckoutPopup("{{ rdata.txnToken }}", "{{ rdata.orderId }}", "{{ rdata.amount }}");
    }else{
      document.getElementById("btn-confirm-paytm").innerHTML += '<div id="paytmError">{{ rdata.message }}</div>';
  }
  }

 
  function invokeBlinkCheckoutPopup(txnToken, orderId, amount){
        var config = {
         "root": "",
         "flow": "DEFAULT",
         "data": {
          "orderId": orderId,
          "token": txnToken,
          "tokenType": "TXN_TOKEN",
          "amount": amount
         },
         "integration": {
                          "platform": "Opencart",
                          "version": "{{ rdata.version }}"
                      },
         "handler": {
            "notifyMerchant": function(eventName,data){
        if(eventName == 'SESSION_EXPIRED'){
          location.reload(); 
        }
            } 
          }
        };
      
        if(window.Paytm && window.Paytm.CheckoutJS){
                // initialze configuration using init method 
                window.Paytm.CheckoutJS.init(config).then(function onSuccess() {
                   // after successfully update configuration invoke checkoutjs
                   window.Paytm.CheckoutJS.invoke();
                }).catch(function onError(error){
                   // console.log("error => ",error);
                });
        } 
    }
</script>
{{ footer }}
