From c7225fe291e579aa8f1fe2d54e310125673403a1 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 3 Jan 2007 20:35:09 +0000 Subject: [PATCH] MDL-8062 chat, login page and messaging - removed name attribute from some
s and fixed focus; changed set_focus() JS to accept element ID == the $focus parameter in print_header() + other minor Strict XHTML fixes --- lib/javascript.php | 10 ++++++---- login/index.php | 4 ++-- login/index_form.html | 20 ++++++++++++-------- message/discussion.php | 20 +++++++------------- mod/chat/gui_basic/index.php | 12 ++++++------ 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/javascript.php b/lib/javascript.php index 40a9547996..bff9eea606 100644 --- a/lib/javascript.php +++ b/lib/javascript.php @@ -73,12 +73,14 @@ function inserttext(text) { } +} ?> //]]> diff --git a/login/index.php b/login/index.php index 70ec4c9e80..d4cd256401 100644 --- a/login/index.php +++ b/login/index.php @@ -256,9 +256,9 @@ } if (!empty($frm->username)) { - $focus = "login.password"; + $focus = "password"; } else { - $focus = "login.username"; + $focus = "username"; } if (isset($CFG->auth_instructions)) { diff --git a/login/index_form.html b/login/index_form.html index 8ba140e388..e7fefb0b72 100644 --- a/login/index_form.html +++ b/login/index_form.html @@ -22,7 +22,7 @@ } ?>

- + @@ -40,7 +40,7 @@
@@ -32,7 +32,7 @@ - " /> +
- " /> +
@@ -56,11 +56,13 @@ guestloginbutton) { ?>

:

- + +
" /> +
@@ -70,9 +72,11 @@ ?>

-
+ +
+
@@ -83,8 +87,8 @@ print_string("loginsteps", "", "signup.php"); ?>
-
- " /> + +
" />
auth_user_create) and function_exists('auth_user_create') ){ ?>
-
+ " />
diff --git a/message/discussion.php b/message/discussion.php index 3c7bc06257..d64a36f170 100644 --- a/message/discussion.php +++ b/message/discussion.php @@ -120,7 +120,7 @@ $userfullname = fullname($user); $mefullname = fullname($USER); - print_header(get_string('discussion', 'message').': '.fullname($user)); + print_header(get_string('discussion', 'message').': '.fullname($user), '', '', 'edit-message'); echo '
'; echo '
'; echo print_user_picture($user->id, SITEID, $user->picture, 48, true, true, 'userwindow'); @@ -155,12 +155,7 @@ echo '
'; // class="userinfo" echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; $usehtmleditor = (can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0)); echo '

'; @@ -174,6 +169,11 @@ echo ''; } echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; echo ' '; echo ''; echo ''; @@ -207,8 +207,6 @@ } $printmessage = format_text($message->message, $message->format, $options, 0); - $printmessage = str_replace("\r", ' ', $printmessage); - $printmessage = str_replace("\n", ' ', $printmessage); $printmessage = '
'.$fullname.' '. '['.$time.']: '. ''.$printmessage.'
'; @@ -227,8 +225,6 @@ $time = userdate($message->timecreated, get_string('strftimedaytime')); $printmessage = format_text($message->message, $message->format, $options, 0); - $printmessage = str_replace("\r", ' ', $printmessage); - $printmessage = str_replace("\n", ' ', $printmessage); $printmessage = '
'.$mefullname.' '. '['.$time.']: '. ''.$printmessage.'
'; @@ -247,8 +243,6 @@ $time = userdate($message->timecreated, get_string('strftimedaytime')); $printmessage = format_text($message->message, $message->format, $options, 0); - $printmessage = str_replace("\r", ' ', $printmessage); - $printmessage = str_replace("\n", ' ', $printmessage); $printmessage = '
'.$userfullname.' '. '['.$time.']: '. ''.$printmessage.'
'; diff --git a/mod/chat/gui_basic/index.php b/mod/chat/gui_basic/index.php index e72aaacfbc..89210c8e60 100644 --- a/mod/chat/gui_basic/index.php +++ b/mod/chat/gui_basic/index.php @@ -95,7 +95,7 @@ } - print_header("$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname"); + print_header("$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname", '', '', 'message'); echo '
'; echo '

'.get_string('participants').'

'; @@ -115,17 +115,17 @@ } echo '
'; echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; $usehtmleditor = can_use_html_editor(); echo '

'; echo '
'; echo ''; echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; echo ' '; echo ''; echo ''; -- 2.39.5