<style media="print">
  @media print{
    #header,
    #column-left{
      display: none;
    }

    td .btn.btn-success{
      display: none
    }

    .marks-counter{
      display: none;
    }
  }

.hidden{
    display: none;
  }
</style>
<style>
  
  th, td{
    font-size:14px;
  }

</style>
{{ header }}{{ column_left }}

<div id="content">
  <div class="page-header">
    <div class="container-fluid">
       <h1 class="fs-title mt-0 mb-4" style="text-transform: capitalize;">Application Form For {{award['award_name']}}</h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
        <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    {% if error_warning %}
    <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-trophy"></i>Evaluation Sheet</h3>
      </div>
      <div class="panel-body">

        <style>

            .file-input{
              display: inline-block;
                position:relative;
                width:90px;
               height:30px;
               background-color:#28a745;
                overflow: hidden;
               box-shadow: 0 10px 15px -5px #aaaa;
            }

            .file-input + a{
              font-size: 13px;
              font-weight: bold;
              border-radius: 0;
              line-height: 1.3;
              height: 30px;
              margin-left: 4px;
            }

            .file-input:before{
                content:'Upload';
               line-height:30px;
               width:100%;
               position:absolute;
               text-align:center;
               font-family:sans-serif;
               font-size: 13px;`
               letter-spacing:.5px;
               font-weight:bold;
               color:#fff;
            }

            .file-input input{
                width:100%;
               height:100%;
               opacity:0;
            }
            .inner-wrap{
                /* min-height: 1650px; */
                background: #f3f3f3;
                position: relative;
                z-index: 0;
                padding-bottom: 80px;
            }
            /*form styles*/
            label.custom-file-label {
                margin-top: 0;
                border: 0;
                border-bottom: 1px solid #BCBCBC;
                background: transparent;
                text-align: left;
            }
            p.label-txt {
                pointer-events: none;
            }
            #submitaward {
                width: 100%;
                margin: 50px auto;
                text-align: center;
                position: relative;
            }
            #submitaward fieldset {
                background: white;
                border: 0 none;
                border-radius: 3px;
                box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
                padding: 20px 30px;
                box-sizing: border-box;
                width: 100%;
                margin: 0 auto;
                /*stacking fieldsets above each other*/
                position: static;
            }
            /*Hide all except first fieldset*/
            #submitaward fieldset:not(:first-of-type) {
                display: none;
            }
            /*inputs*/

            textarea {
                width: 100%;
                border: none;
                margin-bottom: -10px;
            }

            /*buttons*/
            #submitaward .action-button {
                width: 110px;
                background: #27AE60;
                font-weight: bold;
                color: white;
                border: 0 none;
                border-radius: 1px;
                cursor: pointer;
                padding: 7px 5px;
                margin: 30px 5px 20px;
                transition: all .250s ease-out;
            }
            #submitaward .action-button:hover, #submitaward .action-button:focus {
                /* box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60; */
                opacity: .9;
                outline-color: #1e8a4c;
                outline-style: outset;
                outline-width: 1px;
            }
            /*headings*/
            .inner-wrap.app-form h2 {
                font-size: 26px;
                margin-bottom: 20px;
            }
            .fs-title {
                font-size: 15px;
                /* text-transform: uppercase; */
                color: #2C3E50;
                margin-bottom: 10px;
            }
            .fs-subtitle {
                font-weight: normal;
                font-size: 13px;
                color: #666;
                margin-bottom: 20px;
            }
            /*progressbar*/
            #submitaward #progressbar {
                margin-bottom: 30px;
                overflow: hidden;
                /*CSS counters to number the steps*/
                counter-reset: step;
            }
            #submitaward #progressbar li {
                list-style-type: none;
                color: inherit;
                text-transform: uppercase;
                font-size: 12px;
                font-weight: 600;
                width: 20%;
                float: left;
                position: relative;
            }
            #submitaward #progressbar li:before {
                content: counter(step);
                counter-increment: step;
                width: 20px;
                line-height: 20px;
                display: block;
                font-size: 10px;
                color: #333;
                background: #c3c3c3;
                border-radius: 3px;
                margin: 0 auto 5px auto;
            }
            #submitaward #progressbar li:after{
                content: '';
                width: 100%;
                height: 2px;
                background: #53635e;
                position: absolute;
                left: -50%;
                top: 9px;
                z-index: -1;
            }
            #submitaward #progressbar li:first-child:after{
                content: none;
            }
            #submitaward #progressbar li.active:before, #submitaward #progressbar li.active:after {
                background: #27AE60;
                color: white;
            }
            textarea:focus {
                outline: none;
            }
            .label-txt{
                top: -1.8em;
            }
            input::-webkit-outer-spin-button,
            input::-webkit-inner-spin-button {
              -webkit-appearance: none;
              margin: 0;
            }

            /* Firefox */
            input[type=number] {
              -moz-appearance: textfield;
            }
        </style>

        <div class="inner-wrap pt-4 app-form">
            <div class="">
              <div id="submitaward">
                  <fieldset>

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Personal Information</h5>
                      <table class="table table-striped">
                        <tbody>

                          <tr>
                            <th  scope="row">1.</th>
                            <td class="text-left"><b>Name</b></td>
                            <td width="50%" class="text-right">
                              {{award['customer_name']}}
                            </td>
                          </tr>

                          <tr>
                            <th  scope="row">2.</th>
                            <td class="text-left"><b>Address</b></td>
                            <td width="50%" class="text-right">
                              {{award['customer_address']}}
                            </td>
                          </tr>


                          <tr>
                            <th  width="10%" scope="row">3.</th>
                            <td class="text-left"><b>Passport size photograph</b></td>
                            <td width="10%" class="text-right">
                              <div class="d-flex justify-content-end align-items-center">
                                {% if award['photo'] != '' %}
                  <img src="https://entosocindia.org/{{award['photo']}}" width="100px">
                                  <!---<a class="btn btn-success" href="https://entosocindia.org/{{award['photo']}}" target="_blank">View</a>-->
                                  {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                {% endif %}
                              </div>
                            </td>
                          </tr>
                          <tr>
                            <th  width="10%" scope="row">4.</th>
                            <td class="text-left"><b>Date of birth</b></td>
                            <td width="10%" class="text-right">
                              <div class="d-flex justify-content-end align-items-center">
                                {% if award['dobfile'] != '' %}
                
                                  <div id="dob" style="display:none;"><img src="https://entosocindia.org/{{award['dobfile']}}" width="100%"></div>
                                 
                                  <a class="btn btn-success"  href="https://entosocindia.org/{{award['dobfile']}}" target="_blank">View</a>
                                  {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                {% endif %}
                              </div>
                            </td>
                          </tr>
                        </tbody>
                      </table>

                      <!-- <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Recommendations</h5>
                      {% if award['ec_recog'] == 'Yes' %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' ><span><b>For EC Nominees</b></span></th></tr>
                              <tr>
                                <th  width="10%" scope="row">1.</th>
                                <td class="text-left"><span>Attach nomination letter received from IPS HQ</span></td>
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award['ecfile'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award['ecfile']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                      {% endif %}

                      {% if award['ec_recog'] == 'No' %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' ><span>FPSI Recommendation: (Attach letters of recommendation of two fellows of the Society (FPSI))</span></th></tr>
                              <tr>
                                <th width="10%" scope="row">1.</th>
                                <td class="text-left"><b>First Fellow’s recommendation letter: </b>{{award['proposer']}}</td>
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award['file1'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award['file1']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              <tr>
                                <th scope="row">2.</th>
                                <td class="text-left"><b>Second Fellow’s recommendation letter: </b>{{award['seconders']}}</td>
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award['file2'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award['file2']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                      {% endif %} -->

                      
                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">1. Academic Record and Professional Attainments</h5>
                      {% if academics %}
                      <table class="table table-striped">
                        <tbody>
                          <tr><th colspan="12" style='text-align:left' >Academic career</th></tr>
                          <tr>
                            <th width="10%" scope="row">SN</th>
                            <td class="text-left"><b>Degree</b></td>
                            <td class="text-left"><b>University/Institution</b></td>
                            <td class="text-left"><b>Year</b></td>
                            <td class="text-left"><b>Distinction</b></td>
                            <!-- <td class="text-left"><b>Max</b></td>
                            <td class="text-left"><b>Obtained</b></td>

                            {% if award['r1']  == user_id or user_group_id == 1 %}
                            <td width="8%" class="text-right"><b>R 1</b></td>
                            {% endif %}
                            {% if award['r2']  == user_id or user_group_id == 1 %}
                            <td width="8%" class="text-right"><b>R 2</b></td>
                            {% endif %}
                            {% if award['r3']  == user_id or user_group_id == 1 %}
                            <td width="8%" class="text-right"><b>R 3</b></td>
                            {% endif %} -->
                            <td width="10%" class="text-right"><b>Attachments</b></td>
                          </tr>
                          {% for i, academic in academics %}
                              {% if academic['exam']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{academic['exam']}}</td>
                                <td class="text-left">{{academic['board']}}</td>
                                <td class="text-left">{{academic['year']}}</td>
                                <td class="text-center">{{academic['distinction']}}</td>
                                <!-- <td class="text-center maximum">{{academic['max']}}</td>
                                <td class="text-left obtained">{{academic['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('academic','r1',this.value,'{{academic['id']}}')" value="{{academic['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('academic','r2',this.value,'{{academic['id']}}')" value="{{academic['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('academic','r3',this.value,'{{academic['id']}}')" value="{{academic['r3']}}"></td>
                                {% endif %} -->
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if academic['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{academic['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                  </td>
                              </tr>
                              {% endif %}
                          {% endfor %}
                        </tbody>
                      </table>
                      {% endif %}

                      {% if phdguideds %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >Professional attainments</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Position Held</b></td>
                                <td class="text-left"><b>Institution</b></td>
                                <td class="text-left"><b>Period of appointment</b></td>
                                <!-- <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %} -->
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, phdguided in phdguideds %}
                              {% if phdguided['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{phdguided['name']}}</td>
                                {% if phdguided['degree'] != '' %}
                                <td class="text-left">{{phdguided['degree']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                {% if phdguided['guide'] != '' %}
                                <td class="text-left">{{phdguided['guide']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <!-- <td class="text-left maximum">{{phdguided['max']}}</td>
                                <td class="text-left obtained">{{phdguided['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('phdguided','r1',this.value,'{{phdguided['id']}}')" value="{{phdguided['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('phdguided','r2',this.value,'{{phdguided['id']}}')" value="{{phdguided['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('phdguided','r3',this.value,'{{phdguided['id']}}')" value="{{phdguided['r3']}}"></td>
                                {% endif %} -->
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if phdguided['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{phdguided['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if trainings %}
                        <table class="table table-striped hidden">
                          <tbody>
                            <tr><th colspan="12" style='text-align:left' >(ii) Training acquired : 5 marks (2 marks for International, 1 for national)</th></tr>
                            <tr>
                              <th width="10%" scope="row">SN</th>
                              <td class="text-left"><b>Training Name</b></td>
                              <td class="text-left"><b>Type</b></td>
                              <td class="text-left"><b>Max</b></td>
                              <td class="text-left"><b>Obtained</b></td>
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 1</b></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 2</b></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 3</b></td>
                              {% endif %}
                              <td width="10%" class="text-right"><b>Attachments</b></td>
                            </tr>
                            {% set foo = 0 %}

                            {% for i, training in trainings %}
                            {% if training['name']  != '' %}
                            {% set foo = foo+training['obtained'] %}
                            {% if foo <= 5 %}
                            <tr>
                              <th  width="10%" scope="row">{{ i+1 }}.</th>
                              <td class="text-left">{{training['name']}}</td>
                              {% if training['type'] != '' %}
                              <td class="text-left">{{training['type']}}</td>
                              {% else %}
                              <td class="text-left"><span style="color: red;" >N/A</span></td>
                              {% endif %}
                              <td class="text-left maximum">{{training['max']}}</td>
                              <td class="text-left obtained">{{training['obtained']}}</td>
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('training','r1',this.value,'{{training['id']}}')" value="{{training['r1']}}"></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('training','r2',this.value,'{{training['id']}}')" value="{{training['r2']}}"></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('training','r3',this.value,'{{training['id']}}')" value="{{training['r3']}}"></td>
                              {% endif %}
                              <td width="10%" class="text-right">
                                <div class="d-flex justify-content-end align-items-center">
                                  {% if training['file'] != '' %}
                                    <a class="btn btn-success" href="https://entosocindia.org/{{training['file']}}" target="_blank">View</a>
                                    {% else %}
                                        <span class='text-danger text-center'>No Attachment Found!</span>
                                  {% endif %}
                                </div>
                              </td>
                            </tr>
                            {% endif %}
                            {% endif %}
                            {% endfor %}
                          </tbody>
                        </table>
                      {% endif %}

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Special attainments of the nominee</h5>
                      {% if international_awards %}
                        <table class="table table-striped">
                          <tbody>
                            <tr>
                              <!-- <td class="text-left"><b>Award</b></td> -->
                              <!-- {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 1</b></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 2</b></td>
                              {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 3</b></td>
                              {% endif %}
                              <td width="10%" class="text-right"><b>Attachments</b></td> -->
                            </tr>
                            {% for i, international_award in international_awards %}
                              {% if international_award['name']  != '' %}
                              <tr>
                                <td class="text-left">{{international_award['name']}} </td>
                                <!-- <td class="text-left">{{international_award['max']}} </td>
                                <td class="text-left">{{international_award['obtained']}} </td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('international_award','r1',this.value,'{{international_award['id']}}')" value="{{international_award['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('international_award','r2',this.value,'{{international_award['id']}}')" value="{{international_award['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('international_award','r3',this.value,'{{international_award['id']}}')" value="{{international_award['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if international_award['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{international_award['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td> -->
                              </tr>
                              {% endif %}
                            {% endfor %}
                          </tbody>
                        </table>
                      {% endif %}

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Publications</h5>
                      {% if naas_publications %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >List 20 most important research publications in chronological order. For each publication, give name(s) of the author(s),indicate the corresponding author by‘*’ after his/her name, year of publication, full title of the paper, name of the journal, volume No. and page Nos. and NAAS rating of current year.</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Details of Publications in the format given above</b></td>
                                <td class="text-left"><b>NAAS Journal ID and (Score)</b></td>
                                <td class="text-left"><b>Number of Citations</b></td>
                                <!-- <td class="text-left"><b>Author Type</b></td> -->
                                <!-- <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, naas_publication in naas_publications %}
                              {% if naas_publication['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{naas_publication['name']}}</td>
                                <td class="text-left">{{naas_publication['journal']}}</td>

                                {% if naas_publication['rating'] != '' %}
                                <td class="text-left">{{naas_publication['rating']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}

                                {% if naas_publication['author'] != '' %}
                                <td class="text-left hidden">{{naas_publication['author']}}</td>
                                {% else %}
                                <td class="text-left hidden"><span style="color: red;" >N/A</span></td>
                                {% endif %}

                                <!-- <td class="text-left maximum">{{naas_publication['max']}}</td>
                                <td class="text-left obtained">{{naas_publication['obtained']}}</td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtainedpub" onfocusout="updatemarks('naas_publication','r1',this.value,'{{naas_publication['id']}}')" value="{{naas_publication['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtainedpub" onfocusout="updatemarks('naas_publication','r2',this.value,'{{naas_publication['id']}}')" value="{{naas_publication['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtainedpub" onfocusout="updatemarks('naas_publication','r3',this.value,'{{naas_publication['id']}}')" value="{{naas_publication['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if naas_publication['file'] != '' %}
                  
                   <div id="naas121" style="display:none">shubha</div>
  
                                      <a class="btn btn-success" id="naas_publication" href="https://entosocindia.org/{{naas_publication['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">List of 5 most important Products/Technologies/Discoveries/Patents by the nominee</h5>
                      {% if symposia_conducts %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="8" style='text-align:left' ><p><strong><b>*</b> Please see item 1 (b) in the Guidelines for Evaluation and list the products, technologies and software in the order scoring maximum to minimum score<br><b>*</b> Also for details of Product/Technology/Discoveries/Software write in one bullet point its impact in terms of adoption, commercialization and revenue generated</strong></p></th></tr>
                              <tr>
                                <td class="text-left" width="15%"><b>Details of Product/Technology/Discoveries/Software</b></td>
                                <td class="text-left" width="15%"><b>Patent No./Country of patent Release/ notification details Commercialization</b></td>
                                <td class="text-left" width="15%"><b>List according to category (I,II) as given in 2 of the guidelines for evaluation </b></td>
                                <!-- <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>

                              {% for i, symposia_conduct in symposia_conducts %}
                              {% if symposia_conduct['name']  != '' %}
                              <tr>
                                
                                <td class="text-left"><b>{{ i+1 }}) </b>{{symposia_conduct['name']}}</td>
                                {% if symposia_conduct['type'] != '' %}
                                <td class="text-left">{{symposia_conduct['type']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}

                                {% if symposia_conduct['secretary'] != '' %}
                                <td class="text-left">{{symposia_conduct['secretary']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <!-- <td class="text-left maximum">{{symposia_conduct['max']}}</td>
                                <td class="text-left obtained">{{symposia_conduct['obtained']}}</td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained r1obtainedsym" onfocusout="updatemarks('symposia_conduct','r1',this.value,'{{symposia_conduct['id']}}')" value="{{symposia_conduct['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained r2obtainedsym" onfocusout="updatemarks('symposia_conduct','r2',this.value,'{{symposia_conduct['id']}}')" value="{{symposia_conduct['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained r3obtainedsym" onfocusout="updatemarks('symposia_conduct','r3',this.value,'{{symposia_conduct['id']}}')" value="{{symposia_conduct['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if symposia_conduct['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{symposia_conduct['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Externally Funded Projects</h5>
                      {% if external_funds %}
                        <table class="table table-striped">
                          <tbody>
                            <tr><th colspan="12" style='text-align:left' >Projects funded by ICAR, CSIR, DST, DBT, other government and private agencies. (Please check the guidelines point no. 3)</th></tr>
                            <tr>
                              <th width="10%" scope="row">SN</th>
                              <td class="text-left"><b>Title</b></td>
                              <!-- <td class="text-left"><b>Type</b></td> -->
                              <!-- <td class="text-left"><b>Max</b></td> -->
                              <!-- <td class="text-left"><b>Obtained</b></td> -->
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 1</b></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 2</b></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 3</b></td>
                              {% endif %}
                              <td width="10%" class="text-right"><b>Attachments</b></td>
                            </tr>
                            {% for i, external_fund in external_funds %}
                            {% if external_fund['name']  != '' %}
                            <tr>
                              <th  width="10%" scope="row">{{ i+1 }}.</th>
                              <td class="text-left">{{external_fund['name']}}</td>
                              <!-- {% if external_fund['type'] != '' %}
                              <td class="text-left">{{external_fund['type']}}</td>
                              {% else %}
                              <td class="text-left"><span style="color: red;" >N/A</span></td>
                              {% endif %} -->
                              <!-- <td class="text-left maximum">{{external_fund['max']}}</td> -->
                              <!-- <td class="text-left obtained">{{external_fund['obtained']}}</td> -->
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained r1obtainedfund" onfocusout="updatemarks('external_fund','r1',this.value,'{{external_fund['id']}}')" value="{{external_fund['r1']}}"></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained r2obtainedfund" onfocusout="updatemarks('external_fund','r2',this.value,'{{external_fund['id']}}')" value="{{external_fund['r2']}}"></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained r3obtainedfund" onfocusout="updatemarks('external_fund','r3',this.value,'{{external_fund['id']}}')" value="{{external_fund['r3']}}"></td>
                              {% endif %}
                              <td width="10%" class="text-right">
                                <div class="d-flex justify-content-end align-items-center">
                                  {% if external_fund['file'] != '' %}
                                    <a class="btn btn-success" href="https://entosocindia.org/{{external_fund['file']}}" target="_blank">View</a>
                                    {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                  {% endif %}
                                </div>
                              </td>
                            </tr>
                            {% endif %}
                            {% endfor %}
                          </tbody>
                        </table>
                      {% endif %}

                      <h5 style='text-align:left;font-weight: bold;font-size: 15px;color:#0d6e50' class="p-4">Involvement in Teaching/Extension Activities</h5>

                      {% if award_extensions %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >Teaching</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b></b></td>
                                <!-- <td class="text-left"><b>Max</b></td> -->
                                <!-- <td class="text-left"><b>Obtained</b></td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, award_extension in award_extensions %}
                              {% if award_extension['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{award_extension['name']}}</td>
                                <!-- <td class="text-left maximum">{{award_extension['max']}}</td> -->
                                <!-- <td class="text-left obtained">{{award_extension['obtained']}}</td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained r1obtainedteach" onfocusout="updatemarks('award_extension','r1',this.value,'{{award_extension['id']}}')" value="{{award_extension['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained r2obtainedteach" onfocusout="updatemarks('award_extension','r2',this.value,'{{award_extension['id']}}')" value="{{award_extension['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained r3obtainedteach" onfocusout="updatemarks('award_extension','r3',this.value,'{{award_extension['id']}}')" value="{{award_extension['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award_extension['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award_extension['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if seminars %}
                          <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >Extension Activities</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Activity</b></td>
                                <!-- <td class="text-left"><b>Type</b></td> -->
                                <!-- <td class="text-left"><b>Max</b></td> -->
                                <!-- <td class="text-left"><b>Obtained</b></td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, seminar in seminars %}
                              {% if seminar['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{seminar['name']}}</td>
                                <!-- {% if seminar['nation'] != '' %}
                                <td class="text-left">{{seminar['nation']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %} -->
                                <!-- <td class="text-left maximum">{{seminar['max']}}</td>
                                <td class="text-left obtained">{{seminar['obtained']}}</td> -->
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained r1obtainedteach" onfocusout="updatemarks('seminar','r1',this.value,'{{seminar['id']}}')" value="{{seminar['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained r2obtainedteach" onfocusout="updatemarks('seminar','r2',this.value,'{{seminar['id']}}')" value="{{seminar['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained r3obtainedteach" onfocusout="updatemarks('seminar','r3',this.value,'{{seminar['id']}}')" value="{{seminar['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if seminar['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{seminar['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      <table class="table table-striped">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >Evaluation committee Marks</th></tr>
                              <tr>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-center"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-center"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-center"><b>R 3</b></td>
                                {% endif %}
                              </tr>
                              <tr>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="commitee_r1" class="form-control r1obtained r1obtainedevaluate" id="r1obtainedevaluate" onfocusout="updatcommitteeemarks('award_nominees','commitee_r1',this.value,'{{award['nomination_id']}}')" value="{{award['commitee_r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="commitee_r2" class="form-control r2obtained r2obtainedevaluate" id="r2obtainedevaluate" onfocusout="updatcommitteeemarks('award_nominees','commitee_r2',this.value,'{{award['nomination_id']}}')" value="{{award['commitee_r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="commitee_r3" class="form-control r3obtained r3obtainedevaluate" id="r3obtainedevaluate" onfocusout="updatcommitteeemarks('award_nominees','commitee_r3',this.value,'{{award['nomination_id']}}')" value="{{award['commitee_r3']}}"></td>
                                {% endif %}
                              </tr>
                            </tbody>
                          </table>

                      {% if award_books %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(iii) Book chapters/Books : 5 marks (Authored book 2 marks each, Edited book 1 mark, and book chapter : 0.5 mark each)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Name of author(s)/editors, year, title, name of book & page nos.</b></td>
                                <td class="text-left"><b>Type</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, award_book in award_books %}
                              {% if award_book['title']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{award_book['title']}}</td>

                                {% if award_book['type'] != '' %}
                                <td class="text-left">{{award_book['type']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <td class="text-left maximum">{{award_book['max']}}</td>
                                <td class="text-left obtained">{{award_book['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('award_books','r1',this.value,'{{award_book['id']}}')" value="{{award_book['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('award_books','r2',this.value,'{{award_book['id']}}')" value="{{award_book['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('award_books','r3',this.value,'{{award_book['id']}}')" value="{{award_book['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award_book['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award_book['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if technologys %}                               
                        <table class="table table-striped hidden">
                          <tbody>
                            <tr><th colspan="12" style='text-align:left' >(ii) Technology developed/ varieties released/genetic material registered/product development: 5 marks (1 mark for each)</th></tr>
                            <tr>
                              <th width="10%" scope="row">SN</th>
                              <td class="text-left"><b>Technology</b></td>
                              <td class="text-left"><b>Max</b></td>
                              <td class="text-left"><b>Obtained</b></td>
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 1</b></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 2</b></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><b>R 3</b></td>
                              {% endif %}
                              <td width="10%" class="text-right"><b>Attachments</b></td>
                            </tr>
                            {% for i, technology in technologys %}
                            {% if technology['name']  != '' %}
                            <tr>
                              <th  width="10%" scope="row">{{ i+1 }}.</th>
                              <td class="text-left">{{technology['name']}}</td>
                              <td class="text-left maximum">{{technology['max']}}</td>
                              <td class="text-left obtained">{{technology['obtained']}}</td>
                              {% if award['r1']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('technology','r1',this.value,'{{technology['id']}}')" value="{{technology['r1']}}"></td>
                              {% endif %}
                              {% if award['r2']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('technology','r2',this.value,'{{technology['id']}}')" value="{{technology['r2']}}"></td>
                              {% endif %}
                              {% if award['r3']  == user_id or user_group_id == 1 %}
                              <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('technology','r3',this.value,'{{technology['id']}}')" value="{{technology['r3']}}"></td>
                              {% endif %}
                              <td width="10%" class="text-right">
                                <div class="d-flex justify-content-end align-items-center">
                                  {% if technology['file'] != '' %}
                                    <a class="btn btn-success" href="https://entosocindia.org/{{technology['file']}}" target="_blank">View</a>
                                    {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                  {% endif %}
                                </div>
                              </td>
                            </tr>
                            {% endif %}
                            {% endfor %}
                          </tbody>
                        </table>
                      {% endif %}

                      {% if disciplinarys %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(iii) Inter disciplinary work done: 5 marks (1 mark for each)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Disciplinary</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, disciplinary in disciplinarys %}
                              {% if disciplinary['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{disciplinary['name']}}</td>
                                <td class="text-left maximum">{{disciplinary['max']}}</td>
                                <td class="text-left obtained">{{disciplinary['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('disciplinary','r1',this.value,'{{disciplinary['id']}}')" value="{{disciplinary['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('disciplinary','r2',this.value,'{{disciplinary['id']}}')" value="{{disciplinary['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('disciplinary','r3',this.value,'{{disciplinary['id']}}')" value="{{disciplinary['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                  {% if disciplinary['file'] != '' %}
                                    <a class="btn btn-success" href="https://entosocindia.org/{{disciplinary['file']}}" target="_blank">View</a>
                                    {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                  {% endif %}

                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if teachings %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(v) Teaching/Trainings conducted : 5 marks(Course Director/Coordinator: 1 mark ,Course Co-coordinator: 0.5 mark)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Teaching/Trainings</b></td>
                                <td class="text-left"><b>Coordinator</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, teaching in teachings %}
                              {% if teaching['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{teaching['name']}}</td>
                                {% if teaching['coordinator'] != '' %}
                                <td class="text-left">{{teaching['coordinator']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <td class="text-left maximum">{{teaching['max']}}</td>
                                <td class="text-left obtained">{{teaching['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('teaching','r1',this.value,'{{teaching['id']}}')" value="{{teaching['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('teaching','r2',this.value,'{{teaching['id']}}')" value="{{teaching['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('teaching','r3',this.value,'{{teaching['id']}}')" value="{{teaching['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if teaching['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{teaching['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if award_extensions %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(vi) Extension activities : (5 Marks, 1 mark for each activity)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Activities</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, award_extension in award_extensions %}
                              {% if award_extension['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{award_extension['name']}}</td>
                                <td class="text-left maximum">{{award_extension['max']}}</td>
                                <td class="text-left obtained">{{award_extension['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('award_extension','r1',this.value,'{{award_extension['id']}}')" value="{{award_extension['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('award_extension','r2',this.value,'{{award_extension['id']}}')" value="{{award_extension['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('award_extension','r3',this.value,'{{award_extension['id']}}')" value="{{award_extension['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if award_extension['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{award_extension['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if national_awards %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(ii) National Awards : 5 marks (Govt. Organization Award: 2 marks for each; Society Award: 1 mark each)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Award</b></td>
                                <td class="text-left"><b>Type</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, national_award in national_awards %}
                              {% if national_award['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{national_award['name']}}</td>
                                {% if national_award['type'] != '' %}
                                <td class="text-left">{{national_award['type']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <td class="text-left maximum">{{national_award['max']}}</td>
                                <td class="text-left obtained">{{national_award['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('national_award','r1',this.value,'{{national_award['id']}}')" value="{{national_award['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('national_award','r2',this.value,'{{national_award['id']}}')" value="{{national_award['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('national_award','r3',this.value,'{{national_award['id']}}')" value="{{national_award['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if national_award['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{national_award['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if contributions %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(iii) Contribution(s) to Indian Phytopathological Society : 5 marks (1 mark for each activity)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Contribution</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, contribution in contributions %}
                              {% if contribution['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{contribution['name']}}</td>
                                <td class="text-left maximum">{{contribution['max']}}</td>
                                <td class="text-left obtained">{{contribution['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('contribution','r1',this.value,'{{contribution['id']}}')" value="{{contribution['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('contribution','r2',this.value,'{{contribution['id']}}')" value="{{contribution['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('contribution','r3',this.value,'{{contribution['id']}}')" value="{{contribution['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if contribution['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{contribution['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if recognitions %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(iv) Recognition in National/ International Committees : 5 marks (1 mark for International and 0.5 for national committee)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Recognition</b></td>
                                <td class="text-left"><b>Type</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, recognition in recognitions %}
                              {% if recognition['name']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{recognition['name']}}</td>
                                {% if recognition['type'] != '' %}
                                <td class="text-left">{{recognition['type']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <td class="text-left maximum">{{recognition['max']}}</td>
                                <td class="text-left obtained">{{recognition['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('recognition','r1',this.value,'{{recognition['id']}}')" value="{{recognition['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('recognition','r2',this.value,'{{recognition['id']}}')" value="{{recognition['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('recognition','r3',this.value,'{{recognition['id']}}')" value="{{recognition['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if recognition['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{recognition['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}

                      {% if publishings %}
                          <table class="table table-striped hidden">
                            <tbody>
                              <tr><th colspan="12" style='text-align:left' >(ii) Papers published in Indian Phytopathology : 7 marks (1 mark for Full length paper; 0.5 mark for Short Notes, 100% marks for first/corresponding author and 75% for Co-Author)</th></tr>
                              <tr>
                                <th width="10%" scope="row">SN</th>
                                <td class="text-left"><b>Name of author(s), year, title, name of journal, volume no. and page nos.</b></td>
                                <td class="text-left"><b>Type</b></td>
                                <td class="text-left"><b>Author</b></td>
                                <td class="text-left"><b>Max</b></td>
                                <td class="text-left"><b>Obtained</b></td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 1</b></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 2</b></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><b>R 3</b></td>
                                {% endif %}
                                <td width="10%" class="text-right"><b>Attachments</b></td>
                              </tr>
                              {% for i, publishing in publishings %}
                              {% if publishing['title']  != '' %}
                              <tr>
                                <th  width="10%" scope="row">{{ i+1 }}.</th>
                                <td class="text-left">{{publishing['title']}}</td>

                                {% if publishing['type'] != '' %}
                                <td class="text-left">{{publishing['type']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}

                                {% if publishing['author'] != '' %}
                                <td class="text-left">{{publishing['author']}}</td>
                                {% else %}
                                <td class="text-left"><span style="color: red;" >N/A</span></td>
                                {% endif %}
                                <td class="text-left maximum">{{publishing['max']}}</td>
                                <td class="text-left obtained">{{publishing['obtained']}}</td>
                                {% if award['r1']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r1obtained" onfocusout="updatemarks('publishing','r1',this.value,'{{publishing['id']}}')" value="{{publishing['r1']}}"></td>
                                {% endif %}
                                {% if award['r2']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r2obtained" onfocusout="updatemarks('publishing','r2',this.value,'{{publishing['id']}}')" value="{{publishing['r2']}}"></td>
                                {% endif %}
                                {% if award['r3']  == user_id or user_group_id == 1 %}
                                <td width="8%" class="text-right"><input type="number" min='0' max="5" name="" class="form-control r3obtained" onfocusout="updatemarks('publishing','r3',this.value,'{{publishing['id']}}')" value="{{publishing['r3']}}"></td>
                                {% endif %}
                                <td width="10%" class="text-right">
                                  <div class="d-flex justify-content-end align-items-center">
                                    {% if publishing['file'] != '' %}
                                      <a class="btn btn-success" href="https://entosocindia.org/{{publishing['file']}}" target="_blank">View</a>
                                      {% else %}
                                      <span class='text-danger text-center'>No Attachment Found!</span>
                                    {% endif %}
                                  </div>
                                </td>
                              </tr>
                              {% endif %}
                              {% endfor %}
                            </tbody>
                          </table>
                      {% endif %}
            
            <div >
              <button  style="background-color: #0d6e50;color: white;" onclick="printpage()"> Print/Save as Pdf</button>
            </div>
            
            
         
                  
                      <!-- <a href="javascript:void(0)" data-toggle="tooltip" title="Save" class="btn btn-success" >Save</a> -->
                      </div>
                  </fieldset>
              </div>
            </div>
        </div>
        <style type="text/css">
          .marks-counter{
            position: fixed;
            bottom: 5px;
            right: 5px;
            background-color: white;
            padding:10px;
            border-radius: 4px;
          }
          .marks-counter label{
            margin-right: .75rem;
          }
          .marks-counter label span{
            display: block;
            font-size: 2rem;
          }
        </style>
        <div class="marks-counter" style="background-color: #0d6e50;color: white;">
           <!-- <label><input class="btn btn-default text-dark" type="button" value="Print" onClick="window.print()"></label>--->
          <label>Maximum <span id="mxm"></span></label>
          <!-- <label>System Marks<span id="obt"></span></label> -->
          {% if award['r1']  == user_id or user_group_id == 1 %}
          <label>R1<span id="obtr1">0</span></label>
          {% endif %}
          {% if award['r2']  == user_id or user_group_id == 1 %}
          <label>R2<span id="obtr2">0</span></label>
          {% endif %}
          {% if award['r3']  == user_id or user_group_id == 1 %}
          <label>R3<span id="obtr3">0</span></label>
          {% endif %}
        </div>
        <script type="text/javascript">
          function updatcommitteeemarks(table,column,value,id){

            $.ajax({
                url: 'index.php?route=award/marks/updatcommitteeemarks&user_token={{token}}&table='+table+'&column='+column+'&value='+value,
                data: {'id':id},
                
                success: function(res){
                  $('input').attr('disabled', false);
                  if (res == 'updated'){
                      updateR1();
                      updateR2();
                      updateR3();
                  }else{
                    var r = confirm("Something went wrong! Please Reload the page.");
                    if (r == true){
                      window.location.reload();
                    }
                  }
                },
                beforeSend: function(){
                  $('input').attr('disabled', true);
                  console.log('fetching details...');
                }
            });

          }

          function updatemarks(table,column,value,id){

            // Publications

            if (table == 'naas_publication'){
              if(column == 'r1'){
                  var ObtR1pub = 0;
                  $('.r1obtainedpub').each( function() {
                    var numpub = $(this).val();
                    if(numpub == ''){
                      ObtR1pub +=  0;
                    }else{
                      ObtR1pub += parseFloat(numpub*0.5)
                    }
                  });

                  if (ObtR1pub > 70){
                    // if(alert('You have reached the maximum marks limit for Publication Section')){}
                    // else    window.location.reload();
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id); 
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r2'){
                  var ObtR2pub = 0;
                  $('.r2obtainedpub').each( function() {
                    var numpub = $(this).val();
                    if(numpub == ''){
                      ObtR2pub +=  0;
                    }else{
                      ObtR2pub += parseFloat(numpub*0.5)
                    }
                  });
                  if (ObtR2pub > 70) {
                    // if(alert('You have reached the maximum marks limit for Publication Section')){}
                    // else    window.location.reload();
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id); 
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r3'){
                  var ObtR3pub = 0;
                  $('.r3obtainedpub').each( function() {
                    var numpub = $(this).val();
                    if(numpub == ''){
                      ObtR3pub +=  0;
                    }else{
                      ObtR3pub += parseFloat(numpub*0.5)
                    }
                  });
                  if (ObtR3pub > 70) {
                    // if(alert('You have reached the maximum marks limit for Publication Section')){}
                    // else    window.location.reload();
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id); 
                  }else{
                    savemarks(table,column,value,id);
                  }
              }
            }else if (table == 'symposia_conduct'){
              if(column == 'r1'){
                  var ObtR1sym = 0;
                  $('.r1obtainedsym').each( function() {
                    var numsym = $(this).val();
                    if(numsym == ''){
                      ObtR1sym +=  0;
                    }else{
                      ObtR1sym += parseFloat(numsym)
                    }
                  });

                  if (ObtR1sym > 15){
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload();

                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r2'){
                  var ObtR2sym = 0;
                  $('.r2obtainedsym').each( function() {
                    var numsym = $(this).val();
                    if(numsym == ''){
                      ObtR2sym +=  0;
                    }else{
                      ObtR2sym += parseFloat(numsym)
                    }
                  });
                  if (ObtR2sym > 15) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload();

                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r3'){
                  var ObtR3sym = 0;
                  $('.r3obtainedsym').each( function() {
                    var numsym = $(this).val();
                    if(numsym == ''){
                      ObtR3sym +=  0;
                    }else{
                      ObtR3sym += parseFloat(numsym)
                    }
                  });
                  if (ObtR3sym > 15) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }
            }else if (table == 'external_fund'){
              if(column == 'r1'){
                  var ObtR1fund = 0;
                  $('.r1obtainedfund').each( function() {
                    var numfund = $(this).val();
                    if(numfund == ''){
                      ObtR1fund +=  0;
                    }else{
                      ObtR1fund += parseFloat(numfund)
                    }
                  });

                  if (ObtR1fund > 5){
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r2'){
                  var ObtR2fund = 0;
                  $('.r2obtainedfund').each( function() {
                    var numfund = $(this).val();
                    if(numfund == ''){
                      ObtR2fund +=  0;
                    }else{
                      ObtR2fund += parseFloat(numfund)
                    }
                  });
                  if (ObtR2fund > 5) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r3'){
                  var ObtR3fund = 0;
                  $('.r3obtainedfund').each( function() {
                    var numfund = $(this).val();
                    if(numfund == ''){
                      ObtR3fund +=  0;
                    }else{
                      ObtR3fund += parseFloat(numfund)
                    }
                  });
                  if (ObtR3fund > 5) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }
            }else if (table == 'award_extension' || table == 'seminar'){
              if(column == 'r1'){
                  var ObtR1teach = 0;
                  $('.r1obtainedteach').each( function() {
                    var numteach = $(this).val();
                    if(numteach == ''){
                      ObtR1teach +=  0;
                    }else{
                      ObtR1teach += parseFloat(numteach)
                    }
                  });

                  if (ObtR1teach > 5){
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r2'){
                  var ObtR2teach = 0;
                  $('.r2obtainedteach').each( function() {
                    var numteach = $(this).val();
                    if(numteach == ''){
                      ObtR2teach +=  0;
                    }else{
                      ObtR2teach += parseFloat(numteach)
                    }
                  });
                  if (ObtR2teach > 5) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }else if(column == 'r3'){
                  var ObtR3teach = 0;
                  $('.r3obtainedteach').each( function() {
                    var numteach = $(this).val();
                    if(numteach == ''){
                      ObtR3teach +=  0;
                    }else{
                      ObtR3teach += parseFloat(numteach)
                    }
                  });
                  if (ObtR3teach > 5) {
                    // if(alert('You have reached the maximum marks limit for this Section')){}
                    // else    window.location.reload(); 
                    alert('You have reached the maximum marks limit for this section');
                    savemarks(table,column,value,id);
                  }else{
                    savemarks(table,column,value,id);
                  }
              }
            }            
          }

          function savemarks(table,column,value,id){ console.log('save--'+value);
            $.ajax({
                url: 'index.php?route=award/marks/updatemarks&user_token={{token}}&table='+table+'&column='+column+'&value='+value,
                data: {'id':id},
                
                success: function(res){
                  $('input').attr('disabled', false);
                  if (res == 'updated'){
                      updateR1();
                      updateR2();
                      updateR3();
                  }else{
                    var r = confirm("Something went wrong! Please Reload the page.");
                    if (r == true){
                      window.location.reload();
                    }
                  }
                },
                beforeSend: function(){
                  $('input').attr('disabled', true);
                  console.log('fetching details...');
                }
            });
            //alert(value);
          }
         
        </script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <!-- <script src="js/jquery.easing.min.js" type="text/javascript"></script>  -->
        <script>
          $('input[type="file"]').change(function(e){
              var fileName = e.target.files[0].name;
              $(this).siblings('.custom-file-label').text(fileName);
              // alert('The file "' + fileName +  '" has been selected.');
          });
          var maxSum = 0;
          $('.maximum').each(function() {
            maxSum += parseInt($(this).text());
          })
          $('#mxm').html(maxSum)


          var maxObt = 0;
          $('.obtained').each(function() {
            var num = $(this).text();
            if(num == ''){
              maxObt +=  0;
            }else{
              maxObt += parseFloat(num)
            }
          })
          $('#obt').html(maxObt)

          $('.r1obtained').on('keyup', function() {
            updateR1();
          })

          
          $('.r2obtained').on('keyup', function() {
            updateR2();
          })

          
          $('.r3obtained').on('keyup', function() {
            updateR3();
          })


          function updateR1(){
             
            var ObtR1pub = 0;
            $('.r1obtainedpub').each( function() {
              var numpub = $(this).val();
              if(numpub == ''){
                ObtR1pub +=  0;
              }else{
                ObtR1pub += parseFloat(numpub*0.5)
              }
            });

            if (ObtR1pub >= 70) {
              var publicationtotal1 = 70;
            }else{
              var publicationtotal1 = ObtR1pub;
            }

            var ObtR1sym = 0;
            $('.r1obtainedsym').each( function() {
              var numsym = $(this).val();
              if(numsym == ''){
                ObtR1sym +=  0;
              }else{
                ObtR1sym += parseFloat(numsym)
              }
            });

            if (ObtR1sym >= 15) {
              var symlicationtotal1 = 15;
            }else{
              var symlicationtotal1 = ObtR1sym;
            }

            var ObtR1fund = 0;
            $('.r1obtainedfund').each( function() {
              var numfund = $(this).val();
              if(numfund == ''){
                ObtR1fund +=  0;
              }else{
                ObtR1fund += parseFloat(numfund)
              }
            });

            if (ObtR1fund >= 5) {
              var fundlicationtotal1 = 5;
            }else{
              var fundlicationtotal1 = ObtR1fund;
            }

            var ObtR1teach = 0;
            $('.r1obtainedteach').each( function() {
              var numteach = $(this).val();
              if(numteach == ''){
                ObtR1teach +=  0;
              }else{
                ObtR1teach += parseFloat(numteach)
              }
            });

            if (ObtR1teach >= 5) {
              var teachlicationtotal1 = 5;
            }else{
              var teachlicationtotal1 = ObtR1teach;
            }

            var commitee_r1 = parseFloat($('#r1obtainedevaluate').val());

            $('#obtr1').html(symlicationtotal1+publicationtotal1+fundlicationtotal1+teachlicationtotal1+commitee_r1);
          }

          function updateR2(){
             var ObtR2pub = 0;
            $('.r2obtainedpub').each( function() {
              var numpub = $(this).val();
              if(numpub == ''){
                ObtR2pub +=  0;
              }else{
                ObtR2pub += parseFloat(numpub*0.5)
              }
            });

            if (ObtR2pub >= 70) {
              var publicationtotal2 = 70;
            }else{
              var publicationtotal2 = ObtR2pub;
            }

            var ObtR2sym = 0;
            $('.r2obtainedsym').each( function() {
              var numsym = $(this).val();
              if(numsym == ''){
                ObtR2sym +=  0;
              }else{
                ObtR2sym += parseFloat(numsym)
              }
            });

            if (ObtR2sym >= 15) {
              var symlicationtotal2 = 15;
            }else{
              var symlicationtotal2 = ObtR2sym;
            }

            var ObtR2fund = 0;
            $('.r2obtainedfund').each( function() {
              var numfund = $(this).val();
              if(numfund == ''){
                ObtR2fund +=  0;
              }else{
                ObtR2fund += parseFloat(numfund)
              }
            });

            if (ObtR2fund >= 5) {
              var fundlicationtotal2 = 5;
            }else{
              var fundlicationtotal2 = ObtR2fund;
            }

            var ObtR2teach = 0;
            $('.r2obtainedteach').each( function() {
              var numteach = $(this).val();
              if(numteach == ''){
                ObtR2teach +=  0;
              }else{
                ObtR2teach += parseFloat(numteach)
              }
            });

            if (ObtR2teach >= 5) {
              var teachlicationtotal2 = 5;
            }else{
              var teachlicationtotal2 = ObtR2teach;
            }

            var commitee_r2 = parseFloat($('#r2obtainedevaluate').val());
            $('#obtr2').html(symlicationtotal2+publicationtotal2+fundlicationtotal2+teachlicationtotal2+commitee_r2);
          }

          function updateR3(){
             var ObtR3pub = 0;
            $('.r3obtainedpub').each( function() {
              var numpub = $(this).val();
              if(numpub == ''){
                ObtR3pub +=  0;
              }else{
                ObtR3pub += parseFloat(numpub*0.5)
              }
            });

            if (ObtR3pub >= 70) {
              var publicationtotal3 = 70;
            }else{
              var publicationtotal3 = ObtR3pub;
            }

            var ObtR3sym = 0;
            $('.r3obtainedsym').each( function() {
              var numsym = $(this).val();
              if(numsym == ''){
                ObtR3sym +=  0;
              }else{
                ObtR3sym += parseFloat(numsym)
              }
            });

            if (ObtR3sym >= 15) {
              var symlicationtotal3 = 15;
            }else{
              var symlicationtotal3 = ObtR3sym;
            }

            var ObtR3fund = 0;
            $('.r3obtainedfund').each( function() {
              var numfund = $(this).val();
              if(numfund == ''){
                ObtR3fund +=  0;
              }else{
                ObtR3fund += parseFloat(numfund)
              }
            });

            if (ObtR3fund >= 5) {
              var fundlicationtotal3 = 5;
            }else{
              var fundlicationtotal3 = ObtR3fund;
            }

            var ObtR3teach = 0;
            $('.r3obtainedteach').each( function() {
              var numteach = $(this).val();
              if(numteach == ''){
                ObtR3teach +=  0;
              }else{
                ObtR3teach += parseFloat(numteach)
              }
            });

            if (ObtR3teach >= 5) {
              var teachlicationtotal3 = 5;
            }else{
              var teachlicationtotal3 = ObtR3teach;
            }

            var commitee_r3 = parseFloat($('#r3obtainedevaluate').val());
            $('#obtr3').html(symlicationtotal3+publicationtotal3+fundlicationtotal3+teachlicationtotal3+commitee_r3);
          }

          window.onload = function(){
            updateR1();
            updateR2();
            updateR3();
          }

        </script>
      </div>
    </div>
  </div>
</div>
</script>

   <script type="text/javascript">
     
     function printpage()
     {
      
         var content12 = document.getElementById("content").innerHTML;
         var data12 = document.getElementById("dob").innerHTML;
    
         
         var fulldata = content12+data12;
         
         document.getElementById("content").innerHTML =  fulldata;
         window.print();
     }
    
    </script>


{{ footer }} 