Sindbad~EG File Manager

Current Path : /home/numerotech/sa.aios-scientificcommittee.org/aios_sa_app/core/templates/users/
Upload File :
Current File : //home/numerotech/sa.aios-scientificcommittee.org/aios_sa_app/core/templates/users/eva_view.html

{% extends "users/layout.html" %}
{% block title %}EVA_VIEW{% endblock %}
{% block content %}
<div class="container rounded p-3" style="background-color:white;">
  <form id="form_eva">
    <input type="hidden" name="conf_id" id="conf_id" value="{{conf_id}}">
    <input type="hidden" name="conf_key" id="conf_key" value="{{conf_key}}">
    <div class="row">
      <div class="col">
        {% if direction.previous != 0 %}
        <!-- <button type="button" >Previous</button> -->
        <a class="btn btn-primary " href="{{url_for('DB.View_Evaluation',abs_id = Cryptography.encrypt(direction.previous |int ),eva_abs_type=eva_abs_type,conf_id=conf_id,conf_key=conf_key)}}">Previous</a>
        {% endif %}
      </div>
      <div class="col text-center">
        <a href="{{url_for('DB.Evaluation',abs_type = eva_abs_type,conf_id=conf_id,conf_key=conf_key)}}" class="btn btn-warning text-dark">{% if eva_abs_type != 'FPFTVAL': %}Evaluation {% endif %}Home Page</a>
      </div>
      <div class="col">
        {% if direction.next != 0 %}
        <!-- <button type="button" class="float-right" >Next</button> -->
        <a class="btn btn-primary float-right " href="{{url_for('DB.View_Evaluation',abs_id = Cryptography.encrypt(direction.next | int),eva_abs_type=eva_abs_type,conf_id=conf_id,conf_key=conf_key)}}">Next</a>
        {% endif %}
      </div>
    </div>
    <hr>
    <div class="row">
      <div class="col">
        <label class="h2 font-weight-bold">{{data.abs_type}}-{{data.abs_no}}</label>
      </div>
    </div>
    {{ html_content | safe }}
    <div class="row">
        <div class="col">
             {% for mesg in get_flashed_messages(with_categories=True) %}
            {% if  mesg[1] %}
            {% if  mesg[0]== "warning" %}

            <div class="alert  text-dark text-center Profile_bg" id="successMessage">
              <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
              <h4>{{ mesg[1] }}</h4>
            </div>
            {% elif mesg[0] == "success" %}
            <div class="alert  text-dark text-center alert-success" id="successMessage">
              <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
              <h4>{{ mesg[1] }}</h4>
            </div>
            {% else %}
            <div class="alert alert-danger text-danger text-center" id="successMessage">
              <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
              <h4>{{ mesg[1] }}</h4>
            </div>
            {% endif %}
            {% endif %}
            {% endfor %}
        </div>
    </div>
<div class="row">
  <div class="col form-group">
    {% if direction.previous != 0 %}
    <!-- <button type="button" >Previous</button> -->
    <a class="btn btn-primary " href="{{url_for('DB.View_Evaluation',abs_id = Cryptography.encrypt(direction.previous |int ),eva_abs_type=eva_abs_type,conf_id=conf_id,conf_key=conf_key)}}">Previous</a>
    {% endif %}
  </div>
  {% if eva_abs_type != 'FPFTVAL' %}
  <div class="col text-center form-group">
      <!--<span id="successMessage_span" class="alert alert-success" style="diisplay:none"></span>-->
    <input type="button" name="submit" id="submit" class="btn btn-success text-center" value="Save">
  </div>
  {% endif %}
  <div class="col form-group">
    {% if direction.next != 0 %}
    <!-- <button type="button" class="float-right" >Next</button> -->
    <a class="btn btn-primary float-right " href="{{url_for('DB.View_Evaluation',abs_id = Cryptography.encrypt(direction.next | int),eva_abs_type=eva_abs_type,conf_id=conf_id,conf_key=conf_key)}}">Next</a>
    {% endif %}
  </div>
</div>
</form>
</div>
{% endblock %}
{% block script %}
<script type="text/javascript">
  var abs_id = {{data.abs_id}}
  var abs_type = '{{eva_abs_type}}'
  var conf_id = $("#conf_id").val();
  var conf_key = $("#conf_key").val();
  $("#submit").click(function() {
      validate_form();
    if ($("form").valid()){
    ShowProgress();
    $.ajax({
      type: 'POST',
      url: BaseUrl + "/post_view_evaluation/" + abs_id + "/" + abs_type + "/" + conf_id + "/" + conf_key,
      data: $("#form_eva").serialize(),
      dataType: 'json',
      success: function(data) {
        // alert("Successfully Saved")
        StopProgress();
        $("#successMessage_span").html("Marks saved successfully.");
        location.reload();
      }
    });
    }
  });
  function validate_form(){
      $("form").validate({

      rules: {
        mark1:'required',
        mark2:'required',
        mark3:'required',
        mark4:'required',
        mark5:'required',
      },
      focusInvalid: false,
            invalidHandler: function (form, validator) {
                var el = $(".error:visible");
                if (el.length) {
                    $("html, body").animate(
                        {
                            scrollTop: el.first().offset().top,
                        },
                        500
                    );
                }
            },
    });
    }

</script>
{% endblock %}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists