33 lines
1.6 KiB
HTML
Executable File

<form name="fieldsubform" action="<?php echo $CFG->wwwroot; ?>/mod/data/fields.php?d=<?php echo ($field->dataid); ?>" method="post">
<table width="100%">
<tr>
<td colspan="2">
<input type="hidden" name="fid" value="<?php echo ($field->id); ?>" />
<input type="hidden" name="mode" value="<?php if ($newfield) {echo 'add';} else {echo 'update';} ?>" />
<input type="hidden" name="type" value="<?php echo $this->type; ?>" />
<input name="sesskey" value="<?php echo sesskey(); ?>" type="hidden" />
<?php echo ($this->name()); ?>
</td>
</tr>
<tr>
<td><?php echo get_string('fieldname', 'data'); ?>:</td>
<td><input style="width:300px;" type="text" name="name" id="name" value="<?php echo($field->name); ?>" /></td>
</tr>
<tr>
<td><?php echo get_string('fielddescription', 'data'); ?>:</td>
<td><input style="width:300px;" type="text" name="description" id="description" value="<?php echo($field->description); ?>" /></td>
</tr>
<tr>
<td valign="top"><?php echo get_string('fieldoptions', 'data'); ?></td>
<td><textarea style="width:300px; height:150px;" name="param1" id="param1" cols="80" rows="10"><?php if($field->param1) {echo $field->param1;} ?></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" value="<?php if ($newfield) {echo get_string('add');} else {echo get_string('save','data');} ?>" />
<input type="submit" value="<?php echo get_string('cancel'); ?>" onclick="document.fieldsubform.mode.value='void';" />
</td>
</tr>
</table>
</form>