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

Convert relationship form to datepicker #12972

Merged

Conversation

mattwire
Copy link
Contributor

Overview

Convert the start_date/end_date elements on the relationship edit form to use datepicker.

Before

Uses deprecated jcalendar

After

Uses datepicker

Technical Details

Comments

@colemanw Are you able to review this one?

@civibot
Copy link

civibot bot commented Oct 19, 2018

(Standard links)

@civibot civibot bot added the master label Oct 19, 2018
}
if (!empty($this->_values['end_date'])) {
list($defaults['end_date']) = CRM_Utils_Date::setDateDefaults($this->_values['end_date']);
$defaults['end_date'] = $this->_values['end_date'];
}
Copy link
Member

Choose a reason for hiding this comment

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

I think these statements are now redundant; you are basically assigning the same value that is already there.

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've just checked and they are still required, _values is not passed to $defaults without assignment here. However, I've cleaned it up so we're now using CRM_Utils_Array::value() instead of a 3 line if statement.

@mattwire mattwire force-pushed the datepicker_relationshipform branch from f00528a to 57bdb9e Compare October 19, 2018 18:30
@mattwire mattwire force-pushed the datepicker_relationshipform branch from 57bdb9e to 425d606 Compare October 19, 2018 19:06
@eileenmcnaughton
Copy link
Contributor

I tested creating a new relationship, editing the relationship & deleting it & date fields worked. I also confirmed I could set end date before start - merging

@eileenmcnaughton eileenmcnaughton merged commit 4a030f0 into civicrm:master Oct 20, 2018
@mattwire mattwire deleted the datepicker_relationshipform branch March 1, 2019 11:24
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