diff --git a/include/testData.php b/include/testData.php index f61a75c..e3a3c29 100644 --- a/include/testData.php +++ b/include/testData.php @@ -936,6 +936,23 @@ class testData{ echo ''; echo ''; + // Display confirmation box for changing the Wine version + $oOldTest = new testData($this->iTestingId); + if($this->iTestingId && $oOldTest->sTestedRelease != $this->sTestedRelease) + { + if(getInput('bConfirmTestedVersionChange', $aClean) != 'true') + { + echo ' '; + echo 'You have changed the Wine version of the report. Are you sure you want to do this? Please submit a new test report for every Wine version you test; this is useful for tracking Wine’s progress.
'; + echo ' '; + echo 'Yes, I want to change the Wine version'; + echo ''; + } else + { + echo ''; + } + } + echo "\n"; echo html_frame_end(); @@ -960,6 +977,17 @@ class testData{ if (empty($aValues['sTestedRelease'])) $errors .= "
  • Please enter the version of Wine that you tested with.
  • \n"; + // Ask for confirmation if changing the tested Wine versions, becase we want users + // to submit new reports instead of updating existing ones when testing new Wines + $oOldTest = new testData($this->iTestingId); + if($this->iTestingId && $oOldTest->sTestedRelease != getInput('sTestedRelease', $aValues) && + getInput('bConfirmTestedVersionChange', $aValues) != 'true') + { + $errors .= '
  • Are you sure you want to change the Wine version of the report? Please submit a new '. + 'test report for every Wine version you test; this is useful for tracking Wine’s progress. '. + 'Tick the box above the submit button if you want to proceed
  • '; + } + // No Distribution entered, and nothing in the list is selected if (empty($aValues['sDistribution']) && !$aValues['iDistributionId']) $errors .= "
  • Please enter a distribution.
  • \n";