diff options
author | MaZderMind | 2015-03-31 07:00:10 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 07:00:10 +0200 |
commit | e0b4c5605344633be01884f8cf69aa0634bec0d8 (patch) | |
tree | 7f02ea661fe48ef6e0826291434d7f5a9af2989a | |
parent | e7e4b690cd094a337d10a514f79b224fdaac0a39 (diff) |
Implement Feedback-Form based on MVT Pattern
Diffstat (limited to '')
-rw-r--r-- | template/assemblies/feedback.phtml | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/template/assemblies/feedback.phtml b/template/assemblies/feedback.phtml index 80df984..246bc69 100644 --- a/template/assemblies/feedback.phtml +++ b/template/assemblies/feedback.phtml @@ -52,12 +52,21 @@ <label for="stream">Stream</label> <select class="form-control" name="stream" id="stream"> <option></option> - <? foreach(get('ROOMS') as $roomSlug => $roomInfo): ?> - <? if(!has("ROOMS.$roomSlug.FEEDBACK")) continue ?> - <? foreach(room_get_possible_selections($roomSlug) as $selectionIter): ?> + <? foreach(Room::rooms() as $roomiter): ?> + <? if(!$room->hasFeedback()) continue ?> + <? foreach($roomiter->getSelections() as $selection): ?> <option - <? if($roomSlug == $room && $selectionIter == @$selection): ?>selected<? endif ?> - value="<?=h("$roomSlug-$selectionIter")?>"><?=h(get("ROOMS.$roomSlug.DISPLAY", $roomSlug))?> – <?=h($selectionIter)?></option> + <? if( + $roomiter->getSlug() == $room->getSlug() && + ( + !isset($stream) || + ($selection->getSelection() == $stream->getSelection()) + ) + ): ?>selected<? endif ?> + value="<?=h($roomiter->getSlug().'-'.$selection->getSelection())?>" + > + <?=h($roomiter->getDisplay())?> – <?=h($selection->getDisplay())?> + </option> <? endforeach ?> <? endforeach ?> </select> |