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

dev/core#561 - Convert grant task form to datepicker #13485

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jan 17, 2019

Summary

Changes one form element to datepicker widget. This is a really simple change as the field doesn't require any preprocesing (the form element never has a default value) or postprocessing (the value is simply passed through strtotime which works with either format).

Steps to test

  1. Create a grant
  2. Go to Grants -> Find Grants
  3. Select "Update Grants" from the search results Action Menu dropdown
  4. Enter a value in the datepicker and save.

@civibot
Copy link

civibot bot commented Jan 17, 2019

(Standard links)

@civibot civibot bot added the master label Jan 17, 2019
@colemanw
Copy link
Member Author

@civicrm-builder retest this please

@colemanw
Copy link
Member Author

@JoeMurray could you spare 5 minutes to review this? Can just do it on the test site online.

@colemanw
Copy link
Member Author

@civicrm-builder retest this please

@JoeMurray
Copy link
Contributor

Sorry I missed this earlier. Code looks good on review. Will test in a moment.

</tr>
{/foreach}
</table>
<p>{ts 1=$totalSelectedGrants}Number of selected grants: %1{/ts}</p>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div><!-- /.crm-form-block -->
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for my information, what was this comment that has been removed originally for? Is it a cut and paste remnant?

Copy link
Member Author

Choose a reason for hiding this comment

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

For whatever reason, the original .tpl code was extremely messy, lines were indented completely at random and it was very hard to tell what opening tags corresponded to what closing tags. So I guess rather than indent properly someone decided to put a comment whenever closing a tag about what opening tag it corresponded to?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since Grants is a newer component I assume this tpl was created by copy-pasting some other tpl and thus inherited messy whitespace and useless closing comments.

@colemanw
Copy link
Member Author

Adding merge-on-pass based on Joe's review.

@colemanw colemanw merged commit eda4400 into civicrm:master Jan 25, 2019
@colemanw colemanw deleted the grantTaskDate branch January 25, 2019 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants