MDL-65069 mod_forum: Pass the class to style the button
authorPeter <peter@moodle.com>
Wed, 27 Mar 2019 07:22:50 +0000 (15:22 +0800)
committerPeter <peter@moodle.com>
Wed, 24 Apr 2019 02:29:30 +0000 (10:29 +0800)
mod/forum/classes/post_form.php

index 5afcea7..b4933cd 100644 (file)
@@ -285,11 +285,13 @@ class mod_forum_post_form extends moodleform {
         if ($stripped) {
             $buttonarray = array();
             $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submit_string);
-            $buttonarray[] = &$mform->createElement('submit', 'advancedadddiscussion',
-                get_string('advanced'));
             $buttonarray[] = &$mform->createElement('button', 'cancelbtn',
                 get_string('cancel', 'core'),
-                ['class' => 'btn-secondary', 'data-toggle' => 'collapse', 'data-target' => "#collapseAddForm"]);
+                // Additional attribs to handle collapsible div
+                ['data-toggle' => 'collapse', 'data-target' => "#collapseAddForm"]);
+            $buttonarray[] = &$mform->createElement('submit', 'advancedadddiscussion',
+                get_string('advanced'), ['customclassoverride'=>'btn-link']);
+
             $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
             $mform->closeHeaderBefore('buttonar');
         } else {