Sindbad~EG File Manager

Current Path : /home/numerotech/test-abs.numerotech.com/common_abs_v2/core/templates/users/TNASI24/EP/
Upload File :
Current File : //home/numerotech/test-abs.numerotech.com/common_abs_v2/core/templates/users/TNASI24/EP/step1.html

<div class="container">
    <div class="row">
        <div class="col form-group">
<ul class="nav nav-tabs" id="myTab" role="tablist">
        <li class="nav-item p-2">
            <button type="button" class="nav-link active " value="1" aria-selected="true">Step 1</button>
        </li>
        <li class="nav-item p-2">
            <button type="button" class="nav-link nav_btn_gray" value="2" onclick="{% if data.cur_step >= 1 %}jump_step(2){% endif %}">Step 2</button>
        </li>
        <li class="nav-item p-2">
            <button type="button" class="nav-link nav_btn_gray" value="3" onclick="{% if data.cur_step >= 2 %}jump_step(3){% endif %}">Step 3</button>
        </li>
        <li class="nav-item p-2">
            <button type="button" class="nav-link nav_btn_gray" value="4" onclick="{% if data.cur_step >= 3 %}jump_step(4){% endif %}">Step 4</button>
        </li>
        <li class="nav-item p-2">
            <button type="button" class="nav-link nav_btn_gray" value="5" onclick="{% if data.cur_step >= 4 %}jump_step(5){% endif %}">Step 5</button>
        </li>
    </ul>
        </div>
    </div>
    <form method="POST" action="{{url_for('main.Step1post',abs_id=abs_id,abs_type=abs_type,conf_id=conf_id,conf_key=conf_key)}}" id="form_s1">
        
            <div class="row">
                <div class="col form-group">
                    <div><label class="font-weight-bold" class="font-weight-bold">Chief author membership number</label></div>
                    <div>{{user_info.membership_no or ''}}<input type="hidden" name="member_id" id="member_id" value="{{ member_id or '' }}" /></div>
                    <br />
                </div>
                <div class="col form-group">
                    <div><label class="font-weight-bold">Chief author name</label></div>
                    <div>{{user_info.full_name or ''}}<input type="hidden" name="name" id="name" value="{{ name or ''}}" /></div>
                    <br />
                </div>
            </div>
            <div class="row">
                <div class="col form-group ">
                    <label class="font-weight-bold">Presenting author:<span class="text-danger">*</span></label>
                </div>
            </div>
            <div class="row ">
                <div class="col text-center">
                    <div class="mobile-responsive" id="searchmodel1"></div>
                </div>
            </div>
            <div class="row ">
                <div class="col form-group">
                    <div id="searchdiv" >
                    <input type="radio" class="mr-2" name="presentingauhtor" id="iampresentingauhtor" onclick="select_pa_Author({{ user_info.user_id }})"><label for="iampresentingauhtor"> I am the presenting author</label> <br>
                        <input type="radio" class="mr-2" name="presentingauhtor" id="iamnotpresentingauhtor" onclick="show_pa_model()"><label for="iamnotpresentingauhtor"> I am not the presenting author <span class="text-primary">click here to add an alternative presenting author</span></label>
                    </div>
                </div>
            </div>
            <!--<div class="row">-->
            <!--    <div class="col">-->
            <!--        <div class="row">-->
            <!--            <div class="col py-2">-->
            <!--                <div><label class="font-weight-bold">Section <span class="text-danger">*</span></label></div>-->
            <!--            </div>-->
            <!--            <br />-->
            <!--         </div>-->
            <!--        <div class="row">-->
            <!--            <div class="col">-->
            <!--                <div>-->
            <!--                    <select class="form-control categories" id="cat_type" name="cat_type">-->
            <!--                        <option value="" id="select">--Select--</option>-->
            <!--                        {% if categories %} -->
            <!--                        {% for item in categories %} -->
            <!--                        {% if data.category_id == item.category_id %}-->
            <!--                        <option value="{{item.category_id}}" selected> {{item.name or ''}} </option>-->
            <!--                        {% else %}-->
            <!--                        <option value="{{item.category_id}}" Selected> {{item.name or ''}} </option>-->
            <!--                        {% endif %} -->
            <!--                        {% endfor %} -->
            <!--                        {% endif %}-->
            <!--                    </select>-->
            <!--                </div>-->
            <!--            </div>-->
            <!--        </div>-->
            <!--    </div>-->
            <!--</div>-->
            <!--<br>-->
            {% if guideline %}
                {{ guideline[0]["setting_value"] | safe }}
            {% endif %}
            <div class="row">
                <div class="col float-right py-2">
                    <input type="button" name="next" id="next" class="btn btn-primary float-right" value="Next" onclick="move(1,1)" />
                </div>
            </div><br>
        <div id="step2"></div>
        <!-- <input type="hidden" name="user_id" id="user_id" value="{{user_id}}" /> -->
        <input type="hidden" name="abs_id" id="abs_id" value="{{abs_id}}" />
        <input type="hidden" name="de_abs_id" id="de_abs_id" value="{{Cryptography.decrypt(abs_id)}}" />
        <input type="hidden" name="abs_type" id="abs_type" value="{{abs_type}}">
        <input type="hidden" name="cur_step" id="cur_step" value="{{ data.cur_step or 0 }}">
        <input type="hidden" name="step" id="step" value="1">
        <input type="hidden" name="step" id="is_next" value="1"> 
    </form>
</div>
<!-- The Modal -->
<form id="search_model">
    <div class="modal" id="searchpaauthor">
        <div class="modal-dialog modal-lg">
            <div class="modal-content" style="display: table;">
                <!-- Modal Header -->
                <div class="modal-header">
                    <h4 class="modal-title">Search Presenting Author</h4>
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>

                <!-- Modal body -->
                <div class="modal-body container">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12">
                            <label class="font-weight-bold" style="line-height: 25px"><b class="text-red"> Note : </b>All the faculty / speakers must be registered and verified in the website. If not, It is not possible to participate in {{ Auth.get_conference(conf_id).get('conf_name') }}. </label>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            <label class="font-weight-bold">Type Membership number or Name or Email to search</label><br />
                            <div class="input-group">
                              <input type="text" name="searchtext" id="searchtext" class="form-control" required placeholder="Enter to search" />
                              <div class="input-group-append">
                                  <button class="btn btn-outline-secondary" name="searchbtn" id="searchbtn" type="button">Search
                                      <!-- <i class="fa fa-search"></i> -->
                                  </button>
                                  </div>
                            </div>
                            <br>
                                <label id="searchtext-error" class="error" for="searchtext"></label>
                        </div>
                    </div>
                    <div id="searchtable"></div>
                <hr>
                <div class="row">
                       <div class="col">
                           <label class="text-primary">Unable to find authors?</label><br>
                           <label>He or She may not have registered in TNASICON website. <a href="#" id="new_user" class="text-primary">Click here to request him/her to register</a></label>
                       </div>
                   </div>
                </form>
                <form id="new_user_form">
                   <div class="row" id="new_user_row">
                       <div class="col">
                           <div class="row">
                               <div class="col">
                                   <label>Author Name:</label><br>
                                   <input type="text" name="author_name" class="form-control" required id="author_name" placeholder="Author Name">
                               </div>
                               <div class="col">
                                   <label>Email:</label><br>
                                   <input type="text" name="author_email" class="form-control" required id="author_email" placeholder="Author Email">
                               </div>
                           </div>
                           <div class="row">
                               <div class="col">
                                <br>
                                   <button onclick="new_user_form_validation()" 
                                   type="button" name="submit_request" id="submit_request" type="button" class="btn btn-primary float-right" >Request Author to join</button>
                               </div>
                           </div>
                       </div>
                   </div>
                   </form>
               </div>

                <!-- Modal footer -->
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                </div>
                <div id="searchmodel"></div>
            </div>
        </div>
    </div>
</form>
</div>
    <!-- end of model -->
{% block script %}
<script type="text/javascript">
    var conf_id  = $("#conf_id").val();
    var conf_key = $("#conf_key").val();
    var abs_type = $("#abs_type").val();
get_presenting_author();
// Request a new authour
$("#new_user_row").hide();

$("#new_user").click(function() {
    $("#new_user_row").toggle();
})

$("#submit_request").click(function() {
    new_user_form_validation();
    if  ($("#new_user_form").valid()){
    var auhtor_mail = $("#author_email").val();
    var author_name = $("#author_name").val();
    var abs_id      = $('#de_abs_id').val();
    var conf_id     = $('#conf_id').val();  
    $.ajax({
            type: "POST",
            url: BaseUrl + "/send_request/"+conf_id+"/"+conf_key,
            data: {
                'author_name' : author_name,
                'author_email': auhtor_mail,
                'abs_id'      : abs_id,
                'role_id'     : 35,
                'abs_type'    : "EP",
                'conf_id'     : conf_id,
            },
            dataType: "json",
            success: function (data) {
                alert("Request mail successfully sent")
                $("#searchcoinst").modal("hide");
                $("#searchtext").val('');
                $("#searchtable").html('');
                $("#searchmodel1").html(data);
                $("#searchdiv").hide();
                return true;
            },
         });
}   
else{
    return false;
}

})
function show_pa_model() {
            $("#searchpaauthor").modal("show");
        };
function new_user_form_validation()  {
    $("#new_user_form").validate({
                    rules: {
                        author_name:{
                            required:true,
                            minlength:3,
                        },
                        author_email:{
                            required:true,  
                        },

                    },
                    messages: {
                        author_name: {
                            required:"Please enter the author name",
                            minlength:"Please enter more than three characters", 
                    },
                        author_email:{
                            required:"Please enter the author email",
                        },
                },
                });
}

$("#searchcoins").click(function () {
            $("#searchpaauthor").modal("show");
        });
        $("#searchcoins1").click(function () {
            $("#searchpaauthor").modal("show");
        });

        $("#search_model").keypress(function(e)
        {
          if(e.which == 13)
          {
            validate_search();
            return false
          }
          return true
        });
        $("#searchbtn").click(validate_search);
        function validate_search() {
            $("#search_model").validate({
                    rules: {
                        searchtext:{
                            normalizer: function (value) {
                    return $.trim(value);
                             },
                            required:true,
                            minlength:3,
                        }
                    },
                    messages: {
                        searchtext: {
                            required:"Please enter membership number,name,email",
                            minlength:"Please provide three letters data to search"
                    },
                },
                });
                if($("#search_model").valid()){
                      var searchtext = $("#searchtext").val();
                      var conf_id    = $("#conf_id").val();
                      $.ajax({
                            type: "GET",
                            url: BaseUrl + "/searchauthor/"+abs_type+"/"+conf_id+"/"+conf_key,
                            data: {
                                'searchtext' : searchtext,
                                'abs_type'   : "EP",
                                'btn_val'    : "0",
                                'conf_id'    : conf_id,
                            },
                            dataType: "json",
                            success: function (data) {
                                $("#searchtable").html(data);
                                return true;
                            },
                        });
                }
        };
        
function select_pa_Author(user_id) {
        var abs_id = $("#de_abs_id").val();
        $.ajax({
            type: "GET",
            url: BaseUrl + "/add_presenting_author/"+abs_type+"/"+conf_id+"/"+conf_key,
            data: { 
                'user_id' : user_id, 
                'abs_type': "EP", 
                'abs_id'  : abs_id, 
                'role_id' : 35 
            },
            dataType: "json",
            success: function (data) {
                $("#searchpaauthor").modal("hide");
                 $("#searchtext").val('');
                $("#searchtable").html('');
                $("#searchmodel1").html(data);
                $("#searchdiv").hide();
            },
        });
        return false;
    }

 function get_presenting_author() {
        var abs_id = $("#de_abs_id").val();
        $.ajax({
            type: "GET",
            url: BaseUrl +"/ppstep1getauthor/"+abs_type+"/"+conf_id+"/"+conf_key,
            data: { abs_id: abs_id },
            dataType: "json",
            success: function (data) {
                if (data == 0) {
                } else {
                    $("#searchmodel1").html(data);
                    $("#searchdiv").hide();
                }
            },
        });
        return false;
    }

    </script>
{% endblock %}

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