Problem/Motivation

The integer form elements present in the module have a default size and maxlength, but usually we don't work with number higher than 5 digits.

Proposed resolution

Set a size and a maxlength for all the integer form elements.

Ex:

  $form['minimum_age_to_delete']['node_revision_delete_minimum_age_to_delete_time_max_number'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum number allowed'),
    '#description' => t('The maximum number in the "Minimum age of revision to delete" configuration in each content type edit page. If you change this number and the new value is smaller than the value defined for a content type in the "Minimum age of revision to delete" setting, the "Minimum age of revision to delete" setting for that content type will take it.'),
    '#default_value' => $node_revision_delete_minimum_age_to_delete_time['max_number'],
    '#element_validate' => array('element_validate_integer_positive'),
    '#size' => 8,
    '#maxlength' => 5,
  );

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

adriancid created an issue. See original summary.

  • adriancid committed 9ccfaf8 on 7.x-3.x
    Issue #2913281 by adriancid: Set a size and maxlength for integer form...
adriancid’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.