-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat(JavaScript): Allow changing action URL and more improvements #40
Conversation
silbinarywolf
commented
Jan 5, 2017
•
edited
Loading
edited
- 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().
Add translatable and Lithuanian translation
* master: NEW Don't modify the field if no canCreate
Commits for 1.1.2
* 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)
Also just an FYI, this is for my MultiRecordField module: It needs to be able to rewrite the action URL so it can feed through the field. |
@sheadawson Any time to look over this? |
/** | ||
* @var string | ||
*/ | ||
protected $addNewAction; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
Soory @silbinarywolf looks like I started but didn't submit my feedback, see above |
Thanks for this work :) |
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! |
Cool thought that might be the case, cheers! |