Sindbad~EG File Manager
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item p-2">
<button type="button" class="nav-link nav_btn_gray " value="1" onclick="jump_step(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="jump_step(2)">Step 2</button>
</li>
<li class="nav-item p-2">
<button type="button" class="nav-link active " value="3">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 class="tab-content " id="myTabContent">
<div class="tab-pane fade show active p-2 rounded" role="tabpanel" >
<form id="form_s3" class="form_s3" action="{{url_for('main.Step3post',abs_id=abs_id,abs_type=abs_type,conf_id=conf_id,conf_key=conf_key)}}" method="POST" >
<div id="total_duration_msg" class="alert alert-danger">Sorry! you cannot add more than 75 minutes</div>
<div class="row">
<div class="col text-center">
</div>
</div>
<div class="row">
<div class="col mt-2">
<label>Co Authors (Not more than 6) </label>
</div>
</div>
<div id="co_author_table"></div>
<div class="row py-2">
<div class="col">
<input type="button" name="Previous" id="Previous" class="btn btn-primary" value="Previous" onclick="move(3,0)" />
</div>
<div class="col">
<input type="button" name="next" id="next" class="btn btn-primary float-right" value="Next" onclick="move(3,1)" />
</div>
<input type="hidden" name="abs" id="abs_id" value="{{abs_id}}" />
<input type="hidden" name="abs_type" id="abs_type" value="{{abs_type}}">
<input type="hidden" name="step" id="step" value="3">
<input type="hidden" name="decry_abs_id" id="decry_abs_id" value="{{Cryptography.decrypt(abs_id)}}" />
<input type="hidden" name="is_next" id="is_next" value="1">
<input type="hidden" name="cur_step" id="cur_step" value="{{ data.cur_step or 0 }}">
</div>
</form>
</div>
</div>
<!-- search co instructior model -->
<!-- The Modal -->
<form id="search_model">
<div class="modal" id="searchcoinst">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Add Co Author</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body p-3">
</form>
<form id="new_user_form">
<div class="row" id="new_user_row">
<div class="col">
<div class="row">
<div class="col-lg-6 col-sm-12 form-group">
<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-lg-6 col-sm-12 form-group">
<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-lg-6 col-sm-12 form-group">
<label>Mobile: (Optional)</label><br>
<div class="input-group">
<select class = "form-control " id ="mobile_isd_code" name= "mobile_isd_code" >
<option value = "" id = "select">Country Code</option>
{% if isd_country_data %}
{% for i in isd_country_data %}
<option value = "{{i.isd_code}}" {{ "selected" if i.isd_code == data.mobile_isd_code }}>{{i.country_name}} ({{i.isd_code}})</option>
{% endfor %}
{% endif %}
</select>
<input type="text" class="form-control" id="author_mobile" name="author_mobile" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="Author Mobile" />
</div>
<label id="isd_code-error" class="error" for="mobile_isd_code"></label> <br/>
<label id="author_mobile-error" class="error" for="author_mobile"></label>
</div>
<div class="col-lg-6 col-sm-12 form-group">
<label>Affiliation:</label><br>
<input type="text" name="author_affiliation" class="form-control" required id="author_affiliation" placeholder="Author Affiliation">
</div>
</div>
<div class="row">
<div class="col-lg-6 col-sm-12 form-group">
<label>City:</label><br>
<input type="text" name="author_city" class="form-control" required id="author_city" placeholder="Author City">
</div>
<div class="col-lg-6 col-sm-12 form-group">
<label>Country:</label><br>
{% set user_country = data.country_id if data.country_id else 101 %}
<select name="author_country" class="form-control" required id="author_country">
<option value = "" id = "select">Select Country*</option>
{% if country %}
{% for i in country %}
<option value = "{{i.country_id}}" {{ "selected" if i.country_id == user_country }}> {{i.country_name}}</option>
{% endfor %}
{% endif %}
</select>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button onclick="new_user_form_validation()" type="button" name="submit_request" id="submit_request" class="btn btn-primary" >Add Author</button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
<div id="searchmodel"></div>
</div>
</div>
</div>
</form>
<input type="hidden" name="total_duration_data" id="total_duration_data" value="{{total_duration}}" />
{% block script %}
<script type="text/javascript">
$(document).ready(function() {
var abs_type = $("#abs_type").val();
var BaseUrl = document.location.origin;
getauthordata();
// $("#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 author_mobile = $("#author_mobile").val();
var author_affiliation = $("#author_affiliation").val();
var author_city = $("#author_city").val();
var author_country = $("#author_country").val();
var abs_id = $("#decry_abs_id").val();
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
var mobile_isd_code = $("#mobile_isd_code").val();
$.ajax({
type: "POST",
url: BaseUrl + "/send_request_v1/"+conf_id+"/"+conf_key,
data: {
'author_name' : author_name,
'author_email': auhtor_mail,
'author_mobile' : author_mobile,
'author_affiliation' : author_affiliation,
'author_city' : author_city,
'author_country' : author_country,
'abs_id' : abs_id,
'role_id' : 36,
'abs_type' : "VT",
'conf_id' : conf_id,
'mobile_isd_code' : mobile_isd_code,
},
dataType: "html",
success: function (data) {
// alert("Request mail successfully sent")
$("#searchcoinst").modal('hide');
$("#searchtext").val('');
$("#searchtable").html('');
$('#new_user_form').trigger("reset");
getauthordata();
$("#searchdiv").hide();
return true;
},
});
}
else{
return false;
}
})
function new_user_form_validation() {
$("#new_user_form").validate({
rules: {
author_name:{
required:true,
minlength:3,
},
author_email:{
required:true,
email:true,
},
author_affiliation:{
required:true,
},
author_city:{
required:true,
},
author_country:{
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",
email:"Please enter a valid email"
},
author_affiliation:{
required:"Please enter the author affiliation",
},
author_city:{
required:"Please enter the author city",
},
author_country:{
required:"Please enter the author country",
},
},
});
}
$("#over_duration").hide();
$("#zero_msg").hide();
$("#total_duration_msg").hide();
$("#search_model").keypress(function(e)
{
if(e.which == 13)
{
$("#searchbtn").click()
validate_search();
return false
}
return true
});
$("#searchbtn").click(function(){
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 enter at least 3 characters."
},
},
});
if($("#search_model").valid()){
var searchtext = $("#searchtext").val();
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
$.ajax({
type: "GET",
url: BaseUrl +"/searchauthor/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
'searchtext': searchtext,
'abs_type' :"VT",
'btn_val' :"1"
},
dataType: "html",
success: function (data) {
// alert("success")
// alert(data)
$("#searchtable").html(data);
return true;
},
});
}
};
$("#next").click(function () {
validateion();
});
});
function select_Author(user_id) {
var abs_id = $("#abs_id").val();
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
$.ajax({
type: 'GET',
url: BaseUrl +"/add_co_author/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
'user_id' : user_id,
'abs_type' : "VT",
'abs_id' : abs_id,
'role_id' : 36
},
dataType: 'html',
success: function(data) {
$("#searchcoinst").modal('hide');
$("#searchtext").val('');
$("#searchtable").html('');
getauthordata();
$("#searchdiv").hide();
}
})
return false;
}
function getauthordata() {
var abs_id = $("#abs_id").val();
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
$.ajax({
type: "GET",
url: BaseUrl +"/get_co_author/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
abs_id: abs_id,
abs_type: "VT"
},
dataType: "html",
success: function(data) {
$("#co_author_table").html(data);
},
});
}
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists