- πΊπΈUnited States TomTech
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.
I propose a simple change in the Renew License operation to permit negative integers. This will allow more flexibility for expiration date control. In the following code, I changed "element_validate_integer_positive" to "element_validate_integer". Adding -5 days seems to go through and bring the expiration date 5 days earlier.
function commerce_license_renew_action_form($context) {
...
$form['duration'] = array(
'#type' => 'container',
'duration_value' => array(
'#type' => 'textfield',
'#title' => t('Renew the license for another:'),
'#size' => 5,
'#default_value' => $default_value,
// '#element_validate' => array('element_validate_integer_positive'),
'#element_validate' => array('element_validate_integer'),
),
I would also love to have the ability to set a specific expiration date, but that's a bit more involved.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.