diff --git a/course/renderer.php b/course/renderer.php index 2206a5e22b1..8ece043c678 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -176,7 +176,7 @@ class core_course_renderer extends plugin_renderer_base { $formcontent .= html_writer::tag('input', '', array('type' => 'hidden', 'id' => 'course', 'name' => 'course', 'value' => $course->id)); $formcontent .= html_writer::tag('input', '', - array('type' => 'hidden', 'id' => 'jump', 'name' => 'jump', 'value' => '')); + array('type' => 'hidden', 'class' => 'jump', 'name' => 'jump', 'value' => '')); $formcontent .= html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey())); $formcontent .= html_writer::end_tag('div'); @@ -209,9 +209,9 @@ class core_course_renderer extends plugin_renderer_base { $formcontent .= html_writer::start_tag('div', array('class' => 'submitbuttons')); $formcontent .= html_writer::tag('input', '', - array('type' => 'submit', 'name' => 'submitbutton', 'id' => 'submitbutton', 'value' => get_string('add'))); + array('type' => 'submit', 'name' => 'submitbutton', 'class' => 'submitbutton', 'value' => get_string('add'))); $formcontent .= html_writer::tag('input', '', - array('type' => 'submit', 'name' => 'addcancel', 'id' => 'addcancel', 'value' => get_string('cancel'))); + array('type' => 'submit', 'name' => 'addcancel', 'class' => 'addcancel', 'value' => get_string('cancel'))); $formcontent .= html_writer::end_tag('div'); $formcontent .= html_writer::end_tag('form'); diff --git a/course/yui/modchooser/modchooser.js b/course/yui/modchooser/modchooser.js index aea4040b47a..8ade475930e 100644 --- a/course/yui/modchooser/modchooser.js +++ b/course/yui/modchooser/modchooser.js @@ -28,8 +28,6 @@ YUI.add('moodle-course-modchooser', function(Y) { }; this.setup_chooser_dialogue(dialogue, header, params); - this.jumplink = this.container.one('#jump'); - // Initialize existing sections and register for dynamically created sections this.setup_for_section(); M.course.coursebase.register_module(this); diff --git a/lib/yui/chooserdialogue/chooserdialogue.js b/lib/yui/chooserdialogue/chooserdialogue.js index e67af297d4d..9560b3e7880 100644 --- a/lib/yui/chooserdialogue/chooserdialogue.js +++ b/lib/yui/chooserdialogue/chooserdialogue.js @@ -118,7 +118,7 @@ YUI.add('moodle-core-chooserdialogue', function(Y) { }, this); // Hook onto the cancel button to hide the form - thisevent = this.container.one('#addcancel').on('click', this.cancel_popup, this); + thisevent = this.container.one('.addcancel').on('click', this.cancel_popup, this); this.listenevents.push(thisevent); thisevent = bb.one('div.closebutton').on('click', this.cancel_popup, this); this.listenevents.push(thisevent); @@ -128,8 +128,8 @@ YUI.add('moodle-core-chooserdialogue', function(Y) { this.listenevents.push(thisevent); // Add references to various elements we adjust - this.jumplink = this.container.one('#jump'); - this.submitbutton = this.container.one('#submitbutton'); + this.jumplink = this.container.one('.jump'); + this.submitbutton = this.container.one('.submitbutton'); // Disable the submit element until the user makes a selection this.submitbutton.set('disabled', 'true');