Fixed to prevent entering empty bug reports.
This commit is contained in:
parent
d292678759
commit
4f682c2e93
@ -173,6 +173,15 @@ class IDF_Form_IssueCreate extends Pluf_Form
|
|||||||
return $this->cleaned_data;
|
return $this->cleaned_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clean_content()
|
||||||
|
{
|
||||||
|
$content = trim($this->cleaned_data['content']);
|
||||||
|
if (strlen($content) == 0) {
|
||||||
|
throw new Pluf_Form_Invalid(__('You need to provide a description of the issue.'));
|
||||||
|
}
|
||||||
|
return $content;
|
||||||
|
}
|
||||||
|
|
||||||
function clean_status()
|
function clean_status()
|
||||||
{
|
{
|
||||||
// Check that the status is in the list of official status
|
// Check that the status is in the list of official status
|
||||||
|
@ -140,6 +140,15 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clean_content()
|
||||||
|
{
|
||||||
|
$content = trim($this->cleaned_data['content']);
|
||||||
|
if (!$this->show_full and strlen($content) == 0) {
|
||||||
|
throw new Pluf_Form_Invalid(__('You need to provide a description of the issue.'));
|
||||||
|
}
|
||||||
|
return $content;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We check that something is really changed.
|
* We check that something is really changed.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user