Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19853 replace interval controls with numeric #9664

Merged
merged 3 commits into from
Jan 11, 2017

Conversation

konadave
Copy link
Contributor

@konadave konadave commented Jan 11, 2017

Replace the interval select controls with options numbered 1-30 with numeric controls.


//reminder_interval
$this->add('select', 'start_action_offset', ts('When'), $numericOptions);
$this->add('number', 'start_action_offset', ts('When'), array('style' => 'width:5em'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a css class instead of an inline style? Like 'class' => 'six' ought to do it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add property 'min' => 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did add 'min' => 1, but later noticed the select controls actually have 0-30, so changed min to zero.

@colemanw
Copy link
Member

Ok then positiveInteger is probably the wrong validation rule.

@konadave
Copy link
Contributor Author

positiveInteger validates zero.

@colemanw
Copy link
Member

Cool.

@colemanw colemanw merged commit cdedc5f into civicrm:master Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants