moodle/mod/survey/edit_form.phtml
2001-11-22 06:23:56 +00:00

70 lines
2.4 KiB
PHTML

<table align=center cellpadding=20> <tr> <td bgcolor=#f0f0f0>
<form name="form" method="post" action="edit.php">
<table cellpadding=5>
<tr valign=top>
<td><P><FONT SIZE=-3>(Click on the links below<BR>for help on each field)</FONT></P></td>
<td>&nbsp;</td>
</tr>
<tr valign=top>
<td><P>Survey type:</td>
<td><? print get_template_name($survey->template) ?>
<input type="hidden" name=template value="<? pv($survey->template) ?>">
</td>
</tr>
<tr valign=top>
<td><P><? link_to_popup_window("/mod/survey/docs/name.phtml", "info", "Survey name") ?>:</td>
<td><input type="text" name="name" size=40 value="<? pv($survey->name) ?>">
<? formerr($err["name"]) ?>
</td>
</tr>
<tr valign=top>
<td><P><? link_to_popup_window("/mod/survey/docs/password.phtml", "info", "Password") ?>:</td>
<td><input type="text" name="password" size=20 value="<? pv($survey->password) ?>">
<? formerr($err["password"]) ?>
</td>
</tr>
<tr valign=top>
<td><P><? link_to_popup_window("/mod/survey/docs/days.phtml", "info", "Available Days") ?>:</td>
<td><input type="text" name="days" size=3 value="<? pv($survey->days) ?>">
<? formerr($err["days"]) ?>
</td>
</tr>
<tr valign=top>
<td><P><? link_to_popup_window("/mod/survey/docs/url.phtml", "info", "Course URL") ?>:</td>
<td><input type="text" name="url" size=50 value="<? pv($survey->url) ?>">
<? formerr($err["url"]) ?>
</td>
</tr>
<tr valign=top>
<td><P><? link_to_popup_window("/mod/survey/docs/intro.phtml", "info", "Introduction") ?>:</td>
<td><textarea name=intro rows=15 cols=50 wrap=hard><? pv($survey->intro) ?></textarea>
</td>
</tr>
<tr>
<td></td>
<td>
<table><tr><td valign=top>
<input type="hidden" name=id value="<? pv($survey->id) ?>">
<input type="hidden" name=edit value="update">
<? if ($survey->status == "editing") { ?>
<input type="submit" value="Save changes">
<? } ?>
</FORM>
<td valign=top>
<? if (get_responses_for_survey($survey->id) == 0) { ?>
<FORM name="delete" method="post" action="edit.php">
<input type="hidden" name=id value="<? pv($survey->id) ?>">
<input type="hidden" name=edit value="delete">
<input type="submit" value="Delete this survey">
</FORM>
<? } ?>
<td valign=top>
<FORM name="cancel" method="post" action="edit.php">
<input type="submit" value="Cancel">
</FORM>
</td></tr></table>
</table>
</td></tr></table>