public function executeComment(sfWebRequest $r) { if (!$r->isMethod('post')) { $this->forward404(); } // Load form $f = new UploadsComsForm(); // Binding fields $f->bind($r->getParameter($f->getName())); // If form is valid if ($f->isValid()) { // Save $m = $f->save(); // Redirect $this->redirect($r->getReferer()); } }
?> </ul> <div class="tab-content"> <div class="tab-pane active" id="description"> <?php echo html_entity_decode($u->getDescription()); ?> </div> <div class="tab-pane" id="infos"> <?php include_partial('infos', array('u' => $u, 'ups' => $ups)); ?> </div> <div class="tab-pane" id="newcom"> <?php $f = new UploadsComsForm(); include_component('messages', 'new', array("form" => $f->setDefault('upid', $u->getId()), "submitUrl" => url_for("partage/comment"))); ?> </div> <div class="tab-pane" id="peers"><div></div></div> <?php if ($u->getAuthor() == $sf_user->getAttribute("id") || $sf_user->hasCredential("adm") || $sf_user->hasCredential("mod")) { ?> <div class="tab-pane" id="opt"> <?php include_partial('edit', array("f" => $formEdit)); ?> </div> <?php } ?>