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 active " value="2">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="5" onclick="{% if data.cur_step >= 4 %}jump_step(5){% endif %}">Step 4</button>
</li>
</ul>
<div class="tab-content " id="myTabContent">
<div class="tab-pane fade show active p-2 rounded" role="tabpanel" >
<form action="{{url_for('main.StepPost_2',abs_type=abs_type,conf_id=conf_id,conf_key=conf_key)}}" id="form_s2" method="POST">
{% if data.presentation_type_id == Helper.CC_Presentation_type_id %}
<div class="row ">
<div class="col">
<label class=""><b>Title (not exceeding 150 characters)</b> <span class="text-danger">*</span> <span id="chars" class="text-primary" ></span><span id="chars_text" style="color: blue;"></span></label>
<textarea name="title" id="title" class="form-control" placeholder="Title " value="">{{data.title or ''}}</textarea>
</div>
</div><br>
<div class="row">
<div class="col">
<label><b>Case Report (not exceeding 1000 characters)</b> <span class="text-danger">*</span><span id="chars5" class="text-primary"></span><span id="chars5_text" style="color: blue;"></span><br></label>
<textarea name="synopsis" id="synopsis" class="form-control" cols="50" rows="8" placeholder="Case Report" value="">{{data.synopsis or ''}}</textarea>
</div>
</div><br><br>
{% else %}
<div class="row ">
<div class="col">
<label class=""><b>Title of the Paper (not exceeding 150 characters)</b> <span class="text-danger">*</span> <span id="chars" class="text-primary"></span><span id="chars_text" style="color: blue;"></span></label>
<textarea name="title" id="title" class="form-control" placeholder="Title of the paper" value="">{{data.title or ''}}</textarea>
</div>
</div>
<br />
<div class="row">
<div class="col">
<label><b>Purpose (not exceeding 400 characters)</b> <span class="text-danger">*</span><span id="chars1" class="text-primary ml-1"></span><span id="chars1_text" style="color: blue;"></span><br></label>
<textarea name="purpose" id="purpose" class="form-control" cols="50" rows="6" placeholder="Purpose" value="">{{data.purpose or ''}}</textarea>
</div>
</div><br>
<div class="row">
<div class="col">
<label><b>Methods (not exceeding 700 characters)</b> <span class="text-danger">*</span><span id="chars2" class="text-primary ml-1"></span><span id="chars2_text" style="color: blue;"></span><br></label>
<textarea name="methods" id="methods" class="form-control" cols="50" rows="8" placeholder="Methods" value="">{{data.methods or ''}}</textarea>
</div>
</div><br>
<div class="row">
<div class="col">
<label><b>Result (not exceeding 1000 characters)</b> <span class="text-danger">*</span><span id="chars3" class="text-primary ml-1"></span><span id="chars3_text" style="color: blue;"></span><br></label>
<textarea name="results" id="results" class="form-control" cols="50" rows="8" placeholder="Result" value="">{{data.results or ''}}</textarea>
</div>
</div><br>
<div class="row">
<div class="col">
<label><b>Conclusion (not exceeding 400 characters)</b> <span class="text-danger">*</span><span id="chars4" class="text-primary ml-1"></span><span id="chars4_text" style="color: blue;"></span><br></label>
<textarea name="conclusion" id="conclusion" class="form-control" cols="50" rows="6" placeholder="Conclusion" value="">{{data.conclusion or ''}}</textarea>
</div>
</div><br>
{% endif %}
<div class="row py-2">
<div class="col">
<input type="button" name="Previous" id="Previous" class="btn btn-primary" value="Previous" onclick="move(2,0)" />
</div>
<div class="col">
<input type="button" name="next" id="next" class="btn btn-primary float-right" value="Next" onclick="move(2,1)" />
</div>
</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="cur_step" id="cur_step" value="{{ data.cur_step or 0}}">
<input type="hidden" name="abs_type" id="abs_type" value="{{data.abs_type}}" />
<input type="hidden" name="step" id="step" value="2">
<input type="hidden" name="is_next" id="is_next" value="1">
</form>
</div>
</div>
{% block script %}
<script type="text/javascript">
$(document).ready(function () {
var $title = $("#title");
var $purpose = $("#purpose");
var $synopsis = $("#synopsis");
var $methods = $("#methods");
var $results = $("#results");
var $conclusion = $("#conclusion");
var $chars = $("#chars");
var $chars1 = $("#chars1");
var $chars2 = $("#chars2");
var $chars3 = $("#chars3");
var $chars4 = $("#chars4");
var $chars5 = $("#chars5");
var x150 = 150;
var x400 = 400;
var x4001= 400;
var x700 = 700;
var x1000 = 1000;
var x1001 = 1000;
$chars.html (x150 + " characters remaining");
$chars1.html(x400 + " characters remaining");
$chars2.html(x700 + " characters remaining");
$chars3.html(x1000 + " characters remaining");
$chars4.html(x4001 + " characters remaining");
$chars5.html(x1001 + " characters remaining");
$title.on("keyup", countChar);
$purpose.on("keyup", countChar1);
$methods.on("keyup", countChar2);
$results.on("keyup", countChar3);
$conclusion.on("keyup", countChar4);
$synopsis.on("keyup", countChar5);
countChar();
countChar1();
countChar2();
countChar3();
countChar4();
countChar5();
function countChar() {
var textLength = $title.val().length;
var textRemaining = x150 - textLength;
if (textRemaining < 0) {
$chars.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars.html(textRemaining + " characters exceeded");
} else {
$chars.attr("class", "text-primary ml-2");
$chars.html(textRemaining + " characters remaining");
}
}
function countChar1() {
var textLength = $purpose.val().length;
var textRemaining = x400 - textLength;
if (textRemaining < 0) {
$chars1.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars1.html(textRemaining + " characters exceeded");
} else {
$chars1.attr("class", "text-primary ml-2");
$chars1.html(textRemaining + " characters remaining");
}
}
function countChar2() {
var textLength = $methods.val().length;
var textRemaining = x700 - textLength;
if (textRemaining < 0) {
$chars2.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars2.html(textRemaining + " characters exceeded");
} else {
$chars2.attr("class", "text-primary ml-2");
$chars2.html(textRemaining + " characters remaining");
}
}
function countChar3() {
var textLength = $results.val().length;
var textRemaining = x1000 - textLength;
if (textRemaining < 0) {
$chars3.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars3.html(textRemaining + " characters exceeded");
} else {
$chars3.attr("class", "text-primary ml-2");
$chars3.html(textRemaining + " characters remaining");
}
}
function countChar4() {
var textLength = $conclusion.val().length;
var textRemaining = x4001 - textLength;
if (textRemaining < 0) {
$chars4.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars4.html(textRemaining + " characters exceeded");
} else {
$chars4.attr("class", "text-primary ml-2");
$chars4.html(textRemaining + " characters remaining");
}
}
function countChar5() {
var textLength = $synopsis.val().length;
var textRemaining = x1001 - textLength;
if (textRemaining < 0) {
$chars5.attr("class", "text-danger ml-2");
var textRemaining1 = -textRemaining;
$chars5.html(textRemaining + " characters exceeded");
} else {
$chars5.attr("class", "text-primary ml-2");
$chars5.html(textRemaining + " characters remaining");
}
}
});
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists