mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
Cleaning up xhtml markup. Code now validates for xhtml 1.0 transitional.
This commit is contained in:
parent
7541b03f28
commit
af25f45e1a
21 changed files with 224 additions and 135 deletions
|
@ -54,27 +54,25 @@ class data_field_menu extends data_field_base {
|
|||
notify("that is not a valid field id!");
|
||||
exit;
|
||||
}
|
||||
|
||||
$content = '';
|
||||
|
||||
//look for that record and pull it out
|
||||
if ($rid) {
|
||||
$datacontent = get_record('data_content','fieldid',$id,'recordid',$rid);
|
||||
if (isset($datacontent->content)) {
|
||||
$content = $datacontent->content;
|
||||
}else {
|
||||
$content = '';
|
||||
}
|
||||
}
|
||||
|
||||
$str .= '<table><tr><td>';
|
||||
$str = '<div title="'.$field->description.'"><table><tr><td>';
|
||||
/*
|
||||
if ($field->description) {
|
||||
$str .= '<img src="'.$CFG->pixpath.'/help.gif" alt="'.$field->description.'" title="'.$field->description.'"> ';
|
||||
}
|
||||
*/
|
||||
$str .= '<div title="'.$field->description.'">';
|
||||
$str .= get_string('menu','data').': </td><td>';
|
||||
|
||||
$str .= '<select name="field_'.$field->id.' id="field_'.$field->id.'>';
|
||||
$str .= '<select name="field_'.$field->id.'" id="field_'.$field->id.'">';
|
||||
$str .= '<option value="">' . get_string('menuchoose', 'data') . '</option>';
|
||||
|
||||
foreach (explode("\n",$field->param1) as $option) {
|
||||
|
@ -84,8 +82,7 @@ class data_field_menu extends data_field_base {
|
|||
$str.='<option value="'.ltrim(rtrim($option)).'">'.ltrim(rtrim($option)).'</option>';
|
||||
}
|
||||
}
|
||||
$str .= '</div>';
|
||||
$str .= '</select></td></tr></table>';
|
||||
$str .= '</select></td></tr></table></div>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<form name="fieldsubform" action="<?php echo $CFG->wwwroot; ?>/mod/data/fields.php?d=<?php echo ($field->dataid); ?>" method="POST">
|
||||
<form name="fieldsubform" action="<?php echo $CFG->wwwroot; ?>/mod/data/fields.php?d=<?php echo ($field->dataid); ?>" method="post">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td span="2">
|
||||
<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">
|
||||
<input name="sesskey" value="<?php echo sesskey(); ?>" type="hidden" />
|
||||
<?php echo ($this->name()); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><Name><?php echo get_string('fieldname', 'data'); ?>:</td>
|
||||
<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>
|
||||
|
@ -19,13 +19,13 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><?php echo get_string('fieldoptions', 'data'); ?>:</td>
|
||||
<td><textarea style="width:300px; height:150px;" name="param1" id="param1"><?php if($field->param1) {echo $field->param1;} ?></textarea></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> </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';" \>
|
||||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue