356 lines
20 KiB
PHP
356 lines
20 KiB
PHP
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||
|
||
<link rel="icon" href="../dist/images/fav.ico" type="image/ico" sizes="16x16" />
|
||
<title>techno transport 2022</title>
|
||
<link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css" />
|
||
<link rel="stylesheet" href="../dist/css/adminlte.css" />
|
||
<link rel="stylesheet" href="../dist/css/fontiran.css" />
|
||
<!-- date picker link -->
|
||
<link rel="stylesheet" href="../dist/css/persian-datepicker.min.css" />
|
||
<!-- date picker link -->
|
||
<link rel="stylesheet" href="../dist/css/footer.css" />
|
||
|
||
<link rel="icon" href="../dist/images/fav.ico" type="image/ico" sizes="16x16" />
|
||
<link rel="stylesheet" href="../dist/css/DailyAccident.css?_={{ mt_rand(1, 99999999999) }}" />
|
||
<style>
|
||
#expert_confirmation_modal .fieldsetstyle legend {
|
||
font-size: 18px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.fieldsetstyle {
|
||
border: 2px solid #ff5c0f;
|
||
border-radius: 10px;
|
||
}
|
||
.fieldsetstyle label {
|
||
margin-bottom: 0px
|
||
}
|
||
.img-preview {
|
||
width: 100px;
|
||
height: 60px;
|
||
}
|
||
.validity-style {
|
||
border-color: crimson;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="divloader">
|
||
<span class="loader"><span class="loader-inner"></span></span>
|
||
</div>
|
||
@include('layouts.header')
|
||
<div class="container">
|
||
<div class="d-flex align-items-center mt-3 mb-3">
|
||
<h5 class="mb-0 ml-2 text-nowrap ml-4">دانلود فرم ایده</h5>
|
||
<hr class="w-100">
|
||
<a href="https://rms.rmto.ir/storage/form.docx"><button class="btn btn-dark mr-4">دانلود</button></a>
|
||
</div>
|
||
<fieldset class="fieldsetstyle">
|
||
<legend>ثبت نام</legend>
|
||
<div class="d-flex align-items-center justify-content-center mb-3">
|
||
<div class="d-flex align-items-center ml-3">
|
||
<input class="real-legal" type="radio" name="real-legal" id="real" checked>
|
||
<label class="mr-1" for="real">حقیقی</label>
|
||
</div>
|
||
<div class="d-flex align-items-center">
|
||
<input class="real-legal" type="radio" name="real-legal" id="legal">
|
||
<label class="mr-1" for="legal">حقوقی</label>
|
||
</div>
|
||
</div>
|
||
<div class="change-data-pack-real d-flex flex-column align-items-center justify-content-center mb-3">
|
||
<div class="row col-12 justify-content-center mb-3">
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="name">نام</label>
|
||
<input id="name" class="form-control validation-input" type="text">
|
||
</div>
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="family">نام خانوادگی</label>
|
||
<input id="family" class="form-control validation-input" type="text">
|
||
</div>
|
||
</div>
|
||
<div class="row col-12 justify-content-center">
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="telphone">شماره تماس</label>
|
||
<input id="telphone" class="form-control validation-input" type="text">
|
||
</div>
|
||
<div class="col-3 form-group">
|
||
<label for="real_province_id">استان</label>
|
||
<select class="form-control validation-select" id="real_province_id" name="real_province_id"
|
||
class="form-control">
|
||
</select>
|
||
</div>
|
||
<div class="col-3 form-group">
|
||
<label for="real_address">آدرس</label>
|
||
<input id="real_address" class="form-control validation-input" type="text">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="change-data-pack-legal mb-3 flex-column align-items-center justify-content-center d-none">
|
||
<div class="row col-12 justify-content-center mb-3">
|
||
<div class="col-3 form-group">
|
||
<label for="co_type">نوع شرکت</label>
|
||
<select id="co_type" name="co_type" class="form-control validation-select">
|
||
<option value="0">انتخاب نوع شرکت</option>
|
||
<option value="1">دانشگاهی</option>
|
||
<option value="2">دانش بنیان</option>
|
||
<option value="3">استارتاپ</option>
|
||
<option value="4">موسسه تحقیقاتی</option>
|
||
<option value="5">مهندسین مشاور</option>
|
||
<option value="6">سایر</option>
|
||
</select>
|
||
</div>
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="legal_province_id">استان</label>
|
||
<select id="legal_province_id" name="legal_province_id"
|
||
class="form-control validation-select">
|
||
</select>
|
||
</div>
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="">تماس/فکس</label>
|
||
<input class="form-control validation-input" type="text">
|
||
</div>
|
||
</div>
|
||
<div class="row col-12 justify-content-center">
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="legal_address">آدرس</label>
|
||
<input id="legal_address" class="form-control validation-input" type="text">
|
||
</div>
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="co_name">نام مدیرعامل شرکت</label>
|
||
<input id="co_name" class="form-control validation-input" type="text">
|
||
</div>
|
||
<div class="col-3 align-items-start form-group">
|
||
<label for="co_cellphone">شماره تماس مدیر</label>
|
||
<input id="co_cellphone" class="form-control validation-input" type="text">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<fieldset class="fieldsetstyle mt-3">
|
||
<legend>انتخاب محور رویداد</legend>
|
||
<div class="container-fluid">
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="1" value="1">
|
||
<label class="mr-2 axis-label" for="1">ارائه راهکارها و خدمات مبتنی بر فناوری های نوین و هوشمندسازی در حمل و نقل جاده ای</label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="2" value="2">
|
||
<label class="mr-2 axis-label" for="2"> توسعه روشهای نوین و پیشگیرانه در جهت ارتقای ایمنی حمل و نقل جادهای </label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="3" value="3">
|
||
<label class="mr-2 axis-label" for="3">نوسازی، بهسازی و بهینه سازی ناوگان حمل و نقل جاده ای</label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="4" value="4">
|
||
<label class="mr-2 axis-label" for="4">ارتقای فرآیندهای عملیاتی حمل و نقل جاده ای</label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="5" value="5">
|
||
<label class="mr-2 axis-label" for="5">روشهای خلاقانه موثر در آموزش حرفهای شاغلین در حمل و نقل جادهای </label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="6" value="6">
|
||
<label class="mr-2 axis-label" for="6">راهکارهای تحولی و فناورانه در شکوفایی اقتصاد حمل و نقل جادهای </label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="7" value="7">
|
||
<label class="mr-2 axis-label" for="7">متناسب سازی و رونق بخشی حمل و نقل کالا و مسافر ( داخلی و بین المللی با اولویت کریدورهای بین المللی عبوری از ایران)</label>
|
||
</div>
|
||
<div class="d-flex align-items-center mb-1">
|
||
<input type="radio" name="axis_type" id="8" value="8">
|
||
<label class="mr-2 axis-label" for="8">ایده آزاد</label>
|
||
</div>
|
||
<div class="d-flex justify-content-center mt-4 mb-1">
|
||
<div class="col-6 form-group">
|
||
<label for="idea_title">عنوان ایده</label>
|
||
<input id="idea_title" class="form-control" type="text">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</fieldset>
|
||
<fieldset class="fieldsetstyle mt-3">
|
||
<legend>ارسال ایده</legend>
|
||
<div class="container-fluid text-center mb-3 mt-1">
|
||
<input type="file" name="idea_file" id="idea_file" class="img-input" accept=".doc,.docx,.ppt,.pptx,.txt,.pdf">
|
||
</div>
|
||
</fieldset>
|
||
<div class="d-flex justify-content-center align-items-center mt-4 mb-4"><button id="send_form" class="btn btn-primary">ثبت فرم</button></div>
|
||
</div>
|
||
<script src="../plugins/jquery/jquery.min.js"></script>
|
||
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||
<script src="../dist/js/header.js"></script>
|
||
<script src="../dist/js/sweetalert2js.js"></script>
|
||
<!-- date picker script -->
|
||
<script src="../dist/js/persian-datepicker.min.js"></script>
|
||
<script src="../dist/js/persian-date.min.js"></script>
|
||
|
||
<script>
|
||
function showLoaderScreen() {
|
||
$(".divloader").css("display", "flex").hide().fadeIn();
|
||
}
|
||
|
||
function hideLoaderScreen() {
|
||
$(".divloader").fadeOut();
|
||
}
|
||
$(document).ready(function() {
|
||
$.ajax({
|
||
url: `https://rms.rmto.ir/webapi/getuser/province-perm?type=all`,
|
||
type: "GET",
|
||
beforeSend: function() {
|
||
showLoaderScreen();
|
||
},
|
||
success: function(result) {
|
||
const provinces = result.data;
|
||
$("#real_province_id").empty();
|
||
$("#legal_province_id").empty();
|
||
$("#real_province_id").append('<option value="0">انتخاب استان</option>');
|
||
$("#legal_province_id").append('<option value="0">انتخاب استان</option>');
|
||
|
||
for (let index = 0; index < provinces.length; index++) {
|
||
$("#real_province_id").append(
|
||
"\
|
||
<option data-center-lat=" + provinces[index].center_lat + " data-center-lng=" + provinces[index].center_long + " value=" +
|
||
provinces[index].id +
|
||
">" +
|
||
provinces[index].name_fa +
|
||
"</option>\
|
||
"
|
||
);
|
||
$("#legal_province_id").append(
|
||
"\
|
||
<option data-center-lat=" + provinces[index].center_lat + " data-center-lng=" + provinces[index].center_long + " value=" +
|
||
provinces[index].id +
|
||
">" +
|
||
provinces[index].name_fa +
|
||
"</option>\
|
||
"
|
||
);
|
||
}
|
||
hideLoaderScreen();
|
||
},
|
||
error: function(error) {
|
||
hideLoaderScreen();
|
||
Swal.fire({
|
||
icon: "error",
|
||
title: "خطا",
|
||
text: "مشکل در دریافت استان ها",
|
||
confirmButtonText: "بروزرسانی صفحه",
|
||
showLoaderOnConfirm: true,
|
||
preConfirm: () => {
|
||
location.reload(true);
|
||
},
|
||
});
|
||
},
|
||
});
|
||
});
|
||
$(document).on("change", ".real-legal", function() {
|
||
if($("#real").is(':checked')) {
|
||
$(".change-data-pack-real").removeClass("d-none").addClass("d-flex");
|
||
$(".change-data-pack-legal").addClass("d-none").removeClass("d-flex");
|
||
}else {
|
||
$(".change-data-pack-real").addClass("d-none").removeClass("d-flex");
|
||
$(".change-data-pack-legal").removeClass("d-none").addClass("d-flex");
|
||
}
|
||
});
|
||
$(document).on("click", "#send_form", function() {
|
||
if($("#real").is(':checked')) {
|
||
$(".change-data-pack-legal").find(".validation-input").removeClass("validity-style");
|
||
$(".change-data-pack-legal").find(".validation-select").removeClass("validity-style");
|
||
|
||
const inputs = $(".change-data-pack-real").find(".validation-input");
|
||
const emptyInputs = $(".change-data-pack-real").find(".validation-input").filter(function(){ return !$(this).val()});
|
||
const fillInputs = $(".change-data-pack-real").find(".validation-input").filter(function(){ return $(this).val()});
|
||
|
||
const selects = $(".change-data-pack-real").find(".validation-select");
|
||
const emptyselects = $(".change-data-pack-real").find(".validation-select").filter(function(){ return $(this).val() == 0});
|
||
const fillIselects = $(".change-data-pack-real").find(".validation-select").filter(function(){ return $(this).val() != 0});
|
||
|
||
emptyInputs.addClass("validity-style");
|
||
fillInputs.removeClass("validity-style");
|
||
emptyselects.addClass("validity-style");
|
||
fillIselects.removeClass("validity-style");
|
||
|
||
if (emptyInputs.length != 0 || emptyselects.length != 0)
|
||
Swal.fire({icon: "warning", text: " فیلد های مشخص شده را پر کنید", confirmButtonText: "بستن",})
|
||
}
|
||
if($("#legal").is(':checked')) {
|
||
$(".change-data-pack-real").find(".validation-input").removeClass("validity-style");
|
||
$(".change-data-pack-real").find(".validation-select").removeClass("validity-style");
|
||
|
||
const inputs = $(".change-data-pack-legal").find(".validation-input");
|
||
const emptyInputs = $(".change-data-pack-legal").find(".validation-input").filter(function(){ return !$(this).val()});
|
||
const fillInputs = $(".change-data-pack-legal").find(".validation-input").filter(function(){ return $(this).val()});
|
||
|
||
const selects = $(".change-data-pack-legal").find(".validation-select");
|
||
const emptyselects = $(".change-data-pack-legal").find(".validation-select").filter(function(){ return $(this).val() == 0});
|
||
const fillIselects = $(".change-data-pack-legal").find(".validation-select").filter(function(){ return $(this).val() != 0});
|
||
|
||
emptyInputs.addClass("validity-style");
|
||
fillInputs.removeClass("validity-style");
|
||
emptyselects.addClass("validity-style");
|
||
fillIselects.removeClass("validity-style");
|
||
|
||
if (emptyInputs.length != 0 || emptyselects.length != 0)
|
||
Swal.fire({icon: "warning", text: " فیلد های مشخص شده را پر کنید", confirmButtonText: "بستن",})
|
||
}
|
||
if ($(document).find(".validity-style").length == 0) {
|
||
let formData = new FormData();
|
||
const radio_needed = $("input[name=axis_type]:checked");
|
||
console.log(radio_needed);
|
||
formData.append("file", $("#idea_file").get(0).files[0]);
|
||
formData.append("presenter_type", $("#real").is(":checked") ? 1 : 0);
|
||
formData.append("company_type", $("#co_type option:selected").val());
|
||
formData.append("ceo_name", $("#co_name").val());
|
||
formData.append("ceo_cellphone", $("#co_cellphone").val());
|
||
formData.append("name", $("#name").val());
|
||
formData.append("family", $("#family").val());
|
||
formData.append("telphone", $("#telphone").val());
|
||
formData.append("province_id", $("#real").is(":checked") ? $("#real_province_id").val() : $("#legal_province_id").val());
|
||
formData.append("address", $("#real").is(":checked") ? $("#real_address").val() : $("#legal_address").val());
|
||
formData.append("idea_title", $("#idea_title").val());
|
||
formData.append("event_type", radio_needed.val());
|
||
formData.append("event_fa", radio_needed.parent().find(".axis-label").text());
|
||
|
||
$.ajax({
|
||
url: "https://rms.rmto.ir/technotransport2022",
|
||
type: "POST",
|
||
headers: {
|
||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||
},
|
||
data: formData,
|
||
cache: false,
|
||
contentType: false,
|
||
processData: false,
|
||
success: function(result) {
|
||
hideLoaderScreen();
|
||
$("#send_form").prop("disabled", false);
|
||
Swal.fire({
|
||
icon: "success",
|
||
text: "با موفقیت ثبت گردید",
|
||
confirmButtonText: "بستن",
|
||
});
|
||
},
|
||
error: function(error) {
|
||
hideLoaderScreen();
|
||
$("#send_form").prop("disabled", false);
|
||
Swal.fire({
|
||
icon: "error",
|
||
title: "خطا",
|
||
text: "مشکل در ارتباط با سرور",
|
||
confirmButtonText: "بستن",
|
||
});
|
||
},
|
||
});
|
||
}else {
|
||
Swal.fire({icon: "warning", text: " فیلد های مشخص شده را پر کنید", confirmButtonText: "بستن",});
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |