Added "required" to condition and description.
[philipp/winterrodeln/mediawiki_extensions/wrreport.git] / wrreport_body.php
index 73c9b923404ef3b10b523a253a2b23f6b73524e8..8889b7a96345c327e2b9259b91805b54c8b927d7 100644 (file)
@@ -314,7 +314,7 @@ function wrReportFormRender($hide_save_button = TRUE, $page_title = NULL, $date_
        $tr = $table->appendElement('tr');
        $tr->appendElement('th')->appendText(wfMessage('wrreport-newreport-condition')->text());
        $td = $tr->appendElement('td');
-       $select = $td->appendElement('select', array('name' => 'condition'));
+       $select = $td->appendElement('select', array('name' => 'condition', 'required' => 'required'));
        $option = $select->appendElement('option', array('value' => '0'));
        $option->appendText(wfMessage('wrreport-condition-select')->text());
        foreach (WrReport::$wrConditions as $condition_num => $condition_text) {
@@ -329,7 +329,7 @@ function wrReportFormRender($hide_save_button = TRUE, $page_title = NULL, $date_
        // description
        $tr = $table->appendElement('tr');
        $tr->appendElement('th')->appendText(wfMessage('wrreport-newreport-description')->text());
-       $tr->appendElement('td')->appendElement('textarea', array('name' => 'description', 'class' => 'fullwidth', 'rows' => '7'))->appendText($description);
+       $tr->appendElement('td')->appendElement('textarea', array('name' => 'description', 'class' => 'fullwidth', 'rows' => '7', 'required' => 'required'))->appendText($description);
 
        // author
        $tr = $table->appendElement('tr');
@@ -348,7 +348,7 @@ function wrReportFormRender($hide_save_button = TRUE, $page_title = NULL, $date_
        $td = $tr->appendElement('td');
        $input = $td->appendElement('input', array('name' => 'preview', 'type' => 'submit'));
        if ($hide_save_button)
-               $input->setAttribute('value', wfMessage('wrreport-newreport-preview')->text() . ' & ' . wfMessage('wrreport-newreport-save')->text());
+               $input->setAttribute('value', wfMessage('wrreport-newreport-next')->text());
        else {
                $input->setAttribute('value', wfMessage('wrreport-newreport-preview')->text());