Projet

Général

Profil

Révision feca1e4a

Ajouté par Assos Assos il y a presque 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/webform/includes/webform.pages.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *
6 5
 * Menu callbacks and functions for configuring and editing webforms.
7 6
 */
8 7

  
......
14 13

  
15 14
  $form['#attached']['library'][] = array('webform', 'admin');
16 15

  
17
  // Refresh the entity cache to get the lastest submission number.
16
  // Refresh the entity cache to get the latest submission number.
18 17
  $nid = $node->nid;
19 18
  entity_get_controller('node')->resetCache(array($nid));
20 19
  $node = node_load($nid);
......
73 72
    '#theme' => 'webform_advanced_redirection_form',
74 73
    '#description' => t('Choose where to redirect the user upon successful submission.') . ' ' . t('The <em>Custom URL</em> option supports Webform token replacements.') . ' ' . theme('webform_token_help', array('groups' => array('node', 'submission'))),
75 74
  );
76
  $form['submission']['redirection']['redirect']= array(
75
  $form['submission']['redirection']['redirect'] = array(
77 76
    '#type' => 'radios',
78 77
    '#default_value' => $redirect,
79 78
    '#options' => array(
......
114 113
    '#parents' => array('total_submit_limit'),
115 114
  );
116 115
  $interval_options = array(
117
      '-1' => t('ever'),
118
      '60' => t('every minute'),
119
      '300' => t('every 5 minutes'),
120
      '3600' => t('every hour'),
121
      '86400' => t('every day'),
122
      '604800' => t('every week'),
123
    );
116
    '-1' => t('ever'),
117
    '60' => t('every minute'),
118
    '300' => t('every 5 minutes'),
119
    '3600' => t('every hour'),
120
    '86400' => t('every day'),
121
    '604800' => t('every week'),
122
  );
124 123
  $form['submission']['total_submit_limit']['total_submit_interval'] = array(
125 124
    '#type' => 'select',
126 125
    '#options' => $interval_options,
......
211 210
    $node->webform['progressbar_pagebreak_labels'] ? 'progressbar_pagebreak_labels' : NULL,
212 211
    $node->webform['progressbar_include_confirmation'] ? 'progressbar_include_confirmation' : NULL,
213 212
  ));
214
  $form['progressbar']['webform_progressbar_style']  = array(
213
  $form['progressbar']['webform_progressbar_style'] = array(
215 214
    '#type' => 'checkboxes',
216 215
    '#title' => t('Progress bar style'),
217 216
    '#options' => array(
......
265 264
    '#title' => t('Enable preview page'),
266 265
    '#description' => t('Add a page for previewing the form before submitting.'),
267 266
    '#default_value' => $node->webform['preview'],
268
    '#id' => 'webform-preview-enable'
267
    '#id' => 'webform-preview-enable',
269 268
  );
270 269
  $form['preview']['settings'] = array(
271 270
    '#type' => 'container',
......
442 441
  $node->webform['confirmation'] = $form_state['values']['confirmation']['value'];
443 442
  $node->webform['confirmation_format'] = $form_state['values']['confirmation']['format'];
444 443

  
445
  // Save the redirect URL
444
  // Save the redirect URL.
446 445
  $node->webform['redirect_url'] = $form_state['values']['redirect_url'];
447 446

  
448 447
  // Overall form status.
......
518 517
  // existing serial number, which could have increased while this form was
519 518
  // being edited.
520 519
  $next_min = _webform_submission_serial_next_value_used($node->nid);
521
  $next_serial = (int)$form_state['values']['next_serial'];
520
  $next_serial = (int) $form_state['values']['next_serial'];
522 521
  if ($next_serial < $next_min) {
523 522
    drupal_set_message(t('The next submission number was increased to @min to make it higher than existing submissions.',
524 523
      array('@min' => $next_min)));
......
551 550
      ->condition('module', 'webform')
552 551
      ->condition('delta', $block->delta)
553 552
      ->execute();
554
    // Remove any roles associated with the block
553
    // Remove any roles associated with the block.
555 554
    db_delete('block_role')
556 555
      ->condition('module', 'webform')
557 556
      ->condition('delta', $block->delta)

Formats disponibles : Unified diff