2008-09-29 05:18:23 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Displays a summary of instances of a form submitted to the website
|
|
|
|
* @package cms
|
|
|
|
*/
|
|
|
|
class SubmittedFormReportField extends FormField {
|
|
|
|
|
|
|
|
function Field() {
|
|
|
|
Requirements::css(SAPPHIRE_DIR . "/css/SubmittedFormReportField.css");
|
|
|
|
|
|
|
|
return $this->renderWith("SubmittedFormReportField");
|
|
|
|
}
|
|
|
|
|
|
|
|
function Submissions() {
|
|
|
|
return $this->form->getRecord()->Submissions();
|
|
|
|
}
|
2008-09-29 07:33:43 +02:00
|
|
|
|
|
|
|
function ExportLink() {
|
|
|
|
if($this->Submissions() && $this->Submissions()->Count() > 0) {
|
|
|
|
return $this->form->getRecord()->Link() . 'export/' . $this->form->getRecord()->ID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-09-29 05:18:23 +02:00
|
|
|
}
|
|
|
|
?>
|