multiple training coach hotfix

This commit is contained in:
Ricsi
2017-01-05 09:13:02 +01:00
parent 9c7f678e74
commit ebced881c6
2 changed files with 16 additions and 16 deletions

View File

@@ -170,11 +170,11 @@ class training {
unset($_training_value_array['helpers']); unset($_training_value_array['helpers']);
} }
$new_tr_id = $sql->insert_into('training', $_training_value_array); $new_tr_id = $sql->insert_into('training', $_training_value_array);
log::register('new_training', $new_tr_id);
if (isset($coaches)) { if (isset($coaches)) {
foreach ($coaches as $coach_id) { foreach ($coaches as $coach_id) {
# beilleszt minden edzőt ehhez az edzéshez # beilleszt minden edzőt ehhez az edzéshez
$new_tr_id = $sql->insert_into('training_coach', array('trc_training_tr_id' => $new_tr_id, 'trc_coach_uc_id' => $coach_id)); $new_trc_id = $sql->insert_into('training_coach', array('trc_training_tr_id' => $new_tr_id, 'trc_coach_uc_id' => $coach_id));
log::register('new_training', $new_tr_id);
} }
} }
if (isset($helpers)) { if (isset($helpers)) {

View File

@@ -37,20 +37,20 @@
<div> <div>
<label class="desc" id="title1" for="coaches">Edző(k):</label> <label class="desc" id="title1" for="coaches">Edző(k):</label>
{foreach $coach_array as $coach} <table>
<tr>
<div> <td class="bold">Név</td>
<span class="coach">{$coach->get_ua_name()}</span> <td class="bold">E</td>
<div> <td class="bold">SE</td>
<input type="checkbox" name="coaches[]" value="{$coach->get_ua_id()}" class="coach_type"> </tr>
<span class="coach_type_text">e.</span> {foreach $coach_array as $coach}
<input type="checkbox" name="helpers[]" value="{$coach->get_ua_id()}" class="coach_type"> <tr>
<span class="coach_type_text">se.</span> <td class="coach">{$coach->get_ua_name()}</td>
</div> <td><input type="checkbox" name="coaches[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
<td><input type="checkbox" name="helpers[]" value="{$coach->get_ua_id()}" class="coach_type"></td>
</div> </tr>
{/foreach}
{/foreach} </table>
</div> </div>
<div> <div>