Style delete button.
[philipp/winterrodeln/mediawiki_extensions/wrreport.git] / wrreport_body.php
index 43db28768415aca9d66d32d2524e90a006e4e4ee..4e60a3b5ff2821404d66121c8e5e8cdc43a195bf 100644 (file)
@@ -70,8 +70,6 @@
 //             Just include the sledrun(s) if the condition is fulfilled.
 //
 
-use MobileFrontend\MenuBuilder;
-
 
 // Constants
 // ---------
@@ -349,13 +347,11 @@ function wrReportFormRender($hide_save_button = TRUE, $page_title = NULL, $date_
        $tr = $table->appendElement('tr');
        $tr->appendElement('th')->appendText(wfMessage('wrreport-newreport-submit')->text());
        $td = $tr->appendElement('td');
-       $input = $td->appendElement('input', array('name' => 'preview', 'type' => 'submit'));
-       if ($hide_save_button)
-               $input->setAttribute('value', wfMessage('wrreport-newreport-next')->text());
-       else {
-               $input->setAttribute('value', wfMessage('wrreport-newreport-preview')->text());
-
-               $td->appendElement('input', array('name' => 'store', 'type' => 'submit', 'value' => wfMessage('wrreport-newreport-save')->text()));
+       if ($hide_save_button) {
+               $input = $td->appendElement('input', array('name' => 'preview', 'type' => 'submit', 'class' => 'mw-ui-button mw-ui-progressive', 'value' => wfMessage('wrreport-newreport-next')->text()));
+       } else {
+               $input = $td->appendElement('input', array('name' => 'preview', 'type' => 'submit', 'class' => 'mw-ui-button', 'value' => wfMessage('wrreport-newreport-preview')->text()));
+               $td->appendElement('input', array('name' => 'store', 'type' => 'submit', 'class' => 'mw-ui-button mw-ui-constructive', 'value' => wfMessage('wrreport-newreport-save')->text()));
        }
 
        return $doc->saveHTML($form);
@@ -399,8 +395,8 @@ function wrDeleteReportFormRender($reportid, $delete_person_name, $delete_reason
        $tr = $table->appendElement('tr');
        $tr->appendElement('th')->appendText(wfMessage('wrreport-reports-action')->text());
        $td = $tr->appendElement('td');
-       $td->appendElement('input', array('name' => 'deletepreview', 'type' => 'submit', 'value' => wfMessage('wrreport-newreport-preview')->text()));
-       $td->appendElement('input', array('name' => 'delete', 'type' => 'submit', 'value' => wfMessage('wrreport-deletereport-delete')->text()));
+       $td->appendElement('input', array('name' => 'deletepreview', 'type' => 'submit', 'class' => 'mw-ui-button', 'value' => wfMessage('wrreport-newreport-preview')->text()));
+       $td->appendElement('input', array('name' => 'delete', 'type' => 'submit', 'class' => 'mw-ui-button mw-ui-destructive', 'value' => wfMessage('wrreport-deletereport-delete')->text()));
 
        // hidden field
        $input = $td->appendElement('input', array('name' => 'reportid', 'type' => 'hidden', 'value' => (string) $reportid));
@@ -1117,7 +1113,7 @@ class WrReport {
                if ($name === 'discovery') {
                        // delete "Random page". As a removeEntry function is missing,
                        // a new menu is built here without the random page.
-                       $new_menu = new MenuBuilder();
+                       $new_menu = new MobileFrontend\MenuBuilder();
                        foreach ($menu->getEntries() as $menuEntryRepresentation) {
                                $new_entry_name = $menuEntryRepresentation['name'];
                                if ($new_entry_name == 'random') continue;