1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| class FormelleForm extends BaseFormelleForm
{
public function configure()
{
$this->embedRelations(array(
'FinancementFormal' => array(
'considerNewFormEmptyFields' => array("datedebut", "datefin", "montant", "institution_id"),
'multipleNewForms' => true,
'newFormsInitialCount' => 1,
'newRelationButtonLabel' => 'Add a new financing',
'formClassArgs' => array(array('ah_add_delete_checkbox' => true)),
'newFormAfterExistingRelations' => true,
)
));
}
public function listenToFormPostConfigureEvent(sfEvent $event)
{
if ($form = parent::listenToFormPostConfigureEvent($event))
{
$form->widgetSchema['delete_object']->setOption('label', 'Delete financing');
}
}
} |
Partager