This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
No need of init call, its taken care in add addButton will addButton will #730
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix validateNotNull and validateField
fix typo in getConfig()
call to hook ‘createForm’ will return an array, with the form at index 0, instead of the form object. Therefore to properly assign $this-form to the form, we need to use index 0 of the return array.
add index 0 since hook method return array
Use clone instead of newInstance() because it clones controller, _table, elements etc. which we need if Auth is used simply like this: ``` $this->add('Auth')->allow('admin', 'secret')->check(); ```
Fix Auth_Basic
fix implode error for php 7.0
In 4.2 this was implemented long time ago: 11e5779 I'm not sure why I have forgot 4.3 branch. Anyway here it is and works like a charm :)
This is especially important, if you addButton() to field. addButton will reside in after_field template tag and if you have field hint, then it'll mess design when attached to the same template tag where button (after_field).
This is especially important, if you addButton() to field. addButton will reside in after_field template tag and if you also have field hint, then it'll mess design when attached to the same template tag where button (after_field).
Feature: allow DSQL->table() to set table as sub-select (dsql object)
Previously this could be misused like this: ``` $this->add('Auth', ['login_field' => 'login', 'password' => 'mypass']); $this->auth->setModel('User'); ``` This way it still would use default values 'email' and 'password', because they was set as default 2nd and 3rd param values of Auth_Basic::setModel() method.
Auth: fix default field name usage
Form field hint should go below field not after
… use null instead. This should be backwards compatible.
… respective changes in controllers
…ike sub-grids/cruds) when primary view (like form) is associated with model. usage exmple: ``` class View_Person_View extends View { public function init() { parent::init(); // main form $v = $this->add('Form'); $this->addHook('set-model', function($self, $m, $f) use ($v) { $v->setModel($m, $f); }); // sub-grid $g = $this->add('Grid'); $this->addHook('set-model', function($self, $m, $f) use ($g) { $g->setModel($m->ref('BankAccounts')); }); } } // with one setModel you can initialize everything $this->add('View_Person_View')->setModel($m->load(1)); ```
…ypecastSaveRow does that, so we can use it.
See usage example in class definition file.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.