diff options
author | Philip Häusler <msquare@notrademark.de> | 2011-10-11 18:35:29 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2011-10-11 18:35:29 +0200 |
commit | b47b6ed7e421ae91c5dc7607d874479bfc0e9e4a (patch) | |
tree | bc1c1ce7f9570e485a8873f1624e9c6e7948b923 | |
parent | 403c11047bf234c415b0aa7462d14bc758eedc04 (diff) |
#5 begin edit shifts feature, simplified needed angels
-rw-r--r-- | includes/pages/user_shifts.php | 6 | ||||
-rw-r--r-- | templates/user_shifts_edit.html | 16 |
2 files changed, 5 insertions, 17 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 4ebf6254..d0754d8b 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -33,10 +33,10 @@ function user_shifts() { $room_array[$room['RID']] = $room['Name']; // 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 (); foreach ($types as $type) - $needed_angel_types[$type['TID']] = 0; + $needed_angel_types[$type['TID']] = $type['count']; $name = $shift['name']; $rid = $shift['RID']; @@ -58,8 +58,6 @@ function user_shifts() { 'room_select' => $room_select, 'start' => date("Y-m-d H:i", $start), '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 )); } diff --git a/templates/user_shifts_edit.html b/templates/user_shifts_edit.html index 705ceffe..f129e5e4 100644 --- a/templates/user_shifts_edit.html +++ b/templates/user_shifts_edit.html @@ -26,20 +26,10 @@ Ende: </label> <input type="text" name="end" value="%end%" /> - </p> - <h2>Benötigte Engel:</h2> - <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><h2>Benötigte Engel:</h2> + %angel_types% <p> <input type="submit" name="submit" value="Speichern" /> </p> </fieldset> -</form> +</form>
\ No newline at end of file |