xowiki::FormPage instproc www-toggle-modebutton (public)

 <instance of xowiki::FormPage[i]> www-toggle-modebutton

Defined in 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"

Partial Call Graph (max 5 caller/called nodes):
%3

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 ok
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: