#5 begin edit shifts feature, simplified needed angels

main
Philip Häusler 13 years ago
parent 403c11047b
commit b47b6ed7e4

@ -33,10 +33,10 @@ function user_shifts() {
$room_array[$room['RID']] = $room['Name']; $room_array[$room['RID']] = $room['Name'];
// Engeltypen laden // Engeltypen laden
$types = sql_select("SELECT * FROM `AngelTypes` ORDER BY `Name`"); $types = sql_select("SELECT * FROM `NeededAngelTypes` JOIN `AngelTypes` ON (`NeededAngelTypes`.`angel_type_id` = `AngelTypes`.`TID`) WHERE `shift_id`=".sql_escape($shift_id)." ORDER BY `AngelTypes`.`Name`");
$needed_angel_types = array (); $needed_angel_types = array ();
foreach ($types as $type) foreach ($types as $type)
$needed_angel_types[$type['TID']] = 0; $needed_angel_types[$type['TID']] = $type['count'];
$name = $shift['name']; $name = $shift['name'];
$rid = $shift['RID']; $rid = $shift['RID'];
@ -58,8 +58,6 @@ function user_shifts() {
'room_select' => $room_select, 'room_select' => $room_select,
'start' => date("Y-m-d H:i", $start), 'start' => date("Y-m-d H:i", $start),
'end' => date("Y-m-d H:i", $end), 'end' => date("Y-m-d H:i", $end),
'angelmode_location_selected' => $_REQUEST['angelmode'] == 'location' ? 'checked="checked"' : '',
'angelmode_manually_selected' => $_REQUEST['angelmode'] == 'manually' ? 'checked="checked"' : '',
'angel_types' => $angel_types 'angel_types' => $angel_types
)); ));
} }

@ -26,20 +26,10 @@
Ende: Ende:
</label> </label>
<input type="text" name="end" value="%end%" /> <input type="text" name="end" value="%end%" />
</p> </p><h2>Benötigte Engel:</h2>
<h2>Benötigte Engel:</h2> %angel_types%
<p>
<label>
<input type="radio" name="angelmode" value="location" %angelmode_location_selected%/>
</label>Benötigte Engel vom Ort übernehmen.
</p>
<p>
<label>
<input type="radio" name="angelmode" id="manual_angelmode" value="manually" %angelmode_manually_selected%/>
</label>Es werden folgende Engel benötigt:
</p>%angel_types%
<p> <p>
<input type="submit" name="submit" value="Speichern" /> <input type="submit" name="submit" value="Speichern" />
</p> </p>
</fieldset> </fieldset>
</form> </form>
Loading…
Cancel
Save