Révision a45e4bc1
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/webform/components/pagebreak.inc | ||
---|---|---|
45 | 45 |
'#value' => '0', |
46 | 46 |
); |
47 | 47 |
|
48 |
$form['display'] = array('#type' => 'markup'); // Hide the display options. |
|
49 |
|
|
50 | 48 |
$form['extra']['next_page_label'] = array( |
51 | 49 |
'#type' => 'textfield', |
52 | 50 |
'#title' => t('Next page button label'), |
... | ... | |
56 | 54 |
); |
57 | 55 |
$form['extra']['prev_page_label'] = array( |
58 | 56 |
'#type' => 'textfield', |
59 |
'#title' => t('Prev page button label'), |
|
60 |
'#description' => t('This is used for the <em>Prev Page</em> button on the page after this page break. Default: <em>< Prev Page</em>'), |
|
57 |
'#title' => t('Previous page button label'),
|
|
58 |
'#description' => t('This is used for the <em>Previous Page</em> button on the page after this page break. Default: <em>< Prev Page</em>'),
|
|
61 | 59 |
'#default_value' => $component['extra']['prev_page_label'], |
62 | 60 |
'#size' => 30, |
63 | 61 |
); |
... | ... | |
68 | 66 |
/** |
69 | 67 |
* Implements _webform_render_component(). |
70 | 68 |
*/ |
71 |
function _webform_render_pagebreak($component, $value = NULL, $filter = TRUE) { |
|
69 |
function _webform_render_pagebreak($component, $value = NULL, $filter = TRUE, $submission = NULL) {
|
|
72 | 70 |
$element = array( |
73 | 71 |
'#type' => 'hidden', |
74 | 72 |
'#value' => $component['name'], |
... | ... | |
78 | 76 |
} |
79 | 77 |
|
80 | 78 |
/** |
81 |
* Implements _webform_render_component().
|
|
79 |
* Implements _webform_display_component().
|
|
82 | 80 |
*/ |
83 |
function _webform_display_pagebreak($component, $value = NULL, $format = 'html') { |
|
81 |
function _webform_display_pagebreak($component, $value = NULL, $format = 'html', $submission = array()) {
|
|
84 | 82 |
$element = array( |
85 | 83 |
'#theme' => 'webform_display_pagebreak', |
86 | 84 |
'#title' => $component['name'], |
... | ... | |
97 | 95 |
function theme_webform_display_pagebreak($variables) { |
98 | 96 |
$element = $variables['element']; |
99 | 97 |
|
100 |
return $element['#format'] == 'html' ? '<h2 class="webform-page">' . check_plain($element['#title']) . '</h2>' : "--" . $element['#title'] . "--\n";
|
|
98 |
return $element['#format'] == 'html' ? '<h2 class="webform-page">' . check_plain($element['#title']) . '</h2>' : '==' . $element['#title'] . "==\n";
|
|
101 | 99 |
} |
Formats disponibles : Unified diff
Update webform to 4.10