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

ISSUE-26: Add a Cancel Edit button to Webform widget editing #55

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Jul 9, 2020

See #26

Since 26 is a macro issue, this is just a step forward: This pull adds a Cancel Button to any ADO via a Webform Editing session (editing, not creating from 0) which triggers also Edit Buttons from the main Node Form to be displayed again and the original "Edit SOMEPLACEHOLDER TEXT YOU DECIDED ON" to appear back. Logic is simple and most of that is Ajax Commands being send as response to the existing Model Controller we built back in the days:
Also covers

#56 Drupal 9!

Other Improvements:

  • Modal popup again possible via code. @TODO: Expose as an setting to the Widget. So people can decide if they want the inline form (as they get now) or the popup a new one (as they got in 2019)
  • EXIF was having trouble to process files with names, etc when that option was enabled on upload. To be honest i don't feel EXIF should be shown at all during upload, not sure if that use case which comes from a particular project applies to anything else. But since the preview of image/video can be disabled per Webform Element, i kinda feel i won't give removing it for now a priority. File naming and escaping is now corrected.
  • Both, inline and not inline widget got the Cancel button and there is also some JS driven logic to hide it at the end, when the submission is done but before saving the Node/ADO.

So this is new and was asked by the cool folks from ESIE (looks at @alliomeria 👀 ). This pull adds dynamically a 'Cancel --some placeholder text you decide on' button when editing an existing object via a webform. Which has two effects.
- REmoves the current form and shows back the 'Edit  --some placeholder text you decide on' button shows back also the Save Node buttons on top.
If feels not fancy but brings also back the 'edit in a pop-up mode' and a more stronger and better code for all of this. That. Late. Last pull for webforms before official beta3. Adios
Still need to address @alliomeria 's comment on collapsing/simply not showing EXIF when having a lot of Images. Will have to think about that since each EXIF really runs in its own process via AJAX so each one does not know how many there are. But i can do this. and its needed. 👀  🏮
@DiegoPino DiegoPino self-assigned this Jul 9, 2020
@DiegoPino DiegoPino added bug Something isn't working enhancement New feature or request Javascript Because they got 'includes' a few years ago UI/UX The thing people do when in front of a screen Webform Widgets Connecting Webforms and Entity Fields labels Jul 9, 2020
And since we depend on webform, let's use the version that Drupal 9 loves too
5.19
@DiegoPino DiegoPino added the Drupal 9 After Drupal 8, Before Drupal 10 label Jul 9, 2020
@DiegoPino DiegoPino added this to the 1.0.0-beta3 milestone Jul 9, 2020
@DiegoPino DiegoPino merged commit af22cab into 8.x-1.0-beta3 Jul 9, 2020
@DiegoPino DiegoPino deleted the ISSUE-26a branch August 17, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Drupal 9 After Drupal 8, Before Drupal 10 enhancement New feature or request Javascript Because they got 'includes' a few years ago UI/UX The thing people do when in front of a screen Webform Widgets Connecting Webforms and Entity Fields
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drupal 9 ready: fix last deprecations Make ingest Webform Workflow simpler and natural
1 participant