fixed edit issue with tournaments

main
hecht 7 years ago
parent 5962016c16
commit 7496531ad8

@ -29,6 +29,8 @@ function persistTournamentChanges($request) {
if ($key == 'id') { if ($key == 'id') {
continue; continue;
} else if ($value == "") {
$changes[] = $key.' = NULL';
} else if ($key == 'name' || $key == 'abbrevation' || $key == 'icon' || $key == 'fruit_type') { } else if ($key == 'name' || $key == 'abbrevation' || $key == 'icon' || $key == 'fruit_type') {
$changes[] = $key.'=\''.$value.'\''; $changes[] = $key.'=\''.$value.'\'';
} else { } else {
@ -61,7 +63,7 @@ function displayTournamentForm($request, $data) {
<tr> <tr>
<td align="left">Name:</td> <td align="left">Name:</td>
<td> <td>
<input type="text" name="name" value=<?php echo $form_data['name']; ?> /> <input type="text" name="name" value="<?php echo $form_data['name']; ?>" />
</td> </td>
</tr> </tr>
<tr> <tr>
@ -105,7 +107,7 @@ function displayTournamentForm($request, $data) {
<td> <td>
<select name="excl_fusion_particip_count"> <select name="excl_fusion_particip_count">
<?php <?php
for ($i = 0; $i < 4; ++$i ) { for ($i = 0; $i < 20; ++$i ) {
$selected = ''; $selected = '';
if ( $form_data['excl_fusion_particip_count'] == $i ) { if ( $form_data['excl_fusion_particip_count'] == $i ) {
$selected = ' selected'; $selected = ' selected';
@ -140,7 +142,7 @@ function displayTournamentForm($request, $data) {
<td>Maximales Level</td> <td>Maximales Level</td>
<td> <td>
<select name="max_level"> <select name="max_level">
<option value="0">-</option> <option value="">-</option>
<?php <?php
for ($i = 1; $i < CHAR_MAX_LEVEL; ++$i ) { for ($i = 1; $i < CHAR_MAX_LEVEL; ++$i ) {
$selected = ''; $selected = '';
@ -189,7 +191,7 @@ function displayTournamentForm($request, $data) {
<td>Fruchttyp</td> <td>Fruchttyp</td>
<td> <td>
<select id="input" name="fruit_type"> <select id="input" name="fruit_type">
<option value="0">-</option> <option value="">-</option>
<?php <?php
$types = array('Logia', 'Paramecia', 'Zoan', 'natur'); $types = array('Logia', 'Paramecia', 'Zoan', 'natur');
foreach ($types as $type) { foreach ($types as $type) {
@ -234,7 +236,7 @@ function displayTournamentForm($request, $data) {
<td>Wochentag</td> <td>Wochentag</td>
<td> <td>
<select id="input" name="day_of_week"> <select id="input" name="day_of_week">
<option value="0">-</option> <option value="">-</option>
<?php <?php
$translation = array('', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'); $translation = array('', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag');
for ($i = 1; $i < count($translation); ++$i) { for ($i = 1; $i < count($translation); ++$i) {
@ -254,7 +256,7 @@ function displayTournamentForm($request, $data) {
<td>Tag des Monats</td> <td>Tag des Monats</td>
<td> <td>
<select id="input" name="day_of_month"> <select id="input" name="day_of_month">
<option value="0">-</option> <option value="">-</option>
<?php <?php
for ($i = 1; $i <= 28; ++$i) { for ($i = 1; $i <= 28; ++$i) {
$selected = ''; $selected = '';

Loading…
Cancel
Save