From 74e01e62815889f87b1e5fab883201d548fe136e Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Fri, 24 Nov 2006 16:38:22 +0000 Subject: [PATCH] changed name of submit buttons to submitbutton instead of sumbit as submit was conflicting with method form.submit() --- mod/assignment/type/online/assignment.class.php | 2 +- mod/chat/mod_form.php | 2 +- mod/choice/mod_form.php | 8 ++++---- mod/data/mod_form.php | 2 +- mod/forum/mod_form.php | 2 +- mod/forum/post_form.php | 4 ++-- mod/glossary/comment_form.php | 2 +- mod/glossary/mod_form.php | 2 +- mod/journal/mod_form.php | 2 +- mod/label/mod_form.php | 2 +- mod/lesson/mod_form.php | 2 +- mod/survey/details.php | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mod/assignment/type/online/assignment.class.php b/mod/assignment/type/online/assignment.class.php index 6d88b3d2a0..b68e9e71f5 100644 --- a/mod/assignment/type/online/assignment.class.php +++ b/mod/assignment/type/online/assignment.class.php @@ -252,7 +252,7 @@ class assignment_online_edit_form extends moodleform { $mform->setType('id', PARAM_INT); // buttons - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('reset', 'reset', get_string('revert')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); } diff --git a/mod/chat/mod_form.php b/mod/chat/mod_form.php index 589cc6f409..da122ec34a 100644 --- a/mod/chat/mod_form.php +++ b/mod/chat/mod_form.php @@ -53,7 +53,7 @@ class chat_mod_form extends moodleform_mod { $this->standard_coursemodule_elements(); $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/choice/mod_form.php b/mod/choice/mod_form.php index 25d067d1a3..ea6260874e 100644 --- a/mod/choice/mod_form.php +++ b/mod/choice/mod_form.php @@ -30,9 +30,9 @@ class choice_mod_form extends moodleform_mod { if ($this->_instance){ $repeatno=count_records('choice_options', 'choiceid', $this->_instance); - $repeatno+=2; + $repeatno += 2; } else { - $repeatno=10; + $repeatno = 5; } $this->repeat_elements($repeatarray, $repeatno, @@ -43,7 +43,7 @@ class choice_mod_form extends moodleform_mod { 'option' => array('type'=>PARAM_TEXT, 'helpbutton'=>array('options', get_string('modulenameplural', 'choice'), 'choice')), 'optionid' => array('type'=>PARAM_INT)), - 'option_repeats', 'option_add_fields'); + 'option_repeats', 'option_add_fields', 3); @@ -84,7 +84,7 @@ class choice_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/data/mod_form.php b/mod/data/mod_form.php index 109fd867b4..e77ca0a1d4 100644 --- a/mod/data/mod_form.php +++ b/mod/data/mod_form.php @@ -75,7 +75,7 @@ class data_mod_form extends moodleform_mod { $this->standard_coursemodule_elements(); $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/forum/mod_form.php b/mod/forum/mod_form.php index 682e150041..424e6ad11e 100644 --- a/mod/forum/mod_form.php +++ b/mod/forum/mod_form.php @@ -127,7 +127,7 @@ class forum_mod_form extends moodleform_mod { $this->standard_coursemodule_elements(); $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index 1cfe754106..37a81eccc6 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -57,7 +57,7 @@ class forum_post_form extends moodleform { if ($forum->maxbytes != 1 && has_capability('mod/forum:createattachment', $modcontext)) { // 1 = No attachments at all $mform->addElement('file', 'attachment', get_string('attachment', 'forum')); $mform->setHelpButton('attachment', array('attachment', get_string('attachemnt', 'forum'), 'forum')); - + } if (empty($post->id) && has_capability('moodle/course:manageactivities', $coursecontext)) { @@ -97,7 +97,7 @@ class forum_post_form extends moodleform { } else { $submit_string = get_string('posttoforum', 'forum'); } - $mform->addElement('submit', 'submit', $submit_string); + $mform->addElement('submit', 'submitbutton', $submit_string); $renderer->addStopFieldsetElements('submit'); $mform->addElement('hidden', 'course'); diff --git a/mod/glossary/comment_form.php b/mod/glossary/comment_form.php index 30171e6d0f..0a0480d040 100644 --- a/mod/glossary/comment_form.php +++ b/mod/glossary/comment_form.php @@ -25,7 +25,7 @@ class glossary_comment_form extends moodleform { $mform->setType('action', PARAM_ACTION); // buttons - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('reset', 'reset', get_string('revert')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); } diff --git a/mod/glossary/mod_form.php b/mod/glossary/mod_form.php index d34e9c8a88..e61313615b 100644 --- a/mod/glossary/mod_form.php +++ b/mod/glossary/mod_form.php @@ -147,7 +147,7 @@ class glossary_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/journal/mod_form.php b/mod/journal/mod_form.php index 37c50cdb98..fed0002922 100644 --- a/mod/journal/mod_form.php +++ b/mod/journal/mod_form.php @@ -47,7 +47,7 @@ class journal_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/label/mod_form.php b/mod/label/mod_form.php index cf62869a0f..b58f938918 100644 --- a/mod/label/mod_form.php +++ b/mod/label/mod_form.php @@ -17,7 +17,7 @@ class label_mod_form extends moodleform_mod { $mform->addElement('modvisible', 'visible', get_string('visible')); $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/lesson/mod_form.php b/mod/lesson/mod_form.php index debd8fa6bd..071a8a1ece 100644 --- a/mod/lesson/mod_form.php +++ b/mod/lesson/mod_form.php @@ -276,7 +276,7 @@ class lesson_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $buttonarray=array(); - $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submit', get_string('savechanges')); + $buttonarray[] = &MoodleQuickForm::createElement('submit', 'submitbutton', get_string('savechanges')); $buttonarray[] = &MoodleQuickForm::createElement('submit', 'cancel', get_string('cancel')); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $renderer->addStopFieldsetElements('buttonar'); diff --git a/mod/survey/details.php b/mod/survey/details.php index 4a2f4c5a8c..379e5c1b82 100644 --- a/mod/survey/details.php +++ b/mod/survey/details.php @@ -31,7 +31,7 @@ $mform->addElement('hidden', 'mode', $lastform->mode); $mform->addElement('hidden', 'visible', $lastform->visible); $mform->addElement('hidden', 'groupmode', $lastform->groupmode); - $mform->addElement('submit', 'submit', get_string("savechanges")); + $mform->addElement('submit', 'submitbutton', get_string("savechanges")); } } -- 2.39.5