Sindbad~EG File Manager

Current Path : /home/numerotech/admin.numerotech.com/admin_app_v1/core/templates/admin_templates/
Upload File :
Current File : //home/numerotech/admin.numerotech.com/admin_app_v1/core/templates/admin_templates/user_access.html

{% extends "layout.html" %}
{% block title %}Admin Access{% endblock %}
{% block header %}Admin Access Index{% endblock %}
{% block content %}
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <select id="societies" class="form-control" onchange="get_society(this.value)">
                <option>--Select Society--</option>
                {% if get_societies %}
                    {% for soc in get_societies %}
                        {% if society_id == soc.society_id %}
                            <option value="{{soc.society_id}}" selected>{{soc.society_name}}</option>
                        {% else %}
                            <option value="{{soc.society_id}}">{{soc.society_name}}</option>
                        {% endif %}
                    {% endfor %}
                {% endif %}
            </select>
        </div>
        
    </div><br>
    
    
    <div class="row">
        <input type="hidden" name="html_data" id="html_data" value="{{html_data or ''}}">
        <div class="col-md-12 form-group" id="user_access_content">
            
        </div>
    </div>
</div><br>

{% endblock %}
{% block script %}
<script>
    var BaseUrl=document.location.origin
    var html_data = $("#html_data").val();
    var society_id= $("#societies").val();
    
    if(society_id){
        get_society(society_id);
    }
    function get_society(society_id){
        $.ajax({
                    type: 'POST', // <-- get method of form
                    url: BaseUrl+"/get_user_access_by_society_id"+"/"+society_id, // <-- get action of form
                    data:  {'society_id':society_id},
                    // data : $("#result_data_form").serialize(),
                    success: function(response){
                        var data_1    = JSON.parse(response);
                        var msg       = data_1.msg;
                        var html_data = data_1.html_data;
                        if (msg == "success")
                        {
                            
                        $("#user_access_content").empty();
                        $("#user_access_content").html(html_data);
                            
                        }  
                        else
                        {   
                            return false;
                        }
                                    
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) { 
                    }                      
                }); 
    }
    
</script>
{% endblock %}

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