Updated 034 How to add Custom Buttons in JCB to your component Admin Area (markdown)
parent
abe98a247f
commit
ec9511ee4d
@ -33,7 +33,7 @@ To demonstrate where the code ends up. Save this as a selection in a List view a
|
||||
|
||||
[00:07:05](https://www.youtube.com/watch?v=VyBxWpJWb40&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m05s)
|
||||
|
||||
Now let us go back to editing that functionality there, by showing you some more options('Look'). Go to custom buttons. Add another button. Target - call it 'single'. Name - call it 'Work'. The Controller method - 'getDone', and leave Type to 'Default' and then save. [00:07:50](https://www.youtube.com/watch?v=VyBxWpJWb40&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m50s) In the Controller method there is a function called 'getDone'. In the(PHP controller method) a public function is placed. This time we will get the model and do something in the model. You can also get the item values. Since the moment this button is clicked, you are inside of the item and it automatically submit the form. The values of those items can be grabbed but it may be different values than that which are in the database. [00:08:36](https://www.youtube.com/watch?v=VyBxWpJWb40&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m36s) The values could be changed, by clicking that button, and it will submit these changed values. Yet those values have not been saved to the database.<<<<<<
|
||||
Now let us go back to editing that functionality there, and show some more options('Look'). Go to custom buttons. Add another button. Target - call it 'single'. Name - call it 'Work'. The Controller method - 'getDone', and leave Type to 'Default' and then save. [00:07:50](https://www.youtube.com/watch?v=VyBxWpJWb40&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m50s) In the Controller method there is a function called 'getDone'. In the(PHP controller method) a public function is placed. This time we will get the model and do something in the model. You can also get the item values. When this button is clicked, the item opens and it automatically submit the form. It is possible to grab the item's values but the values may differ from those in the database. [00:08:36](https://www.youtube.com/watch?v=VyBxWpJWb40&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m36s) The values could be changed, by clicking that button, and it will submit these changed values. Yet those values have not been saved to the database.<<<<<<
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user