.
*/
include("./include/include.php");
require_once(FILESYSTEMROOTPATH."jc/include/classes/DefaultLayout.php");
require_once(FILESYSTEMROOTPATH."include/form/AbstractForm.php");
class PMForm extends AbstractForm {
private $pmService;
public function __construct(Layout $layout, IModel $model, Proposals_managementService $pmService) {
parent::__construct($layout, $model);
$this->pmService = $pmService;
}
public function save(IModel $model) {
if( $this->pmService->saveOrUpdate($model) ) {
$this->layout->echoln('Saved!
Back');
}else {
$this->layout->echoln("Failed saving.");
}
}
}
$layout = new DefaultLayout("JC_MANAGE", "./jc/");
$layout->init();
$pm_id = $_GET['pm_id'];
$pmService = $GLOBALS['ClassFactory']->getProposals_managementService();
$pm = $pmService->load($pm_id);
$pid=$pm->getProposal_id();
$proposal = $GLOBALS['ClassFactory']->getProposalsService()->load($pid);
$layout->echoln(''.$proposal->getTitle().'
');
$layout->echoln('Keep the link if you wish to add the summary later
');
$form = new PMForm($layout, $pm, $pmService);
$summary = new TextAreaField('summary','Summary',5,70);
$form->addField($summary);
$form->display();
$layout->page_footer();
?>