camps 1
This commit is contained in:
383
template/templates/camp_apply.tpl
Normal file
383
template/templates/camp_apply.tpl
Normal file
@@ -0,0 +1,383 @@
|
||||
{if $step == 1}
|
||||
|
||||
<div class="form_wrapper">
|
||||
<form method="post" id="apply_1">
|
||||
<div><div><h1>1/3. Táborozó adatainak megadása</h1></div></div>
|
||||
<input type="hidden" name="action" id="action" value="apply_1">
|
||||
<input type="hidden" name="ck_original_id" id="ck_original_id" value="null">
|
||||
<input type="hidden" name="ck_owner_id" id="ck_owner_id" value="{$user_login->get_cu_id()}">
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Korábban megadott adatok:</label>
|
||||
<div>
|
||||
<select name="ck_list" id="ck_list">
|
||||
<option value="null"> - (új adatok megadása) </option>
|
||||
{foreach $kids as $kid}
|
||||
<option value="{$kid->get_ck_id()}">
|
||||
{$kid->get_ck_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label class="desc" for="ck_name">Táborozó neve:</label>
|
||||
<div><input type="text" name="ck_name" id="ck_name" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_birth_year">Születési év:</label>
|
||||
<div><input type="text" name="ck_birth_year" id="ck_birth_year" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_ss_number">TAJ szám:</label>
|
||||
<div><input type="text" name="ck_ss_number" id="ck_ss_number" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_email">E-mail cím:</label>
|
||||
<div><input type="text" name="ck_email" id="ck_email"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_mobile">Telefonszám:</label>
|
||||
<div><input type="text" name="ck_mobile" id="ck_mobile"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_badminton_history">Tollaslabda múlt:</label>
|
||||
<div><textarea rows="5" name="ck_badminton_history" id="ck_badminton_history"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_sport_history">Sport múlt:</label>
|
||||
<div><textarea rows="5" name="ck_sport_history" id="ck_sport_history"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Pólóméret:</label>
|
||||
<div>
|
||||
<select required="required" name="ck_shirt_size_id" id="ck_shirt_size_id">
|
||||
<option value="" disabled selected>Válasszon...</option>
|
||||
{foreach $shirts as $shirt}
|
||||
<option value="{$shirt->get_cshirt_id()}">
|
||||
{$shirt->get_cshirt_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_food_info">Étkezéssel kapcsolatos tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_food_info" id="ck_food_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_hygiene_info">Tisztálkodással kapcsolatos tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_hygiene_info" id="ck_hygiene_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_health_info">Egészségügyi tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_health_info" id="ck_health_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_pharma_info">Rendszeres vagy alkalmi gyógyszer:</label>
|
||||
<div><textarea rows="5" name="ck_pharma_info" id="ck_pharma_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_other_info">Egyéb tudnivalók:</label>
|
||||
<div><textarea rows="5" name="ck_other_info" id="ck_other_info"></textarea></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Tovább a kapcsolattartó adataihoz">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{elseif $step == 2}
|
||||
|
||||
<h1 class="apply">2/3. Kapcsolattartó adatainak megadása</h1>
|
||||
<p class="center reset"><a href="/tabor/jelentkezes/1">Jelentkezés újrakezdése</a><img src="/_image/delete.png"></p>
|
||||
<div class="form_wrapper">
|
||||
<form method="post" id="apply_2">
|
||||
<input type="hidden" name="action" id="action" value="apply_2">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<input type="hidden" name="cc_original_id" id="cc_original_id" value="null">
|
||||
<input type="hidden" name="cc_owner_id" id="cc_owner_id" value="{$user_login->get_cu_id()}">
|
||||
<input type="hidden" name="add_more" id="add_more" value="0">
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Korábban megadott adatok:</label>
|
||||
<div>
|
||||
<select name="cc_list" id="cc_list">
|
||||
<option value="null"> - (új adatok megadása) </option>
|
||||
{foreach $contacts as $contact}
|
||||
<option value="{$contact->get_cc_id()}">
|
||||
{$contact->get_cc_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label class="desc" for="cc_name">Kapcsolattartó neve:</label>
|
||||
<div><input type="text" name="cc_name" id="cc_name" required></div>
|
||||
</div>
|
||||
{if !$has_responsible}
|
||||
<div>
|
||||
<label class="desc" for="cc_is_responsible">Felelős kapcsolattartó (Táborozónként 1 felelős kapcsolattartó megadása kötelező!):</label>
|
||||
<div><input type="checkbox" name="cc_is_responsible" id="cc_is_responsible" value="1" checked></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<label class="desc" for="cc_mobile">Telefonszám:</label>
|
||||
<div><input type="text" name="cc_mobile" id="cc_mobile" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="cc_email">E-mail cím:</label>
|
||||
<div><input type="text" name="cc_email" id="cc_email" required></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="cc_facebook">Facebook:</label>
|
||||
<div><input type="text" name="cc_facebook" id="cc_facebook"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="desc" for="ck_list">Kapcsolat a Táborozóval:</label>
|
||||
<div>
|
||||
<select name="cc_camp_contact_type_cct_id" id="cc_camp_contact_type_cct_id">
|
||||
{foreach $cct_array as $cct}
|
||||
<option value="{$cct->get_cct_id()}">
|
||||
{$cct->get_cct_name()}
|
||||
</option>
|
||||
{/foreach}
|
||||
<option value="new">- új megadása -</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="cct_extra_row"><input type="text" name="cct_add_new" id="cct_add_new" placeholder="Új kapcsolat megadása"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<button class="button black" id="add_more_cct">Mentés és új kapcsolattartó hozzáadása</button>
|
||||
</div>
|
||||
{if $has_contact}
|
||||
<div>
|
||||
<button class="button black" id="move_next">Továbblépés mentés nélkül</button>
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<input class="button black" type="submit" value="Mentés és tovább a tábor adatok megadásához">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{elseif $step == 3}
|
||||
|
||||
<div><h1>2/3. Kapcsolattartó adatainak megadása</h1></div>
|
||||
<div class="danger">Ön nem adott meg felelős kapcsolattartót. Kérjük, a jelentkezéshez válasszon ki 1 felelős kapcsolattartót!</div>
|
||||
<form method="post" id="apply_3">
|
||||
<input type="hidden" name="action" id="action" value="apply_3">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<table>
|
||||
{foreach $contacts as $contact}
|
||||
<tr>
|
||||
<td>{$contact->get_cc_name()}</td>
|
||||
<td><input type="radio" name="cc_is_responsible" value="{$contact->get_cc_id()}" {if $contact@first} checked{/if}></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div>
|
||||
<input class="button black middle" type="submit" value="Tovább a tábor adatok megadásához">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{elseif $step == 4}
|
||||
|
||||
<div><h1>3/3. Tábor kiválasztása</h1></div>
|
||||
<p class="center reset"><a href="/tabor/jelentkezes/1">Jelentkezés újrakezdése</a><img src="/_image/delete.png"></p>
|
||||
<form method="post" id="apply_4">
|
||||
<input type="hidden" name="action" id="action" value="apply_4">
|
||||
<input type="hidden" name="camp_apply_id" id="camp_apply_id" value="{$camp_apply_id}">
|
||||
<table>
|
||||
{foreach $camp_array as $camp}
|
||||
<td>{$camp->get_camp_city()}</td>
|
||||
<td>({$short_months[$camp->get_camp_from()|date_format:"%m"]}. {$camp->get_camp_from()|date_format:"%e"}. -
|
||||
{if $camp->get_camp_from()|date_format:"%m" != $camp->get_camp_to()|date_format:"%m"}
|
||||
{$short_months[$camp->get_camp_to()|date_format:"%m"]}.
|
||||
{/if}
|
||||
{$camp->get_camp_to()|date_format:"%e"}.{if $camp->get_camp_type()->get_ct_name() != " "}, {$camp->get_camp_type()->get_ct_name()}{/if})</td>
|
||||
<td><input id="camp_{$camp->get_camp_id()}" class="camp_id" type="radio" name="camp_id" value="{$camp->get_camp_id()}" {if $camp@first} checked{/if}></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
<div id="accom_list"></div>
|
||||
<div id="shuttle_list"></div>
|
||||
<table class="accept_terms_box">
|
||||
<tr>
|
||||
<td>Kijelentem, hogy minden, az edzőtábor szempontjából fontos információt megadtam, a gyerek egyesületének edzőjét az edzőtáborról tájékoztattam.</td>
|
||||
<td><input type="checkbox" name="accept_terms" id="accept_terms"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<input id="submit_apply" class="button apply middle" type="submit" value="Jelentkezés leadása" disabled="disabled">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
$('.camp_id:checked').trigger('change');
|
||||
});
|
||||
</script>
|
||||
|
||||
{elseif $step == 5}
|
||||
|
||||
<h1>Jelentkezését sikeresen rögzítettük!</h1><br><br>
|
||||
<h2>A jelentkezés állapotát a 'Korábbi jelentkezések' menüpont alatt tekintheti meg!
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#cc_camp_contact_type_cct_id" ).change(function() {
|
||||
if ($(this).val() == 'new') {
|
||||
$("#cct_extra_row" ).show();
|
||||
}
|
||||
else {
|
||||
$("#cct_extra_row" ).hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#add_more_cct" ).click(function() {
|
||||
$("#add_more").val('1');
|
||||
$("#apply_2").submit();
|
||||
});
|
||||
|
||||
$("#move_next" ).click(function() {
|
||||
location.href = "/tabor/move_next";
|
||||
});
|
||||
|
||||
$(".camp_id").change(function() {
|
||||
$.post("/_ajax/get_camp_shuttle_list.php",
|
||||
{
|
||||
camp_id: $(this).val()
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
//console.log(pdata);
|
||||
if (pdata.length >= 2) {
|
||||
var content = '<h2>Kérjük, válassza ki a Táborozó által előnyben részesített labda típust!</h2><table>';
|
||||
$.each(pdata, function(shuttle_id, shuttle_name){
|
||||
content +=
|
||||
'\
|
||||
<tr>\
|
||||
<td>'+shuttle_name['cst_name']+'</td>\
|
||||
<td><input type="radio" name="camp_shuttle" value="'+shuttle_name['cst_id']+ '"' + (shuttle_id==0?' checked':'') +'></td>\
|
||||
</tr>\
|
||||
'
|
||||
});
|
||||
content += '</table>';
|
||||
document.getElementById('shuttle_list').innerHTML = content;
|
||||
}
|
||||
else if (pdata.length == 1) {
|
||||
content = '<input type="hidden" name="camp_shuttle" value="'+pdata[0]['cst_id']+'">';
|
||||
document.getElementById('shuttle_list').innerHTML = content;
|
||||
}
|
||||
});
|
||||
|
||||
$.post("/_ajax/get_camp_accomodation_list.php",
|
||||
{
|
||||
camp_id: $(this).val()
|
||||
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
//console.log(pdata);
|
||||
if (pdata.length >= 2) {
|
||||
var content = '<h2>Kérjük, válassza ki a tábor típusát!</h2><table>';
|
||||
$.each(pdata, function(accom_id, accom_data){
|
||||
content +=
|
||||
'\
|
||||
<tr>\
|
||||
<td>'+accom_data['cat_name']+'</td>\
|
||||
<td><input type="radio" name="camp_accomodation" value="'+accom_data['cat_id']+ '"' + (accom_id==0?' checked':'') +'></td>\
|
||||
</tr>\
|
||||
'
|
||||
});
|
||||
content += '</table>';
|
||||
document.getElementById('accom_list').innerHTML = content;
|
||||
}
|
||||
else if (pdata.length == 1) {
|
||||
content = '<input type="hidden" name="camp_accomodation" value="'+pdata[0]['cat_id']+'">';
|
||||
document.getElementById('accom_list').innerHTML = content;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#ck_list").change(function() {
|
||||
if ($("#ck_list").val() == 'null') {
|
||||
document.getElementById("apply_1").reset();
|
||||
}
|
||||
else {
|
||||
$.post("/_ajax/get_camp_kid_data.php",
|
||||
{
|
||||
camp_kid_id: $(this).val()
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
//console.log(pdata);
|
||||
|
||||
$.each(pdata[0], function(index, ck_data){
|
||||
if (
|
||||
index != 'ck_deleted' &&
|
||||
index != 'ck_id' &&
|
||||
index != 'ck_original_id' &&
|
||||
index != 'ck_owner_id'
|
||||
) {
|
||||
$("#"+index).val(ck_data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#cc_list").change(function() {
|
||||
if ($("#cc_list").val() == 'null') {
|
||||
document.getElementById("apply_2").reset();
|
||||
}
|
||||
else {
|
||||
$.post("/_ajax/get_camp_contact_data.php",
|
||||
{
|
||||
camp_contact_id: $(this).val()
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
//console.log(pdata);
|
||||
$.each(pdata[0], function(index, ck_data){
|
||||
if (
|
||||
index != 'cc_id' &&
|
||||
index != 'cc_original_id' &&
|
||||
index != 'cc_owner_id'
|
||||
|
||||
) {
|
||||
$("#"+index).val(ck_data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#accept_terms").change(function() {
|
||||
if ($("#accept_terms").is(':checked')) {
|
||||
$("#submit_apply").prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
$("#submit_apply").prop('disabled', true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user