jump to presence; bigger checkbox; actual balance

This commit is contained in:
Tóth Richárd
2018-09-16 13:06:12 +02:00
parent edd39eeae3
commit 1db830ca71
9 changed files with 300 additions and 242 deletions

View File

@@ -201,6 +201,8 @@ class training {
}
}
return $new_tr_id;
}
public static function update_training($_training_value_array, $_tr_id) {

View File

@@ -42,6 +42,18 @@ div.list div.money_deposit {
color: #002E4C;
}
div.list div.actual_balance {
background-color: #020372;
border-left: 2px solid #FD9500;
color: white;
}
div.list div.actual_balance:hover {
background-color: #020372;
border-left: 2px solid #FD9500;
color: white;
}
.list_item.training {
background-color: #a1ffff;
border-left: 2px solid #0a40ff;

View File

@@ -90,12 +90,12 @@ input[type=email]:hover {
.coach {
float: left;
margin: 3px 10px 0px 0px;
margin: 10px 10px 0px 0px;
}
.coach_type {
margin: 3px 0px 0px 0px;
transform: scale(2);
margin: 10px 20px;
}
.coach_type_text {
@@ -136,6 +136,16 @@ input[type=email]:hover {
.form_wrapper {
width: 70%;
}
.coach_type {
transform: none;
margin: 0;
}
.coach {
float: left;
margin: 3px 10px 0px 0px;
}
}
@media (min-width: 601px) {
@@ -146,3 +156,6 @@ input[type=email]:hover {
float: left;
}
}
@media (min-width: 680px) {
}

View File

@@ -48,7 +48,7 @@ switch ($this->get_id()) {
$training_type_assoc_array = $sql->assoc_array($training_type_query);
$smarty->assign("training_type_assoc_array", $training_type_assoc_array);
//COACH ARRAY
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0;";
$coach_data_query = "SELECT * FROM user_coach WHERE ua_deleted = 0 AND ua_name != 'Tóth Richárd';";
$coach_data_assoc_array = $sql->assoc_array($coach_data_query);

View File

@@ -164,9 +164,17 @@ if (isset($_POST['action'])) {
unset($_POST['action']);
$every_week = isset($_POST['every_week']);
$jumpTo = $_POST['jumpTo'];
unset($_POST['jumpTo']);
if ($every_week) unset($_POST['every_week']);
training::create_training($_POST, $every_week);
$tr_id = training::create_training($_POST, $every_week);
if (!$jumpTo) {
header("Location: /admin/trainings/");
}
else {
header("Location: /admin/presence/".$tr_id);
}
break;

View File

@@ -1,6 +1,7 @@
<div class="form_wrapper">
<form method="post">
<form method="post" id="training-create">
<input type="hidden" name="action" id="action" value="training_data_create">
<input type="hidden" name="jumpTo" id="jumpTo" value="0">
<div>
@@ -46,8 +47,8 @@
<table>
<tr>
<td class="bold">Név</td>
<td class="bold">E</td>
<td class="bold">SE</td>
<td class="bold center">E</td>
<td class="bold center">SE</td>
</tr>
{foreach $coach_array as $coach}
<tr>
@@ -61,8 +62,20 @@
<div>
<div>
<input class="button black" type="submit" value="Létrehozás">
<input class="button black save" type="submit" value="Létrehozás">
<input class="button black jump-to" type="button" value="Létrehozás és ugrás a jelenléthez">
</div>
</div>
</form>
</div>
<script type="text/javascript">
$('.jump-to').click(function () {
$('#jumpTo').val(1);
if ($('#tr_date').val().length && $('#tr_training_type_trt_id').val() != 'null' && $('#tr_duration').val().length) {
//$('#training-create').submit();
$('.save').trigger('click');
}
});
</script>

View File

@@ -42,8 +42,8 @@
<table>
<tr>
<td class="bold">Név</td>
<td class="bold">E</td>
<td class="bold">SE</td>
<td class="bold center">E</td>
<td class="bold center">SE</td>
</tr>
{foreach $coach_array as $coach}
<tr>

View File

@@ -102,6 +102,30 @@
<div><input type="text" name="uk_facebook" id="uk_facebook"></div>
</div>
<div>
<label class="desc" for="uk_shirt_size_ss_id">Pólóméret:</label>
<div>
<select name="uk_shirt_size_ss_id" id="uk_shirt_size_ss_id">
<option value="null"> - </option>
{foreach $shirt_size_assoc_array as $shirt_size_array}
<option value="{$shirt_size_array.shirt_id}">
{$shirt_size_array.shirt_name}
</option>
{/foreach}
</select>
</div>
</div>
<div>
<label class="desc" for="uk_shirt_note">Póló megjegyzés:</label>
<div><input type="text" name="uk_shirt_note" id="uk_shirt_note"></div>
</div>
<div>
<label class="desc" for="uk_balance_transfer">Áthozat (Ft):</label>
<div><input type="text" name="uk_balance_transfer" id="uk_balance_transfer"></div>
</div>
<div>
<label class="desc" for="uk_school_sc_id">Iskola neve:</label>
<div>
@@ -162,30 +186,6 @@
<div><input type="text" name="uk_official_age_category" id="uk_official_age_category"></div>
</div>
<div>
<label class="desc" for="uk_shirt_size_ss_id">Pólóméret:</label>
<div>
<select name="uk_shirt_size_ss_id" id="uk_shirt_size_ss_id">
<option value="null"> - </option>
{foreach $shirt_size_assoc_array as $shirt_size_array}
<option value="{$shirt_size_array.shirt_id}">
{$shirt_size_array.shirt_name}
</option>
{/foreach}
</select>
</div>
</div>
<div>
<label class="desc" for="uk_shirt_note">Póló megjegyzés:</label>
<div><input type="text" name="uk_shirt_note" id="uk_shirt_note"></div>
</div>
<div>
<label class="desc" for="uk_balance_transfer">Áthozat (Ft):</label>
<div><input type="text" name="uk_balance_transfer" id="uk_balance_transfer"></div>
</div>
<div>
<label class="desc" for="uk_parent_1">Szülő:</label>
<div>

View File

@@ -10,6 +10,16 @@
{foreach $actions as $action}
{if $action@first}
<div style="margin-bottom: 30px;">
<div class="list_item line_height14 bigger_space actual_balance">
<span class="size20 bold">
Aktuális egyenleg: {$action->get_de_balance()|number_format:0:'':' '} Ft
</span>
</div>
</div>
{/if}
{if $action->get_de_training()|is_a:'training'}
{if !$action@first &&