[luci] how to control the property of buttons in a map?

Seamus Tuohy s2e at opentechinstitute.org
Wed Mar 5 15:27:38 CET 2014


Hello 刘岚,

The buttons can be controlled through the "flow" property of a map. This
value is not set in the model, but in the controller entry for that page.

The options are:
{ skip, autoapply, hidesavebtn, hideresetbtn, hideapplybtn }

skip: If true ADD the skip button.
autoapply: if true (and hideapplybtn not true) HIDE submit button.
hideapplybtn: if true (and autoapply not true) HIDE submit button.
hidesavebtn: If true HIDE the save button
hideresetbtn: if true HIDE the reset button.


These options are set as bool values in a table. This table is passed as
the second value of the cbi call.

entry({"admin", "my_page"}, cbi("admin/my_page", {skip=true,
autoapply=false}), translate("My Page"), 15)


Hope that lets you do what you need to do.

s2e

On 03/05/2014 07:04 AM, 刘岚 wrote:
> Dear all I want to change some property of buttons in a map(not a
> simpleform).For example, I want to show the button "save & apply" and
> hide the other two or only show one of them in a page.How can I do
> this?thanks!
> 
> 
> 
> _______________________________________________ luci mailing list 
> luci at lists.subsignal.org 
> https://lists.subsignal.org/mailman/listinfo/luci
> 


More information about the luci mailing list