Sindbad~EG File Manager
@extends('layout')
@section('title')
<title>Case Presentation</title>
@stop
@section('scriptTop')
{{ HTML::script('/js/ajaxloader.js') }}
{{ HTML::script('/js/jquery.validate.js') }}
{{ HTML::script('/js/jquery.common.js') }}
{{ HTML::script('/js/custom.js') }}
@stop
@section('scriptBottom')
<script type="text/javascript">
var hdnId = "#hdnId";
var hdnStep = "#hdnStep";
var hdnIsNext = "#hdnIsNext";
$(document).ready(function () {
validation();
});
function validation()
{
if($(hdnStep).val() == 1)
{
$("#form_s1").validate({
ignore: "",
rules: {
ddlSection: {
required: true
},
ddlType: {
required: true
},
hdnPAId: {
required: true,
number:true,
min:1
}
},
messages:{
hdnPAId :"Please, search and select an Presenting Author Details"
}
});
}
else if($(hdnStep).val() == 2)
{
$("#form_s2").validate({
rules: {
txtTitle: {
required: true,
maxlength:100
},
txtSynopsis: {
required: true,
maxlength:1000
}
},
messages: {
txtTitle:
{
maxlength:"Please enter not more than 200 characters."
},
txtSynopsis:
{
maxlength:"Please enter not more than 2000 characters."
}
}
});
}
else if($(hdnStep).val() == 3)
{
$("#form_s3").validate({
ignore: "",
rules: {
txtpanel_discussion: {
number:true
},
// hdnIsUpoad: {
// required: true
// }
}
});
}
else if($(hdnStep).val() == 5)
{
$("#form_s5").validate({
rules: {
chkterms: {
required:true
}
},
messages: {
chkterms:"Please, accept terms & conditions"
}
});
}
}
function Move(step,nextprevious)
{
//set next or previous
//next then 1 else 0 then previous
$(hdnIsNext).val(nextprevious);
if(nextprevious == 1)
{
validation();
if(!$("#form_s"+ step).valid())
{
return false;
}
if(step == 5)
{
var cfm = confirm("It is not possible to edit your abstract after submit. Do you want to submit it ? Click OK to confirm." + '\n' + '\n' + "While submitting, please do not press ‘Back‘ button or Close the window. Please wait patiently until the submission is complete");
if(!cfm)
{
return false;
}
}
}
// now do whatever you want here
$.ajax({
type: 'POST', // <-- get method of form
url: $("#form_s"+ step).attr('action'), // <-- get action of form
data: $("#form_s"+ step).serialize(), // <-- serialize all fields into a string that is ready to be posted to your PHP file
dataType: 'json',
beforeSend: function(){
ShowProgress();
},
success: function(data){
if(data.code == 1)
{
$('#frm').html(data.data);
}
else
{
errormsg(data.msg);
}
StopProgress();
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
//location.reload();
}
});
return false;
}
</script>
@stop
@section('content')
@section('ContentTitle')
{{ CustomClass::$Title }} Case Presentation Abstract Submission Form
@stop
<div id="frm">
@include('cp.step1')
</div>
@stop
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists