remove shirt from camps
This commit is contained in:
@@ -18,8 +18,6 @@ class camp_kid
|
||||
private $ck_mobile;
|
||||
private $ck_badminton_history;
|
||||
private $ck_sport_history;
|
||||
private $ck_shirt_size_id;
|
||||
private $ck_shirt;
|
||||
private $ck_food_info;
|
||||
private $ck_hygiene_info;
|
||||
private $ck_health_info;
|
||||
@@ -220,54 +218,6 @@ class camp_kid
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_shirt_size_id.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_shirt_size_id()
|
||||
{
|
||||
return $this->ck_shirt_size_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_shirt_size_id.
|
||||
*
|
||||
* @param mixed $ck_shirt_size_id the ck shirt size id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_shirt_size_id($ck_shirt_size_id)
|
||||
{
|
||||
$this->ck_shirt_size_id = $ck_shirt_size_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_shirt.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_ck_shirt()
|
||||
{
|
||||
return $this->ck_shirt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of ck_shirt.
|
||||
*
|
||||
* @param mixed $ck_shirt the ck shirt
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
private function set_ck_shirt($ck_shirt)
|
||||
{
|
||||
$this->ck_shirt = $ck_shirt;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of ck_food_info.
|
||||
*
|
||||
@@ -467,11 +417,7 @@ class camp_kid
|
||||
foreach ($ck_data_array as $field => $value) {
|
||||
$function_name = "set_" . $field;
|
||||
$this->$function_name($value);
|
||||
if ($field == 'ck_shirt_size_id') {
|
||||
$new_shirt = new camp_shirt();
|
||||
$new_shirt->set_cshirt_data_by_id($value);
|
||||
$this->set_ck_shirt($new_shirt);
|
||||
}
|
||||
|
||||
if ($field == 'ck_owner_id') {
|
||||
$new_camp_user = new camp_user();
|
||||
$new_camp_user->set_user_data_by_id($value);
|
||||
@@ -489,7 +435,7 @@ class camp_kid
|
||||
return ($str == ""?"null":$str);
|
||||
}
|
||||
|
||||
public static function create_camp_kid($_name, $_birth_year, $_ss_number, $_email, $_mobile, $_shirt_id, $_info, $_original_id, $_owner_id) {
|
||||
public static function create_camp_kid($_name, $_birth_year, $_ss_number, $_email, $_mobile, $_info, $_original_id, $_owner_id) {
|
||||
global $sql;
|
||||
return $sql->insert_into('camp_kid', array(
|
||||
'ck_name' => $_name,
|
||||
@@ -497,7 +443,6 @@ class camp_kid
|
||||
'ck_ss_number' => $_ss_number,
|
||||
'ck_email' => $_email,
|
||||
'ck_mobile' => $_mobile,
|
||||
'ck_shirt_size_id' => $_shirt_id,
|
||||
'ck_original_id' => $_original_id,
|
||||
'ck_owner_id' => $_owner_id,
|
||||
'ck_sport_history' => self::empty_to_null($_info['ck_sport_history']),
|
||||
|
||||
@@ -464,7 +464,6 @@ if (isset($_POST['action'])) {
|
||||
$_POST['ck_ss_number'],
|
||||
$_POST['ck_email'],
|
||||
$_POST['ck_mobile'],
|
||||
$_POST['ck_shirt_size_id'],
|
||||
array(
|
||||
'ck_sport_history' => $_POST['ck_sport_history'],
|
||||
'ck_badminton_history' => $_POST['ck_badminton_history'],
|
||||
|
||||
4
queries/202104_camp_updates.sql
Normal file
4
queries/202104_camp_updates.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE badminton_coach.camp_kid DROP FOREIGN KEY fk_camp_kid_1`;`
|
||||
ALTER TABLE `camp_kid` DROP INDEX `fk_camp_kid_1_idx`;
|
||||
ALTER TABLE `camp_kid` DROP `ck_shirt_size_id`;
|
||||
|
||||
@@ -48,19 +48,6 @@
|
||||
<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>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="buttons">
|
||||
<a href="/admin/create/camp" class="addbutton add-big">Új tábor létrehozása</a>
|
||||
<a href="/admin/camp_types" class="addbutton add-big">Tábor típusok</a>
|
||||
<a href="/admin/camp_shirt_type" class="addbutton add-big">Pólók</a>
|
||||
<a href="/admin/camp_details" class="addbutton add-big">Turnus lista</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user