Added "required" to condition and description.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 5 Dec 2016 22:41:03 +0000 (22:41 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 5 Dec 2016 22:41:03 +0000 (22:41 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2571 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport_body.php

index 2fe9119f8272bd43353e7eaea903158076c80fda..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');