Changeset 38 for Dev/trunk/classes


Ignore:
Timestamp:
07/22/11 17:13:04 (14 years ago)
Author:
fpvanagthoven
Message:

Surveys can be loaded with UID.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/SurveyButton.php

    r36 r38  
    2828    }
    2929
    30     public static function loadSurveyButton() {
     30    /**
     31     *
     32     * @param Survey $surveys An array of surveys
     33     */
     34    public static function loadSurveyButton($surveys) {
    3135        ?>
    32 
    33         <form action="surveycreation.php" method="post">
    34 
    35             <input type="submit" value="Load survey" class="surveyButton bigSurveyButton" />
    36 
     36        <form id="loadForm" action="surveycreation.php" method="post">
     37            <input type="button" onclick="loadSurvey()" value="Load survey" class="surveyButton bigSurveyButton" />
    3738        </form>
    38 
     39        <br/>
     40        <select id="surveysToLoad" size="1000">
     41            <?php
     42            foreach ($surveys as $survey) {
     43                ?><option value='<?php echo $survey->id; ?>'><?php echo $survey->title; ?></option><?php
     44        }
     45            ?>
     46        </select>
    3947        <?php
    4048    }
Note: See TracChangeset for help on using the changeset viewer.