Sindbad~EG File Manager
{% extends "users/layout.html" %}
{% block content %}
{% block bottomscript %}
{% endblock %}
<br>
<form id="registration_form" method="POST" action="{{ url_for('user.DelegateUpdateRegister',society_id=society_id,id=user_id)}}">
<div class="container" style="background-color:white;">
<div class="row">
<div class="col-sm-2">
<input type="text" class="form-control" name="user_id" id="user_id" value="{{output.user_id}}" hidden>
<input type="text" class="form-control" name="society_id" id="society_id" value="{{society_id}}" hidden>
<label>Prefix <span class="mand">*</span></label>
<select class="form-control w-100 required" id="prefix" name="prefix" required="">
<option value="" id="select"> Select Prefix</option>
{% if output %}
<option value = "{{output.prefix}}" selected> {{output.prefix|default('')}} </option>
{% endif %}
<option value="Mr."> Mr. </option>
<option value="Mrs."> Mrs. </option>
<option value="Dr." > Dr. </option>
<option value="Ms."> Ms. </option>
<option value="Prof."> Prof. </option>
<option value="Others"> Others </option>
</select>
</div>
<div class="col-sm-10">
<label>Full name <span class="mand">*</span> <br> </label>
<input type="name" class="form-control" name="name" id="name" placeholder="Enter Full Name" value="{{output.full_name|default('')}}" required="">
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>Email <span class="mand">*</span> <br></label>
<input type="email" class="form-control" name="email" id="email" placeholder="Enter Email-Id" value="{{output.email|default('')}}" required="">
</div>
<div class="col-sm-6">
<label>Mobile <span class="mand">*</span></label>
<input type="text" class="form-control" id="mobile" name="mobile" value="{{output.mobile|default('')}}" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="Enter mobile">
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>DOB <span class="mand">*</span> <br></label>
<input type="date" class="form-control" name="dob" id="dob" placeholder="Enter Date" value = "{{ output.dob|default('')}}" required="">
</div>
<div class="col-sm-6">
<label>Gender <span class="mand">*</span> <br></label><br>
<input type="radio" name="gender" value="Male" {% if output.gender == 'Male' %} checked="checked" {% endif %}> Male
<input type="radio" name="gender" value="Female" {% if output.gender == 'Female' %} checked="checked" {% endif %}> Female
<input type="radio" name="gender" value="Transgender" {% if output.gender == 'Transgender' %} checked="checked" {% endif %}> Transgender </input>
<br/>
<span class="error" name="gendererror" id="gendererror"></span>
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>Address Line 1 <span class="mand">*</span></label>
<input type="text" class="form-control" id="address_line_1" name="address_line_1"
{% if output.address_line_1 == None: %} value="{{''}}" {% else %} value="{{output.address_line_1|default('')}}" {% endif %} placeholder="Enter Address Line 1" required="">
<br>
<label>Address Line 2 <span class="mand">*</span></label>
<input type="text" class="form-control" id="address_line_2" name="address_line_2" {% if output.address_line_2 == None: %} value="{{''}}" {% else %} value="{{output.address_line_2|default('')}}" {% endif %} placeholder="Enter Address Line 2" required="">
<br>
<label>Address Line 3 <span class="mand">*</span></label>
<input type="text" class="form-control" id="address_line_3" name="address_line_3" {% if output.address_line_3 == None: %} value="{{''}}" {% else %} value="{{output.address_line_3|default('')}}" {% endif %} placeholder="Enter Address Line 3" required="">
</div>
<div class="col-sm-6">
<label>City <span class="mand">*</span> <br></label>
<input type="text" class="form-control" name="city" id="city" placeholder="Enter City" {% if output.city == None: %} value="{{''}}" {% else %} value="{{output.city|default('')}}" {% endif %} required="">
<br>
<!-- <div class="col-sm-12"> -->
<label>Pincode <span class="mand">*</span> <br></label>
<input type="text" class="form-control" name="pincode" id="pincode" {% if output.pincode == None: %} value="{{''}}" {% else %} value="{{output.pincode|default('')}}" {% endif %} placeholder="Enter Pincode" required="">
<br>
<label>State <span class="mand">*</span> <br></label>
<select class = "form-control" id = "state" name = "state">
<option value = "" id = "select">Select state</option>
{% if states :%}
{% for state in states :%}
<option value = "{{state.state_id}}"> {{state.state_name}} </option>
{% if state.state_id == output.state : %}
<option value = "{{state.state_id}}" selected> {{state.state_name}} </option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>Country <span class="mand">*</span> <br></label>
<input type="text" class="form-control" name="country" id="country" value="India" >
</div>
<div class="col-sm-6">
<label>MC Number <span class="mand">*</span> <br></label>
<input type="text" class="form-control" name="mc_number" id="mc_number" {% if output.mc_number == None: %} value="{{''}}" {% else %} value="{{output.mc_number|default('')}}" {% endif %} placeholder="Enter MC Number" required="">
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>MC State<span class="mand">*</span> <br></label>
<select class = "form-control " id = "mc_state" name = "mc_state">
<option value = "" id = "select">Select mc state</option>
{% if states %}
{% for mc in states %}
<option value = "{{mc.state_id}}"> {{mc.state_name}} </option>
{% if mc.state_id == output.mc_state : %}
<option value = "{{mc.state_id}}" selected> {{mc.state_name}} </option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div>
<div class="col-sm-6">
<label>Register Type<span class="mand">*</span> <br></label>
<select class = "form-control " id = "reg_type_id" name = "reg_type_id" disabled>
<option value = "" id = "select" >Select register type</option>
{% if reg_type %}
{% for mc in reg_type %}
<option value = "{{mc.reg_type_id}}" > {{mc.type_name}} </option>
{% if mc.reg_type_id == output.reg_type_id : %}
<option value = "{{mc.reg_type_id}}" selected > {{mc.type_name}} </option>
{% endif %}
{% endfor %}
{% endif %}
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<label>Amount <span class="mand">*</span> <br></label>
{% if reg_type %}
{% for mc in reg_type %}
{% if mc.reg_type_id == output.reg_type_id : %}
<input type="text" class="form-control" name="amount" id="amount" {% if mc.reg_type_id == output.reg_type_id : %} value="{{mc.amount}}" {% else %} value="{{mc.amount}}" {% endif %} placeholder="Enter Amount" required="" disabled>
{% endif %}
{% endfor %}
{% endif %}
</div>
<div class="col-sm-3" >
<label><span class="mand"></span> <br></label>
<a style="color:white;" href="{{ url_for('user.RegType',id=output.user_id,society_id=society_id) }}"><button type="button" name="edit_button" class="btn btn-primary btn-md btn-block text-uppercase" style="align-items: center;"> Previous </button> </a>
</div>
<div class="col-sm-3" >
<label><span class="mand"></span> <br></label>
<input type="submit" class="btn btn-primary btn-md btn-block text-uppercase submit_btn" id="submit_btn" name="submit_btn" value="Next">
</div>
</div>
<br>
</div>
</form>
<script type="text/javascript">
var BaseUrl = document.location.origin
$("#registration_form").validate({
// in 'rules' user have to specify all the constraints for respective fields
rules : {
prefix : "required",
name : {
required:true,
},
email : {
required : true,
email : true
},
mobile :{
required:true,
},
password : "required",
password : "required",
confirm_password : {
required : true,
minlength : 4,
equalTo : "#password",
},
},
messages : {
prefix : "Please select the Prefix",
name : "Please enter the Name",
email : {
required : "Please enter the Email id",
email : "Please enter valid Email Id"
},
mobile : {
required : "Please enter Mobile number",
},
password : "Please enter the password",
confirm_password : "Please enter the confirm password",
},
});
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists