xowiki::FormPage instproc www-toggle-modebutton (public)
<instance of xowiki::FormPage> www-toggle-modebutton
Defined in /var/www/openacs.org/packages/xowiki/tcl/xowiki-www-procs.tcl
AJAX called function, called via POST. The function toggles the state of a button in the backend. The client provides the name of the button as form field named "button". If none is provided, the button is named as default "admin"
- Testcases:
- No testcase defined.
Source code: # # Check, if this function was called via POST # if {[ns_conn method] ne "POST"} { error "method should be called via POST" } # # Get the toggle name. Modebuttons are named like: # # ::xowiki::mode::admin # set button [ns_queryget button admin] ::xowiki::mode::$button toggle ns_return 200 text/plain okXQL Not present: Generic, PostgreSQL, Oracle