mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
xhtml validation fixes for MDL-8425
This commit is contained in:
parent
9c2498d381
commit
fbe31d22d1
@ -91,7 +91,7 @@
|
||||
/// Start of main box
|
||||
print_simple_box_start('center');
|
||||
|
||||
echo "<center>".$stradminhelpenvironment."</center><br />";
|
||||
echo "<div style=\"text-align:center\">".$stradminhelpenvironment."</div><br />";
|
||||
|
||||
/// Get current Moodle version
|
||||
$current_version = $CFG->release;
|
||||
@ -121,7 +121,7 @@
|
||||
}
|
||||
|
||||
/// Print form and popup menu
|
||||
echo '<div align="center">'.$strmoodleversion.' ';
|
||||
echo '<div style="text-align:center">'.$strmoodleversion.' ';
|
||||
popup_form("$CFG->wwwroot/$CFG->admin/environment.php?version=",
|
||||
$versions, 'selectversion', $version, '');
|
||||
echo '</div>';
|
||||
|
@ -37,18 +37,19 @@
|
||||
/// Print the appropriate form
|
||||
|
||||
if (file_exists($filename)) { // We are in maintenance mode
|
||||
echo '<center>';
|
||||
echo '<div style="margin-left:auto;margin-right:auto">';
|
||||
echo '<form action="maintenance.php" method="post">';
|
||||
echo '<input type="hidden" name="action" value="disable" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<p><input type="submit" value="'.get_string('disable').'" /></p>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
} else { // We are not in maintenance mode
|
||||
$usehtmleditor = can_use_html_editor();
|
||||
|
||||
echo '<center>';
|
||||
echo '<div style="text-align:center;margin-left:auto;margin-right:auto">';
|
||||
echo '<form action="maintenance.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="action" value="enable" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<p><input type="submit" value="'.get_string('enable').'" /></p>';
|
||||
@ -56,8 +57,9 @@
|
||||
echo '<table><tr><td>';
|
||||
print_textarea($usehtmleditor, 20, 50, 600, 400, "text");
|
||||
echo '</td></tr></table>';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
|
||||
if ($usehtmleditor) {
|
||||
use_html_editor();
|
||||
|
@ -1,11 +1,12 @@
|
||||
<form id="assignform" method="post" action="">
|
||||
<div>
|
||||
<input type="hidden" name="previoussearch" value="<?php p($previoussearch) ?>" />
|
||||
<input type="hidden" name="userid" value="<?php p($userid) ?>" />
|
||||
<input type="hidden" name="courseid" value="<?php p($courseid) ?>" />
|
||||
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
|
||||
<input type="hidden" name="contextid" value="<?php p($contextid) ?>" />
|
||||
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
|
||||
<table summary="" align="center" border="0" cellpadding="5" cellspacing="0">
|
||||
<table summary="" style="margin-left:auto;margin-right:auto" border="0" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<label for="removeselect"><?php print_string('existingusers', 'role', count($contextusers)); ?></label>
|
||||
@ -14,6 +15,7 @@
|
||||
onfocus="getElementById('assignform').add.disabled=true;
|
||||
getElementById('assignform').remove.disabled=false;
|
||||
getElementById('assignform').addselect.selectedIndex=-1;">
|
||||
|
||||
<?php
|
||||
foreach ($contextusers as $contextuser) {
|
||||
$fullname = fullname($contextuser, true);
|
||||
@ -25,7 +27,7 @@
|
||||
echo "<option value=\"$contextuser->id\">".$fullname.", ".$contextuser->email.$hidden."</option>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<option/>
|
||||
</select></td>
|
||||
<td valign="top">
|
||||
<br />
|
||||
@ -95,6 +97,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
@ -234,8 +234,8 @@
|
||||
|
||||
/// In the .html file below we loop through these results and exclude any in $contextusers
|
||||
|
||||
echo '<div align="center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
|
||||
echo '<label for="jump">'.$strroletoassign.'</label>: ';
|
||||
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';
|
||||
echo '<label>'.$strroletoassign.'</label>: ';
|
||||
$assignableroles = array('0'=>get_string('listallroles', 'role').'...') + $assignableroles;
|
||||
popup_form("$CFG->wwwroot/$CFG->admin/roles/assign.php?userid=$userid&courseid=$courseid&contextid=$contextid&roleid=",
|
||||
$assignableroles, 'switchrole', $roleid, '');
|
||||
|
@ -36,7 +36,7 @@
|
||||
?>
|
||||
|
||||
<form id="form" method="post" action="backup.php">
|
||||
<table cellpadding="5">
|
||||
<table cellpadding="5" style="text-align:center;margin-left:auto;margin-right:auto">
|
||||
<?php
|
||||
|
||||
if (empty($to)) {
|
||||
@ -208,12 +208,11 @@
|
||||
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<center>
|
||||
<div style="text-align:center;margin-left:auto;margin-right:auto">
|
||||
<input type="hidden" name="to" value="<?php p($to) ?>" />
|
||||
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
||||
<input type="hidden" name="launch" value="execute" />
|
||||
<input type="submit" value="<?php print_string("continue") ?>" />
|
||||
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
|
||||
</center>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -112,9 +112,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
|
||||
<form id="form1" method="post" action="backup.php">
|
||||
<table cellpadding="5">
|
||||
<table cellpadding="5" style="margin-left:auto;margin-right:auto;">
|
||||
<?php
|
||||
//Now, check modules and info and show posibilities
|
||||
if ($allmods = get_records("modules") ) {
|
||||
@ -319,8 +318,8 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
//the temp-directory name and records in backup temp tables
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<center>
|
||||
|
||||
<div style="text-align:center;margin-left:auto;margin-right:auto">
|
||||
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
||||
<input type="hidden" name="to" value="<?php p($to) ?>" />
|
||||
<input type="hidden" name="backup_unique_code" value="<?php p($backup_unique_code); ?>" />
|
||||
@ -328,5 +327,5 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
<input type="hidden" name="launch" value="check" />
|
||||
<input type="submit" value="<?php print_string("continue") ?>" />
|
||||
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
@ -186,8 +186,8 @@ class page_blog extends page_base {
|
||||
$paramstring .= '<input type="hidden" name="'.$key.'" value="'.s($val).'" />';
|
||||
}
|
||||
|
||||
$editformstring = '<form '.$CFG->frametarget.' method="get" action="'.$this->url_get_path().'">'
|
||||
.$paramstring.'<input type="submit" value="'.$editingString.'" /></form>';
|
||||
$editformstring = '<form '.$CFG->frametarget.' method="get" action="'.$this->url_get_path().'"><fieldset class="invisiblefieldset">'
|
||||
.$paramstring.'<input type="submit" value="'.$editingString.'" /></fieldset></form>';
|
||||
}
|
||||
|
||||
return $editformstring;
|
||||
|
@ -228,8 +228,8 @@ if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
|
||||
|
||||
/// Start main column
|
||||
print '<!-- Begin page content -->' . "\n";
|
||||
print '<td width="*">';
|
||||
print '<td>';
|
||||
?>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td height="100%" valign="top">
|
||||
<td valign="top">
|
||||
|
@ -92,7 +92,7 @@
|
||||
|
||||
if (has_capability('moodle/blog:create', $sitecontext)) {
|
||||
//the user's blog is enabled and they are viewing their own blog
|
||||
$addlink = '<div align="center">';
|
||||
$addlink = '<div class="addbloglink">';
|
||||
$addlink .= '<a href="'.$CFG->wwwroot .'/blog/edit.php?action=add'.'">'. get_string('addnewentry', 'blog').'</a>';
|
||||
$addlink .= '</div>';
|
||||
echo $addlink;
|
||||
@ -144,9 +144,9 @@
|
||||
global $USER, $CFG, $COURSE, $ME;
|
||||
|
||||
$template['body'] = format_text($blogEntry->summary, $blogEntry->format);
|
||||
$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
|
||||
//$template['title'] = '<a name="'. $blogEntry->subject .'"></a>';
|
||||
//enclose the title in nolink tags so that moodle formatting doesn't autolink the text
|
||||
$template['title'] .= '<span class="nolink">'.$blogEntry->subject.'</span>';
|
||||
$template['title'] = '<span class="nolink">'.$blogEntry->subject.'</span>';
|
||||
$template['userid'] = $blogEntry->userid;
|
||||
$template['author'] = fullname(get_record('user','id',$blogEntry->userid));
|
||||
$template['lastmod'] = userdate($blogEntry->lastmodified);
|
||||
|
@ -220,7 +220,7 @@
|
||||
if ($firstentry) {
|
||||
echo '<table align="center" border="0" cellspacing="2" cellpadding="4" class="generalbox">';
|
||||
echo '<tr><th scope="col">'.get_string('subcategories').'</th></tr>';
|
||||
echo '<tr><td nowrap="nowrap">';
|
||||
echo '<tr><td style="white-space: nowrap">';
|
||||
$firstentry = false;
|
||||
}
|
||||
$catlinkcss = $subcategory->visible ? "" : " class=\"dimmed\" ";
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
|
||||
if ($teachers = get_course_teachers($course->id)) {
|
||||
echo "<table align=\"center\"><tr><td nowrap=\"nowrap\">";
|
||||
echo "<table align=\"center\"><tr><td style=\"white-space: nowrap\">";
|
||||
echo "<p><font size=\"1\">\n";
|
||||
foreach ($teachers as $teacher) {
|
||||
if ($teacher->authority > 0) {
|
||||
|
@ -114,7 +114,7 @@ function print_outline_row($mod, $instance, $result) {
|
||||
echo "<td> </td>";
|
||||
if (isset($result->time)) {
|
||||
$timeago = format_time(time() - $result->time);
|
||||
echo "<td valign=\"top\" nowrap=\"nowrap\">".userdate($result->time)." ($timeago)</td>";
|
||||
echo "<td valign=\"top\" style=\"white-space: nowrap\">".userdate($result->time)." ($timeago)</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ function print_outline_row($mod, $instance, $result) {
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td valign=\"top\">$image</td>";
|
||||
echo "<td valign=\"top\" width=\"300\">";
|
||||
echo "<td valign=\"top\" style=\"width:300\">";
|
||||
echo " <a title=\"$mod->modfullname\"";
|
||||
echo " href=\"../mod/$mod->modname/view.php?id=$mod->id\">".format_string($instance->name,true)."</a></td>";
|
||||
echo "<td> </td>";
|
||||
@ -273,13 +273,13 @@ function print_outline_row($mod, $instance, $result) {
|
||||
if (isset($result->info)) {
|
||||
echo "$result->info";
|
||||
} else {
|
||||
echo "<p align=\"center\">-</p>";
|
||||
echo "<p style=\"text-align:center\">-</p>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
if (!empty($result->time)) {
|
||||
$timeago = format_time(time() - $result->time);
|
||||
echo "<td valign=\"top\" nowrap=\"nowrap\">".userdate($result->time)." ($timeago)</td>";
|
||||
echo "<td valign=\"top\" style=\"white-space: nowrap\">".userdate($result->time)." ($timeago)</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
|
@ -1546,7 +1546,7 @@ class admin_setting_configtime extends admin_setting {
|
||||
$return .= '<option value="' . $key . '"' . ($key == $currentsetting['m'] ? ' selected="selected"' : '') . '>' . $value . '</option>';
|
||||
}
|
||||
$return .= '</select></div>';
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description);
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1712,7 +1712,7 @@ class admin_setting_courselist_frontpage extends admin_setting_configselect {
|
||||
}
|
||||
$return .= '</div>';
|
||||
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description);
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ class admin_setting_special_frontpagedesc extends admin_setting {
|
||||
|
||||
$return = print_textarea($CFG->adminusehtmleditor, 15, 60, 0, 0, 's_' . $this->name, $currentsetting, 0, true);
|
||||
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description);
|
||||
return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false);
|
||||
}
|
||||
|
||||
function get_setting() {
|
||||
@ -2760,16 +2760,26 @@ function apply_default_exception_settings($defaults) {
|
||||
|
||||
}
|
||||
|
||||
function format_admin_setting($name, $title='', $form='', $description='') {
|
||||
return "\n".
|
||||
function format_admin_setting($name, $title='', $form='', $description='', $label=true) {
|
||||
|
||||
// sometimes the id is not id_s_name, but id_s_name_m or something, and this does not validate
|
||||
if ($label) {
|
||||
$labelfor = 'for = "id_s_'.$name.'"';
|
||||
} else {
|
||||
$labelfor = '';
|
||||
}
|
||||
|
||||
$str = "\n".
|
||||
'<div class="form-item" id="admin-'.$name.'">'."\n".
|
||||
'<label for="id_s_'.$name.'">'.$title."\n".
|
||||
'<label '.$labelfor.'>'.$title."\n".
|
||||
' <span class="form-shortname">'.$name.'</span>'."\n".
|
||||
'</label>'."\n".
|
||||
$form."\n".
|
||||
'<div class="description">'.$description.'</div>'."\n".
|
||||
'</div>'.
|
||||
"\n\n";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -809,7 +809,7 @@ function print_checkbox ($name, $value, $checked = true, $label = '', $alt = '',
|
||||
|
||||
$htmlid = 'auto-cb'.sprintf('%04d', ++$idcounter);
|
||||
$output = '<span class="checkbox '.$name."\">";
|
||||
$output .= '<input name="'.$name.'" id="'.$htmlid.'" type="checkbox" value="'.$value.'" alt="'.$alt.'"'.$strchecked.' '.((!empty($script)) ? ' onClick="'.$script.'" ' : '').' />';
|
||||
$output .= '<input name="'.$name.'" id="'.$htmlid.'" type="checkbox" value="'.$value.'" alt="'.$alt.'"'.$strchecked.' '.((!empty($script)) ? ' onclick="'.$script.'" ' : '').' />';
|
||||
if(!empty($label)) {
|
||||
$output .= ' <label for="'.$htmlid.'">'.$label.'</label>';
|
||||
}
|
||||
@ -4872,10 +4872,10 @@ function redirect($url, $message='', $delay=-1) {
|
||||
print_header('', '', '', '', '<meta http-equiv="refresh" content="'. $delay .'; url='. $encodedurl .'" />');
|
||||
$delay += 3; // double redirect prevention, it was sometimes breaking upgrades before 1.7
|
||||
}
|
||||
echo '<center>';
|
||||
echo '<div style="text-align:center">';
|
||||
echo '<p>'. $message .'</p>';
|
||||
echo '<p>( <a href="'. $encodedurl .'">'. get_string('continue') .'</a> )</p>';
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
// it might be better not to set timeout the same for both types of redirect, so that we can be sure which one wins
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
@ -141,7 +141,7 @@
|
||||
|
||||
|
||||
if ($chat->chattime and $chat->schedule) { // A chat is scheduled
|
||||
echo "<p align=\"center\">$strnextsession: ".userdate($chat->chattime).' ('.usertimezone($USER->timezone).')</p>';
|
||||
echo "<p class=\"nextchatsession\">$strnextsession: ".userdate($chat->chattime).' ('.usertimezone($USER->timezone).')</p>';
|
||||
} else {
|
||||
echo '<br />';
|
||||
}
|
||||
@ -162,7 +162,7 @@
|
||||
echo '<tr><td width="35">';
|
||||
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$chatuser->id&course=$chat->course\">";
|
||||
print_user_picture($chatuser->id, 0, $chatuser->picture, false, false, false);
|
||||
echo '</a></td><td valign="center">';
|
||||
echo '</a></td><td style="vertical-align: middle">';
|
||||
echo '<p><font size="1">';
|
||||
echo fullname($chatuser).'<br />';
|
||||
echo "<font color=\"#888888\">$stridle: ".format_time($lastping)."</font>";
|
||||
|
@ -1061,6 +1061,9 @@ a.skip-block, .skip-block {
|
||||
/***
|
||||
*** Blogs
|
||||
***/
|
||||
.addbloglink {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.blogpost .audience {
|
||||
text-align: right;
|
||||
@ -2333,6 +2336,10 @@ body#user-index .rolesform {
|
||||
*** Modules: Chat
|
||||
***/
|
||||
|
||||
.nextchatsession {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#mod-chat-gui_header_js-jsupdate {
|
||||
margin:10px
|
||||
}
|
||||
@ -2990,6 +2997,10 @@ body#question-preview .quemodname, body#question-preview .controls {
|
||||
width:50%;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.whitecell {
|
||||
background-color:white;
|
||||
}
|
||||
/***
|
||||
*** Modules: Wiki
|
||||
***/
|
||||
|
Loading…
x
Reference in New Issue
Block a user