mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
Prepend server_dir to form actions that use absolute paths.
This commit is contained in:
parent
77948f0e96
commit
60ea9f43cd
@ -68,7 +68,7 @@ some other websites business model.</p>
|
||||
main="""
|
||||
"""
|
||||
form = Form(title="Configuration",
|
||||
action="/apps/owncloud",
|
||||
action=cfg.server_dir + "/apps/owncloud",
|
||||
name="configure_owncloud",
|
||||
message='')
|
||||
form.checkbox(_("Enable Owncloud"), name="owncloud_enable", id="owncloud_enable", checked=checkedinfo['enable'])
|
||||
|
||||
@ -138,7 +138,7 @@ class wan(FormPlugin, PagePlugin):
|
||||
exec("if not '%(k)s' in kwargs: store['%(k)s'] = kwargs['%(k)s'] = %(c)s" % {'k':k, 'c':c})
|
||||
|
||||
form = Form(title="WAN Connection",
|
||||
action="/router/setup/wan/index",
|
||||
action=cfg.server_dir + "/router/setup/wan/index",
|
||||
name="wan_connection_form",
|
||||
message=message)
|
||||
form.dropdown('Connection Type', vals=["DHCP", "Static IP"], id="connect_type", onchange="hideshow_static()")
|
||||
|
||||
@ -43,7 +43,7 @@ class xmpp(PagePlugin):
|
||||
|
||||
main = "<p>XMPP Server Configuration</p>"
|
||||
form = Form(title="Configuration",
|
||||
action="/services/xmpp",
|
||||
action=cfg.server_dir + "/services/xmpp",
|
||||
name="configure_xmpp",
|
||||
message='')
|
||||
form.checkbox(_("Allow In-Band Registration"), name="xmpp_inband_enable",
|
||||
@ -66,7 +66,7 @@ class register(FormPlugin, PagePlugin):
|
||||
|
||||
def main(self, username='', message=None, *args, **kwargs):
|
||||
form = Form(title="Register XMPP Account",
|
||||
action="/services/xmpp/register/index",
|
||||
action=cfg.server_dir + "/services/xmpp/register/index",
|
||||
name="register_xmpp_form",
|
||||
message=message)
|
||||
form.text_input(_("Username"), name="username", value=username)
|
||||
|
||||
@ -108,7 +108,7 @@ class general(FormPlugin, PagePlugin):
|
||||
|
||||
## And now, the form.
|
||||
form = Form(title=_("General Config"),
|
||||
action="/sys/config/general/index",
|
||||
action=cfg.server_dir + "/sys/config/general/index",
|
||||
name="config_general_form",
|
||||
message=message )
|
||||
form.html(self.help())
|
||||
|
||||
@ -47,7 +47,7 @@ class experts(FormPlugin, PagePlugin):
|
||||
expert = cfg.users.expert()
|
||||
cfg.log("Expert mode is %s" % expert)
|
||||
form = Form(title=_("Expert Mode"),
|
||||
action="/sys/config/experts",
|
||||
action=cfg.server_dir + "/sys/config/experts",
|
||||
name="expert_mode_form",
|
||||
message=message )
|
||||
form.html(self.help())
|
||||
|
||||
@ -33,7 +33,7 @@ class add(FormPlugin, PagePlugin):
|
||||
|
||||
def main(self, username='', name='', email='', message=None, *args, **kwargs):
|
||||
form = Form(title="Add User",
|
||||
action="/sys/users/add/index",
|
||||
action=cfg.server_dir + "/sys/users/add/index",
|
||||
onsubmit="return md5ify('add_user_form', 'password')",
|
||||
name="add_user_form",
|
||||
message=message)
|
||||
@ -81,7 +81,7 @@ class edit(FormPlugin, PagePlugin):
|
||||
|
||||
def main(self, msg=''):
|
||||
users = cfg.users.get_all()
|
||||
add_form = Form(title=_("Edit or Delete User"), action="/sys/users/edit", message=msg)
|
||||
add_form = Form(title=_("Edit or Delete User"), action=cfg.server_dir + "/sys/users/edit", message=msg)
|
||||
add_form.html('<span class="indent"><strong>Delete</strong><br /></span>')
|
||||
for uname in users:
|
||||
user = User(uname[1])
|
||||
|
||||
@ -57,7 +57,7 @@ class wan(FormPlugin, PagePlugin):
|
||||
exec("if not '%(k)s' in kwargs: store['%(k)s'] = kwargs['%(k)s'] = %(c)s" % {'k':k, 'c':c})
|
||||
|
||||
form = Form(title=_("Accessing the %s" % cfg.box_name),
|
||||
action="/sys/config/wan",
|
||||
action=cfg.server_dir + "/sys/config/wan",
|
||||
name="admin_wan_form",
|
||||
message=message )
|
||||
form.html(self.help())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user