Sindbad~EG File Manager

Current Path : /home/numerotech/conf-regdesk.numerotech.com/reg_desk/core/templates/scan_signup/
Upload File :
Current File : //home/numerotech/conf-regdesk.numerotech.com/reg_desk/core/templates/scan_signup/scan_data.html

{% extends "scan_signup/signup_layout.html" %}
{% block title %}
Signup
{% endblock %}  
{% block style %}
{% endblock %}  
{% block content %}

<div class="container">
	<div class="row">
		<div class="col-lg-3"></div>
		<div class="col-lg-6">
			<input type="hidden" name="conf_id" id="conf_id" value="{{conf.conf_id}}" />
			<input type="hidden" name="conf_key" id="conf_key" value="{{conf.conf_key}}" />
			<input type="hidden" name="delegate_no" id="delegate_no" value="{{delegates.delegate_no}}" />
			
			<div class="row my-1">
				<div class="col-6 text-start">
				    <a href="{{ url_for('scan_signup.ScanToSignup',conf_id=conf_id,conf_key=conf_key) }}" class="btn btn-success btn-sm"  style="font-size: 10px;"> Back to Signup</a>
				</div>
				<div class="col-6 text-end">
				    {% if status | int == 0 :%}
				    	<button type="button" class="btn btn-danger btn-sm" style="font-size: 10px;" id="save" name="save_btn"> <i class="fa-solid fa-check"></i> Signup Now</button>
					{% endif %}
				</div>
			</div>
			
			

			{% if status | int == 1 :%}
				<h4 class="mt-3 alert alert-danger text-center text-danger" style="padding: 4px;font-size: medium;">{{msg}}</h4>
			{% elif status | int == 2 %}
				<h4 class="alert alert-success text-center text-black"  style="padding: 4px;font-size: medium;">{{msg}}</h4>
			{% endif  %}
			<div class="row card" style="font-size:12px">
				<div class="col pt-1 px-1">
				<table class="table table-striped table-bordered bg-white">
					<tbody>
						<tr>
							<th>Delegate No.</th>
							<td> <b>{{delegates.delegate_no}}</b></td>
						</tr>
						<tr>
							<th>Name</th>
							<td>{{delegates.prefix}}{{delegates.full_name}}</td>
						</tr>
						<tr>
							<th>Email</th>
							<td>{{delegates.email or '-'}}</td>
						</tr>
						<tr>
							<th>Mobile</th>
							<td>{{delegates.mobile or '-'}}</td>
						</tr>
						{% if delegates.counter %}
						<tr>
							<th>Counter - Set</th>
							<td>{{delegates.counter}} - {{delegates.batch}}</td>
						</tr>
						{% endif %}
						{% if status | int != 0 %}
						<tr style="border-top: 3px solid red;">
							<th>Signup By</th>
							<td>{{delegates.signed_by or ''}}</td>
						</tr>
						<tr >
							<th>Signup Comments</th>
							<td>{{delegates.comments or ''}}</td>
						</tr>
						<tr >
							<th>Signup no</th>
							<td>{% if delegates.signed_on %}{{delegates.signed_on.strftime("%d-%m-%Y %H:%M") or ''}} {% else %} - {% endif %}</td>
						</tr>
						{% endif %}
					</tbody>
				</table>
			</div>
		</div>

			{% if status | int == 0 :%}
				<form id="signupForm" method="POST">
					<div class="row card p-2 text-end" >
						<div class="col-md-12">
							<label >Signedup By</label>
						</div>	
						<input type="hidden" name="is_post_signup" id="is_post_signup" value="1">
						<input type="hidden" name="delegate_no" id="delegate_no" value="{{ delegates.delegate_no }}">
						
						<div class="col-md-12 mt-2">
							<input type="radio" class="form-input" name="signup" id="representive" required value="Representive"><label for="representive" class="ml-2">&nbsp;Representive</label>
							<input type="radio" class="form-input ml-3" name="signup" id="delegate" required value="Delegate" checked><label for="delegate" class="ml-2" >&nbsp;Delegate</label><br>
							<label id="signup-error" class="error" for="signup" style="color:rgb(226, 5, 5)"></label>
						</div>
						<div class="col-md-12">
							<label>Remarks</label>
							<textarea class="form-control" id="remarks" name="remarks" rows="1"></textarea>
						</div>
					</div>
				</form>		
			{% endif %}
			
		</div>
		<div class="col-lg-3"></div>
	</div>
	<div class="row">
	    <div class="col-lg-12 mt-3">
                    <label id="search_label">Search delegate no / reference no</label><br />
                    <div class="input-group mb-3">
                        <div class="input-group-text">
                            <label class="toggleSwitch nolabel" onclick="">
                                <input type="checkbox" id="choose_search_type" name="choose_search_type" checked />
                                <span>
                                    <span class="text-right"><i class="fa-solid fa-at text-right"></i></span>
                                    <span class="text-left"><i class="fa-solid fa-hashtag"></i></span>
                                </span>
                                <a></a>
                            </label>
                        </div>
                        <input type="search" class="form-control" style="height: 30px; font-size: small;" placeholder="Search delegate no / reference no.." id="search_input" name="search_input" autofocus />
                        <div class="input-group-append">
                            <button class="btn btn-success" id="search_btn" type="button" style="height: 30px; border-radius: 0px 12px 12px 0px;"><i class="fa-solid fa-magnifying-glass mb-3"></i></button>
                        </div>
                    </div>
                </div>
        <div class="col-lg-12 mt-3">        
            <div class="div_search_data" style="font-size: 12px;"></div>        
        </div>
	</div>
</div>
{% endblock %}  
{% block footer %}
	<div><span> Total signup : </span> <span class="h4">{{ total_signup_count or 0 }}&nbsp;&nbsp;<a href="{{ url_for('scan_signup.OverallSignupCount',conf_id=conf_id,conf_key=conf_key) }}"  >view more..</a></span></div>
{% endblock %}
{% block bottomscript %}
<script type="text/javascript">
var BaseUrl = document.location.origin;
$(document).ready( function ()
{

    $('#save').on('click', function() {
        $('#signupForm').submit(); // Submit the form with ID signupForm
    });
    
    

});

$(document).on("change", "#choose_search_type",function(e){
    e.preventDefault();
    if($(this).prop('checked') == false){
        $("#search_input").attr("placeholder", "Search full name, email or mobile..");
        $("#search_label").empty().text("Search full name, email or mobile :");
    }else{
        $("#search_input").attr("placeholder", "Search delegate no / reference no..");
        $("#search_label").empty().text("Search delegate no / reference no :");
    }
});


$(document).on("click", "#search_btn",function(e){
    e.preventDefault();
    var conf_id     = $("#conf_id").val();
    var conf_key    = $("#conf_key").val();
    var search_data = $("#search_input").val();
    $(".div_search_data").empty();

    var choosed_search_type = $("#choose_search_type").prop('checked');
    if (choosed_search_type== false){
        var search_type = 0;
    }else{
        var search_type = 1;
    }
    $.ajax({
        type     : "POST", // <-- get method of form
        url      : BaseUrl +"/"+conf_id+"/"+conf_key+ "/search_signup", // <-- get action of form
        data     : {'search_data':search_data,'search_type':search_type},
        dataType : 'html',
        success  : function(reposnse) {
            var data_1    = JSON.parse(reposnse);
            var html_data = data_1.html_data;
            if (data_1.status == 1) {
                $(".div_search_data").empty();
                $(".div_search_data").show();
                $(".div_search_data").html(html_data);
            }
            else {
                alert(data_1.msg);
                return false;
            }
        },
    });


    
});



</script>
{% endblock %}  

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