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/components/number.inc
171 171
    '#type' => 'checkbox',
172 172
    '#title' => t('Integer'),
173 173
    '#return_value' => 1,
174
    '#description' => t('Permit only integer values as input. e.g. 12.34 would be invalid.'),
174
    '#description' => t('Permit only integer values as input. For example, 12.34 would be invalid.'),
175 175
    '#weight' => 1.5,
176 176
    '#default_value' => $component['extra']['integer'],
177 177
    '#parents' => array('extra', 'integer'),
......
180 180
    '#type' => 'textfield',
181 181
    '#title' => t('Minimum'),
182 182
    '#default_value' => $component['extra']['min'],
183
    '#description' => t('Minimum numeric value. e.g. 0 would ensure positive numbers.'),
183
    '#description' => t('Minimum numeric value. For example, 0 would ensure positive numbers.'),
184 184
    '#size' => 5,
185 185
    '#maxlength' => 10,
186 186
    '#weight' => 2.1,
......
202 202
    '#type' => 'textfield',
203 203
    '#title' => t('Step'),
204 204
    '#default_value' => $component['extra']['step'],
205
    '#description' => t('Limit options to a specific increment. e.g. a step of "5" would allow values 5, 10, 15, etc.'),
205
    '#description' => t('Limit options to a specific increment. For example, a step of "5" would allow values 5, 10, 15, etc.'),
206 206
    '#size' => 5,
207 207
    '#maxlength' => 10,
208 208
    '#weight' => 3,
......
527 527
      $limit[$key] = _webform_number_format($component, $value);
528 528
    }
529 529

  
530
    // Column headings (override potential theme uppercase, e.g. Seven in D7).
530
    // Column headings (override potential theme uppercase, for example, Seven in D7).
531 531
    $header = array(
532 532
      t('Normal Distribution'),
533 533
      array('data' => '-4' . $sigma, 'style' => 'text-transform: lowercase;'),
......
602 602
 *   The form element. May either be a select or a webform_number element.
603 603
 * @param $form_state
604 604
 *   The full form state for the webform.
605
 * @return
606
 *   None. Calls a form_set_error if the number is not valid.
607 605
 */
608 606
function _webform_validate_number($element, &$form_state) {
609 607
  // Trim spaces for basic cleanup.
......
869 867
 *   The string value to be standardized into a numeric string.
870 868
 * @param $point
871 869
 *   The point separator between the whole number and the decimals.
870
 *
871
 * @return mixed|string
872 872
 */
873 873
function webform_number_standardize($value, $point) {
874 874
  // For simplicity, strip everything that's not the decimal point.

Formats disponibles : Unified diff