Révision b0dc3a2e
Ajouté par Julien Enselme il y a plus de 7 ans
drupal7/modules/simpletest/tests/form_test.module | ||
---|---|---|
589 | 589 |
$form['tableselect'] = $element_properties; |
590 | 590 |
|
591 | 591 |
$form['tableselect'] += array( |
592 |
'#prefix' => '<div id="tableselect-wrapper">', |
|
593 |
'#suffix' => '</div>', |
|
592 | 594 |
'#type' => 'tableselect', |
593 | 595 |
'#header' => $header, |
594 | 596 |
'#options' => $options, |
595 | 597 |
'#multiple' => FALSE, |
596 | 598 |
'#empty' => t('Empty text.'), |
599 |
'#ajax' => array( |
|
600 |
'callback' => '_form_test_tableselect_ajax_callback', |
|
601 |
'wrapper' => 'tableselect-wrapper', |
|
602 |
), |
|
597 | 603 |
); |
598 | 604 |
|
599 | 605 |
$form['submit'] = array( |
... | ... | |
697 | 703 |
return $form; |
698 | 704 |
} |
699 | 705 |
|
706 |
/** |
|
707 |
* Ajax callback that returns the form element. |
|
708 |
*/ |
|
709 |
function _form_test_tableselect_ajax_callback($form, &$form_state) { |
|
710 |
return $form['tableselect']; |
|
711 |
} |
|
712 |
|
|
700 | 713 |
/** |
701 | 714 |
* A multistep form for testing the form storage. |
702 | 715 |
* |
Formats disponibles : Unified diff
Update to Drupal 7.52