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

feat(JavaScript): Allow changing action URL and more improvements #40

Merged
merged 7 commits into from
Apr 6, 2017

Conversation

silbinarywolf
Copy link

@silbinarywolf silbinarywolf commented Jan 5, 2017

  • Change submit button(s) to change state on submit rather than on click (fixes bug where button disables for HTML5 validation)
  • If field updating is a "select" tag type, replace it's "option" elements and trigger an update for Chosen/Select2. This is to avoid losing JS hooks on a form on the frontend.
  • Add missing this._super() calls.
  • Removed $this->owner->setForm(), the call makes no sense and caused a recursive loop when calling $this->owner->Link().

sheadawson and others added 6 commits January 16, 2015 10:39
Add translatable and Lithuanian translation
* master:
  NEW Don't modify the field if no canCreate
* master:
  fix(quickaddnew.css): Fix CSS so that the addnew button appears beside the chosen field in a way that works responsively.
  Fix enter key presses in input dialogs triggering the add new button. see: silverstripe/silverstripe-cms#1290
  added croatian translation
  Added standard Scrutinizer config
  Adjusting codestyle a bit and adding phpdoc blocks
  Fixing phpdoc blocks to refering to Objects to built-in types of PHP
  Remove trailing spaces in the source code
  Fixing composer.json
  Converted to PSR-2
  Added standard .editorconfig file
  Create LICENSE.md
  add support for Translatable or other instances when form action contains url parameters
…es bug where button disables for HTML5 validation), If field updating is a <select> type, replace it's <option> elements and trigger an update for Chosen/Select2 (avoid losing JS hooks on a form on the frontend), Add missing this._super() calls (fixes select2 not working when a quickaddnew button is added via AJAX)
@silbinarywolf
Copy link
Author

Also just an FYI, this is for my MultiRecordField module:
https://github.com/SilbinaryWolf/multirecordfield/tree/feat-displaylogicsupport

It needs to be able to rewrite the action URL so it can feed through the field.

@silbinarywolf
Copy link
Author

@sheadawson Any time to look over this?

/**
* @var string
*/
protected $addNewAction;
Copy link
Owner

Choose a reason for hiding this comment

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

Where is this used?

@sheadawson
Copy link
Owner

Soory @silbinarywolf looks like I started but didn't submit my feedback, see above

@sheadawson
Copy link
Owner

Thanks for this work :)

@silbinarywolf
Copy link
Author

It wasn't used anywhere. I'm guessing I used it before I fixed the setForm() bug, then I proceeded to not use that property. Fixed now!

@sheadawson sheadawson merged commit f90a9ec into sheadawson:master Apr 6, 2017
@sheadawson
Copy link
Owner

Cool thought that might be the case, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants