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

EZP-27901: As an Editor, I want to edit a DateAndTime field type with the new UI guidelines #62

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

sunpietro
Copy link
Contributor

@sunpietro sunpietro commented Nov 9, 2017

JIRA: https://jira.ez.no/browse/EZP-27901
Requires: ezsystems/repository-forms#171

THINGS DONE:

  • implemented frontend part,
  • implemented backend part.

@webhdx
Copy link
Contributor

webhdx commented Nov 13, 2017

Backend part is now finished: ezsystems/repository-forms#171

const datetimeConfig = {
defaultDate: new Date(),
enableTime: true,
enableSeconds: true,
Copy link
Member

Choose a reason for hiding this comment

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

enableSeconds should come from backend. In fieldType you can specify if field should use seconds.

pickrInput.type = 'text';
pickrInput.classList.add('flatpickr', 'flatpickr-input', 'ez-data-source__input', 'form-control');

sourceInput.hidden = true;
Copy link
Member

Choose a reason for hiding this comment

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

Could this be done in backend while rendering field? //cc @webhdx


sourceInput.hidden = true;

sourceInput.parentNode.insertBefore(pickrInput, sourceInput);
Copy link
Member

Choose a reason for hiding this comment

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

Well this whole rendering additional input should be on backend in twig I think


const datetimeFields = [...document.querySelectorAll(SELECTOR_FIELD)];
const datetimeConfig = {
defaultDate: new Date(),
Copy link
Member

Choose a reason for hiding this comment

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

What about edit mode or when the field will have default value?

@sunpietro
Copy link
Contributor Author

@dew326 The edit mode has been implemented. Ready for testing @micszo

Copy link
Contributor

@m-tyrala m-tyrala left a comment

Choose a reason for hiding this comment

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

There's no "required" validation when field loses focus.

@sunpietro
Copy link
Contributor Author

@m-tyrala the date/datetime/time field doesn't work this way. They don't use focus at all.
I'm not sure your request is valid.

@lserwatka lserwatka merged commit 78e4d60 into master Nov 17, 2017
@lserwatka lserwatka deleted the ezp-27901-datetime-field branch November 17, 2017 08:12
@m-tyrala
Copy link
Contributor

Here is what is written inside JIRA ticket:

Validations
The UI should validate the following scenario
Required field
The validation will be as it is on v1 when the field loses focus.

So i requested to change this, if this description is wrong, then no problem.

@lserwatka
Copy link
Member

@m-tyrala you are right, could you make a bug in JIRA as a followup and paste is here?

@m-tyrala
Copy link
Contributor

EZP-28252

ITernovtsii pushed a commit to ITernovtsii/ezplatform-admin-ui that referenced this pull request Dec 17, 2019
…n-table-header

EZP-27952: Sub-items table - Incorrect number displayed in the table header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants