Sindbad~EG File Manager

Current Path : /home/numerotech/test-abs.numerotech.com/common_abs_v2/core/templates/users/ISOO24/CP/
Upload File :
Current File : //home/numerotech/test-abs.numerotech.com/common_abs_v2/core/templates/users/ISOO24/CP/main_CP.html

{% extends "users/layout.html" %} {% block title %}CP{% endblock %} {% block absTitle %}
    <div class="row">
        <div class="col">
            <h3 class="p-2"  style="color: #00166B;">{{Auth.get_conference(conf_id).get("conf_name")}} Case Presentation abstract submission form</h3>
            <div class="alert alert-danger alert-dismissible fade show" id="error_message_step1" role="alert">
                <label id="error_message_label"></label>
                <button type="button" class="close" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            </div>
    </div>
    {% endblock %} {% block content %}
    <div id="content"></div>
        
<input type="hidden" name="abs_id" id="abs_id" value="{{abs_id}}" />
<input type="hidden" name="en_abs_id" id="en_abs_id" value="{{abs_id}}" />
<input type="hidden" name="abs_type" id="abs_type" value="{{abs_type}}" />
<input type="hidden" name="conf_id" id="conf_id" value="{{ conf_id }}" />
<input type="hidden" name="conf_key" id="conf_key" value="{{ conf_key }}" />
{% endblock %} {% block script %}
<script type="text/javascript">
    var BaseUrl = document.location.origin;
    $(document).ready(function () {
        jump_step(1); 

        // function get_step1() {
        //     var abs_id = $("#abs_id").val();
        //     var abs_type = $("#abs_type").val();
        //     var conf_id = $("#conf_id").val();
        //     var conf_key = $("#conf_key").val();
        //     ShowProgress();
        //     $.ajax({
        //         type: "GET",
        //         url: BaseUrl +"/step1/"+abs_type+"/"+ conf_id + "/" + conf_key,
        //         data: {
        //             abs_id: abs_id,
        //             abs_type: abs_type,
        //         },
        //         dataType: "json" | "html",
        //         success: function (data) {
        //             $("#error_message_step1").hide();
        //             if (data.status == 1) {
        //                 $("#content").html(data.data);
        //                 // window.location.replace((BaseUrl+'/pp/abstract_index/PP'));
        //             } else if (data.status == 0) {
        //                 $("#error_message_step1").show();
        //                 $("#error_message_step1 label").html(data.msg);
        //                 $("html, body").animate(
        //                     {
        //                         scrollTop: $(".alert").first().offset().top,
        //                     },
        //                     500
        //                 );
        //             } else {
        //             }

        //             StopProgress();
        //         },
        //     });
        // }
    });

    function jump_step(step){
            var abs_id = $("#en_abs_id").val();
            var abs_type = $("#abs_type").val();
            var conf_id = $("#conf_id").val();
            var conf_key = $("#conf_key").val();
            ShowProgress();
            $.ajax({
                type: "GET",
                url: BaseUrl +"/step"+step+"/"+abs_type+"/" + conf_id + "/" + conf_key,
                data: {
                    abs_id: abs_id,
                    abs_type: abs_type,
                },
                dataType: "json" | "html",
                success: function (data) {
                    $("#error_message_step1").hide();
                    if (data.status == 1) {
                        $("#content").html(data.data);
                        // window.location.replace((BaseUrl+'/pp/abstract_index/PP'));
                    } else if (data.status == 0) {
                        $("#error_message_step1").show();
                        $("#error_message_step1 label").html(data.msg);
                        $("html, body").animate(
                            {
                                scrollTop: $(".alert").first().offset().top,
                            },
                            500
                        );
                    } else {
                    }

                    StopProgress();
                },
            });
    }

    function move(step, isnext) {
        // alert("hi in main page")
        // alert(step,"step")
        // alert(isnext,"isnext")
        $("#is_next").val(isnext);
        if (isnext == 1) {
            validateion(step);
            if (!$("#form_s" + step).valid()) {
                return false;
            }
        }

        $.ajax({
            type: "POST", // <-- get method of form
            url: $("#form_s" + step).attr("action"), // <-- get action of form
            data: $("#form_s" + step).serialize(), // <-- serialize all fields into a string that is ready to be posted to your PHP file
            dataType: "json" | "html",
            beforeSend: function () {
                ShowProgress();
            },
            success: function (data) {
                if (data.status == 1) {
                    $("#error_message_step1").hide();
                    $("#content").html(data.data);

                    // window.location.replace((BaseUrl+'/pp/abstract_index/PP'));
                } else if (data.status == 0) {
                    // alert(data.msg)
                    $("#error_message_step1").show();
                    $("#error_message_step1 label").html(data.msg);
                    $("html, body").animate(
                        {
                            scrollTop: $(".alert").first().offset().top,
                        },
                        500
                    );
                } else {
                    // $('#content').html(" ");
                    // $('#content').html(data);
                }
                StopProgress();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                //location.reload();
            },
        });
        return false;
    }

    function validateion(step) {
        if (step == 1) {
            validateion_step1();
        } else if (step == 2) {
            validateion_step2();
        } else if (step == 3) {
            validateion_step3();
        } else if (step == 4) {
            validateion_step4();
        }
    }

    function validateion_step1() {
        $("#form_s1").validate({
            rules: {
                cat_type: {
                    required: true,
                },
                presenting_type: {
                    required: true,
                },
            },
            messages: {
                cat_type: "Please select the  section type",
                presenting_type: "Please select the  presentation type",
            },
        });
    }

    function validateion_step2() {
        $("#form_s2").validate({
            rules: {
                title: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    maxlength: 150,
                },
                purpose: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
                methods: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
                 synopsis: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
                result: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
                conclusion: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
                Clinical_Implication: {
                    normalizer: function (value) {
                        return $.trim(value);
                    },
                    required: true,
                    // maxlength: 400,
                },
            },
            messages: {
                title: {
                    maxlength: "Please enter not more than 150 characters",
                    required: "Please enter the title",
                },
                purpose: {
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Purpose",
                },
                methods: {
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Methods",
                },
                synopsis: {
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Synopsis",
                },
                result: {
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Result",
                },
                conclusion: {
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Conclusion",
                },
                Clinical_Implication:{
                    // maxlength: "The number of characters used here exceeds the limit.  Maximum length allowed is 400 characters.",
                    required: "Please enter the Clinical Implication",
                }
            },
        });
    }
    function validateion_step3() {
        $("#form_s3").validate({
            rules: {
                cheaward: {
                    required: true,
                },
            },
            messages: {
                cheaward: "please accept the rules and regulation to paticiipate in JM Pahwa Award ",
            },
        });
    }
    function validateion_step4() {
        $("#form_s4").validate({
            rules: {
                misc1: {
                    required: true,
                },
                misc2: {
                    required: true,
                },
                misc3: {
                    required: true,
                },
            },
        });
    }
    $(".close").click(function () {
        $(".alert").hide();
    });
</script>
{% endblock %}

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