Projet

Général

Profil

Révision 8c72e82a

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/webform/includes/webform.pages.inc
412 412
  }
413 413

  
414 414
  // Ensure only positive integers are entered as submission limits.
415
  foreach (array('total_submit_limit', 'submit_limit') as $field) {
415
  foreach (array('total_submit_limit' => 'enforce_total_limit', 'submit_limit' => 'enforce_limit') as $field => $enforce_fk) {
416 416
    $limit = $form['submission'][$field][$field]['#value'];
417
    if ($limit !== '' && (int) $limit < 1 && (int) $limit !== -1) {
417
    if ($form['submission'][$field][$enforce_fk]['#value'] !== 'no' && $limit !== '' && (int) $limit < 1 && (int) $limit !== -1) {
418 418
      form_error($form['submission'][$field][$field], t('The submission limit must be at least 1.'));
419 419
    }
420 420
  }
......
427 427
    // Note that FAPI doesn't actually support error highlighting on radio or
428 428
    // checkbox form elements.
429 429
    form_error($form['advanced']['confidential'],
430
               t('Choose a "Per user submission limit" or "Confidential submissions", but not both. Or ask the adminstrator to track anonymous users by cookie, rather than IP address only.'));
430
      t('Choose a "Per user submission limit" or "Confidential submissions", but not both. Or ask the adminstrator to track anonymous users by cookie, rather than IP address only.'));
431 431
  }
432 432
}
433 433

  
......
521 521
  $next_serial = (int)$form_state['values']['next_serial'];
522 522
  if ($next_serial < $next_min) {
523 523
    drupal_set_message(t('The next submission number was increased to @min to make it higher than existing submissions.',
524
                         array('@min' => $next_min)));
524
      array('@min' => $next_min)));
525 525
    $next_serial = $next_min;
526 526
  }
527 527
  $node->webform['next_serial'] = $next_serial;
......
538 538
  drupal_set_message(t('The form settings have been updated.'));
539 539

  
540 540
  $node = &$form['#node'];
541
  if (!$node->webform['block'] && function_exists('block_load') && 
541
  if (!$node->webform['block'] && function_exists('block_load') &&
542 542
      ($block = block_load('webform', 'client-block-' . $node->nid)) &&
543 543
      !empty($block->bid)) {
544 544
    // An existing block for this not-currently-available block was already configured.

Formats disponibles : Unified diff