mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00

This is implemented for most fields but not all. The reason is that there are some fields for which this does not make sense because no entry is a valid entry. The supported fields are: checkbox file latlong menu number picture radio text textarea url The unsupported fields are: date multimenu
58 lines
2.8 KiB
HTML
58 lines
2.8 KiB
HTML
<table width="100%" cellpadding="5">
|
|
<tr>
|
|
<td class="c0"><label for="name">
|
|
<?php echo get_string('fieldname', 'data');?></label></td>
|
|
<td class="c1"><input class="fieldname" type="text" name="name" id="name" value="<?php p($this->field->name); ?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="description">
|
|
<?php echo get_string('fielddescription', 'data');?></label></td>
|
|
<td class="c1">
|
|
<input class="fielddescription" type="text" name="description" id="description" value="<?php p($this->field->description);?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td class="c0"><label for="required"><?php echo get_string('requiredfield', 'data'); ?></label></td>
|
|
<td class="c1"><input class="requiredfield" type="checkbox" name="required" id="required" <?php p($this->field->required?"checked=\"checked\"":""); ?>/></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="param1">
|
|
<?php echo get_string('fieldwidthsingleview', 'data');?></label></td>
|
|
<td class="c1">
|
|
<input class="picturefieldsize" type="text" name="param1" id="param1" value="<?php if (!empty($this->field->param1)) p($this->field->param1); ?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="param2">
|
|
<?php echo get_string('fieldheightsingleview', 'data');?></label></td>
|
|
<td class="c1">
|
|
<input class="picturefieldsize" type="text" name="param2" id="param2" value="<?php if (!empty($this->field->param2)) p($this->field->param2); ?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="param4">
|
|
<?php echo get_string('fieldwidthlistview', 'data');?></label></td>
|
|
<td class="c1"><input class="picturefieldsize" type="text" name="param4" id="param4" value="<?php if (!empty($this->field->param4)) p($this->field->param4); ?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="param5">
|
|
<?php echo get_string('fieldheightlistview', 'data');?></label></td>
|
|
<td class="c1">
|
|
<input class="picturefieldsize" type="text" name="param5" id="param5" value="<?php if (!empty($this->field->param5)) p($this->field->param5); ?>" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="c0"><label for="param3">
|
|
<?php echo get_string('maxsize', 'data'); ?></label></td>
|
|
<td class="c1">
|
|
<?php
|
|
$course = $DB->get_record('course', array('id'=>$this->data->course));
|
|
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes, 0, $this->field->param3);
|
|
echo html_writer::select($choices, 'param3', $this->field->param3, false, array('id'=>'param3'));
|
|
?>
|
|
</td>
|
|
</tr>
|
|
</table>
|