Projet

Général

Profil

Révision 74f6bef0

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/adaptivetheme/at_core/inc/forms/at_core.validate.inc
7 7
 * @param $form
8 8
 * @param $form_state
9 9
 */
10

  
11 10
function at_core_settings_validate($form, &$form_state) {
12

  
13 11
  $values = $form_state['values'];
14 12
  $theme_name = $form_state['build_info']['args'][0];
15 13

  
......
29 27
  if (empty($values['tablet_portrait_layout'])) {
30 28
    form_set_error('tablet_portrait_layout', t('No layout selection detected for the <b>Tablet Portrait Layout</b>. Please review "Tablet Layout > Portrait > Choose sidebar positions" and select an option.'));
31 29
  }
32
  if (empty($values['smartphone_landscape_layout'])) {
33
    form_set_error('smartphone_landscape_layout', t('No layout selection detected for the <b>Smartphone Landscape Layout</b>. Please review "Smartphone Layout > Landscape > Choose sidebar positions" and select an option.'));
30
  if (empty($values['smalltouch_landscape_layout'])) {
31
    form_set_error('smalltouch_landscape_layout', t('No layout selection detected for the <b>Smalltouch Landscape Layout</b>. Please review "Smalltouch Layout > Landscape > Choose sidebar positions" and select an option.'));
34 32
  }
35 33

  
36 34
  // Validate our form #state required fields, #states are UI only.
......
58 56
    }
59 57
  }
60 58

  
61
  // Smartphone
62
  if ($values['smartphone_landscape_layout'] === 'one_col_vert') {
63
    if (empty($values['smartphone_landscape_sidebar_first'])) {
64
      form_set_error('smartphone_landscape_sidebar_first', t('Smartphone First Sidebar width is empty - enter a value or choose another layout.'));
59
  // Smalltouch
60
  if ($values['smalltouch_landscape_layout'] === 'one_col_vert') {
61
    if (empty($values['smalltouch_landscape_sidebar_first'])) {
62
      form_set_error('smalltouch_landscape_sidebar_first', t('Smalltouch First Sidebar width is empty - enter a value or choose another layout.'));
65 63
    }
66
    if (empty($values['smartphone_landscape_sidebar_second'])) {
67
      form_set_error('smartphone_landscape_sidebar_second', t('Smartphone Second Sidebar width is empty - enter a value or choose another layout.'));
64
    if (empty($values['smalltouch_landscape_sidebar_second'])) {
65
      form_set_error('smalltouch_landscape_sidebar_second', t('Smalltouch Second Sidebar width is empty - enter a value or choose another layout.'));
68 66
    }
69 67
  }
70 68

  

Formats disponibles : Unified diff