summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO5
-rw-r--r--fonts/loader.gifbin0 -> 673 bytes
-rw-r--r--inc/configmodule/adauth.inc.php3
-rw-r--r--inc/configmodule/ldapauth.inc.php3
-rw-r--r--inc/dictionary.inc.php20
-rw-r--r--inc/event.inc.php19
-rw-r--r--inc/message.inc.php6
-rw-r--r--inc/paginate.inc.php2
-rw-r--r--inc/render.inc.php86
-rw-r--r--inc/taskmanagercallback.inc.php7
-rw-r--r--inc/trigger.inc.php1
-rw-r--r--inc/user.inc.php23
-rw-r--r--index.php13
-rw-r--r--lang/de/messages-hardcoded.json3
-rw-r--r--lang/de/modules/adduser.json8
-rw-r--r--lang/de/modules/backup.json14
-rw-r--r--lang/de/templates/baseconfig/_page.json10
-rw-r--r--lang/de/templates/page-news.json1
-rw-r--r--lang/de/templates/serversetup/ipxe.json1
-rw-r--r--lang/de/templates/sysconfig/ad_ldap-homedir.json19
-rw-r--r--lang/en/messages-hardcoded.json38
-rw-r--r--lang/en/modules/adduser/page-adduser.json (renamed from lang/en/templates/page-adduser.json)0
-rw-r--r--lang/en/modules/backup/_page.json (renamed from lang/en/templates/backup/_page.json)0
-rw-r--r--lang/en/modules/backup/restore.json (renamed from lang/en/templates/backup/restore.json)0
-rw-r--r--lang/en/modules/baseconfig/_page.json (renamed from lang/en/templates/baseconfig/_page.json)0
-rw-r--r--lang/en/modules/citymanagement/citymanagement.json13
-rw-r--r--lang/en/modules/dozmod/images-delete.json (renamed from lang/en/templates/dozmod/images-delete.json)0
-rw-r--r--lang/en/modules/dozmod/mailconfig.json (renamed from lang/en/templates/dozmod/mailconfig.json)0
-rw-r--r--lang/en/modules/dozmod/orglist.json (renamed from lang/en/templates/dozmod/orglist.json)0
-rw-r--r--lang/en/modules/dozmod/userlist.json (renamed from lang/en/templates/dozmod/userlist.json)0
-rw-r--r--lang/en/modules/eventlog/_page.json (renamed from lang/en/templates/eventlog/_page.json)0
-rw-r--r--lang/en/modules/internetaccess/_page.json (renamed from lang/en/templates/internetaccess/_page.json)0
-rw-r--r--lang/en/modules/internetaccess/restart.json (renamed from lang/en/templates/internetaccess/restart.json)0
-rw-r--r--lang/en/modules/locations/location-subnets.json (renamed from lang/en/templates/locations/location-subnets.json)0
-rw-r--r--lang/en/modules/locations/locations.json (renamed from lang/en/templates/locations/locations.json)0
-rw-r--r--lang/en/modules/locations/subnets.json (renamed from lang/en/templates/locations/subnets.json)0
-rw-r--r--lang/en/modules/main/dialog-generic.json (renamed from lang/en/templates/dialog-generic.json)0
-rw-r--r--lang/en/modules/main/main-menu.json (renamed from lang/en/templates/main-menu.json)0
-rw-r--r--lang/en/modules/main/messagebox-warning.json (renamed from lang/en/templates/messagebox-warning.json)0
-rw-r--r--lang/en/modules/main/page-main-guest.json (renamed from lang/en/templates/page-main-guest.json)0
-rw-r--r--lang/en/modules/main/page-main.json (renamed from lang/en/templates/page-main.json)0
-rw-r--r--lang/en/modules/main/pagenav.json (renamed from lang/en/templates/pagenav.json)0
-rw-r--r--lang/en/modules/messagebox-error.json (renamed from lang/en/templates/messagebox-error.json)0
-rw-r--r--lang/en/modules/messagebox-info.json (renamed from lang/en/templates/messagebox-info.json)0
-rw-r--r--lang/en/modules/messagebox-success.json (renamed from lang/en/templates/messagebox-success.json)0
-rw-r--r--lang/en/modules/minilinux/download.json (renamed from lang/en/templates/minilinux/download.json)0
-rw-r--r--lang/en/modules/minilinux/filelist.json (renamed from lang/en/templates/minilinux/filelist.json)0
-rw-r--r--lang/en/modules/minilinux/page-minilinux.json (renamed from lang/en/templates/page-minilinux.json)0
-rw-r--r--lang/en/modules/news/page-news.json (renamed from lang/en/templates/page-news.json)0
-rw-r--r--lang/en/modules/pagenav.json (renamed from lang/en/templates/systemstatus/addresses.json)0
-rw-r--r--lang/en/modules/serversetup/ipaddress.json (renamed from lang/en/templates/serversetup/ipaddress.json)0
-rw-r--r--lang/en/modules/serversetup/ipxe.json (renamed from lang/en/templates/serversetup/ipxe.json)17
-rw-r--r--lang/en/modules/serversetup/ipxe_update.json (renamed from lang/en/templates/serversetup/ipxe_update.json)0
-rw-r--r--lang/en/modules/session/page-login.json (renamed from lang/en/templates/page-login.json)0
-rw-r--r--lang/en/modules/statistics/clientlist.json (renamed from lang/en/templates/statistics/clientlist.json)0
-rw-r--r--lang/en/modules/statistics/cpumodels.json (renamed from lang/en/templates/statistics/cpumodels.json)0
-rw-r--r--lang/en/modules/statistics/id44.json (renamed from lang/en/templates/statistics/id44.json)0
-rw-r--r--lang/en/modules/statistics/kvmstate.json (renamed from lang/en/templates/statistics/kvmstate.json)0
-rw-r--r--lang/en/modules/statistics/machine-hdds.json (renamed from lang/en/templates/statistics/machine-hdds.json)0
-rw-r--r--lang/en/modules/statistics/machine-main.json (renamed from lang/en/templates/statistics/machine-main.json)0
-rw-r--r--lang/en/modules/statistics/machine-notes.json (renamed from lang/en/templates/statistics/machine-notes.json)0
-rw-r--r--lang/en/modules/statistics/machine-usage.json (renamed from lang/en/templates/statistics/machine-usage.json)0
-rw-r--r--lang/en/modules/statistics/memory.json (renamed from lang/en/templates/statistics/memory.json)0
-rw-r--r--lang/en/modules/statistics/newclients.json (renamed from lang/en/templates/statistics/newclients.json)0
-rw-r--r--lang/en/modules/statistics/summary.json (renamed from lang/en/templates/statistics/summary.json)0
-rw-r--r--lang/en/modules/statistics/syslog.json (renamed from lang/en/templates/statistics/syslog.json)0
-rw-r--r--lang/en/modules/sysconfig/_page.json (renamed from lang/en/templates/sysconfig/_page.json)0
-rw-r--r--lang/en/modules/sysconfig/ad-finish.json (renamed from lang/en/templates/sysconfig/ad-finish.json)0
-rw-r--r--lang/en/modules/sysconfig/ad-selfsearch.json (renamed from lang/en/templates/sysconfig/ad-selfsearch.json)0
-rw-r--r--lang/en/modules/sysconfig/ad-start.json (renamed from lang/en/templates/sysconfig/ad-start.json)0
-rw-r--r--lang/en/modules/sysconfig/ad_ldap-checkconnection.json (renamed from lang/en/templates/sysconfig/ad_ldap-checkconnection.json)0
-rw-r--r--lang/en/modules/sysconfig/ad_ldap-checkcredentials.json (renamed from lang/en/templates/sysconfig/ad_ldap-checkcredentials.json)0
-rw-r--r--lang/en/modules/sysconfig/ad_ldap-homedir.json (renamed from lang/en/templates/sysconfig/ad_ldap-homedir.json)3
-rw-r--r--lang/en/modules/sysconfig/branding-check.json (renamed from lang/en/templates/sysconfig/branding-check.json)0
-rw-r--r--lang/en/modules/sysconfig/branding-start.json (renamed from lang/en/templates/sysconfig/branding-start.json)0
-rw-r--r--lang/en/modules/sysconfig/cfg-finish.json (renamed from lang/en/templates/sysconfig/cfg-finish.json)0
-rw-r--r--lang/en/modules/sysconfig/cfg-start.json (renamed from lang/en/templates/sysconfig/cfg-start.json)3
-rw-r--r--lang/en/modules/sysconfig/config-module-list.json (renamed from lang/en/templates/sysconfig/config-module-list.json)0
-rw-r--r--lang/en/modules/sysconfig/custom-filelist.json (renamed from lang/en/templates/sysconfig/custom-filelist.json)0
-rw-r--r--lang/en/modules/sysconfig/custom-fileselect.json (renamed from lang/en/templates/sysconfig/custom-fileselect.json)0
-rw-r--r--lang/en/modules/sysconfig/custom-upload.json (renamed from lang/en/templates/sysconfig/custom-upload.json)0
-rw-r--r--lang/en/modules/sysconfig/ldap-checkconnection.json (renamed from lang/en/templates/sysconfig/ldap-checkconnection.json)0
-rw-r--r--lang/en/modules/sysconfig/ldap-checkcredentials.json (renamed from lang/en/templates/sysconfig/ldap-checkcredentials.json)0
-rw-r--r--lang/en/modules/sysconfig/ldap-finish.json (renamed from lang/en/templates/sysconfig/ldap-finish.json)0
-rw-r--r--lang/en/modules/sysconfig/ldap-start.json (renamed from lang/en/templates/sysconfig/ldap-start.json)0
-rw-r--r--lang/en/modules/sysconfig/sshconfig-start.json (renamed from lang/en/templates/sysconfig/sshconfig-start.json)0
-rw-r--r--lang/en/modules/sysconfig/start.json (renamed from lang/en/templates/sysconfig/start.json)0
-rw-r--r--lang/en/modules/syslog/page-syslog.json (renamed from lang/en/templates/page-syslog.json)0
-rw-r--r--lang/en/modules/systemstatus/_page.json (renamed from lang/en/templates/systemstatus/_page.json)0
-rw-r--r--lang/en/modules/systemstatus/addresses.json (renamed from lang/en/templates/systemstatus/services.json)0
-rw-r--r--lang/en/modules/systemstatus/diskstat.json (renamed from lang/en/templates/systemstatus/diskstat.json)0
-rw-r--r--lang/en/modules/systemstatus/services.json2
-rw-r--r--lang/en/modules/systemstatus/systeminfo.json (renamed from lang/en/templates/systemstatus/systeminfo.json)0
-rw-r--r--lang/en/modules/translation/_page.json (renamed from lang/en/templates/translation/_page.json)0
-rw-r--r--lang/en/modules/translation/edit.json (renamed from lang/en/templates/translation/edit.json)0
-rw-r--r--lang/en/modules/translation/template-list.json (renamed from lang/en/templates/translation/template-list.json)0
-rw-r--r--lang/en/modules/usermanagement/user-management.json18
-rw-r--r--lang/en/modules/vmstore/mount.json (renamed from lang/en/templates/vmstore/mount.json)0
-rw-r--r--lang/en/modules/vmstore/page-vmstore.json (renamed from lang/en/templates/page-vmstore.json)0
-rw-r--r--lang/en/modules/webinterface/httpd-restart.json (renamed from lang/en/templates/webinterface/httpd-restart.json)0
-rw-r--r--lang/en/modules/webinterface/https.json (renamed from lang/en/templates/webinterface/https.json)0
-rw-r--r--lang/en/modules/webinterface/passwords.json (renamed from lang/en/templates/webinterface/passwords.json)0
-rw-r--r--lang/pt/templates/sysconfig/ad_ldap-homedir.json3
-rw-r--r--modules/adduser/config.json4
-rw-r--r--modules/adduser/module.inc.php (renamed from modules/adduser.inc.php)0
-rw-r--r--modules/adduser/templates/page-adduser.html (renamed from templates/page-adduser.html)0
-rw-r--r--modules/backup/config.json4
-rw-r--r--modules/backup/module.inc.php (renamed from modules/backup.inc.php)36
-rw-r--r--modules/backup/templates/_page.html (renamed from templates/backup/_page.html)0
-rw-r--r--modules/backup/templates/restore.html (renamed from templates/backup/restore.html)1
-rw-r--r--modules/baseconfig/config.json4
-rw-r--r--modules/baseconfig/module.inc.php (renamed from modules/baseconfig.inc.php)4
-rw-r--r--modules/baseconfig/templates/_page.html186
-rw-r--r--modules/citymanagement/config.json5
-rw-r--r--modules/citymanagement/module.inc.php81
-rw-r--r--modules/citymanagement/templates/page-citymanagement.html77
-rw-r--r--modules/dozmod/config.json4
-rw-r--r--modules/dozmod/module.inc.php (renamed from modules/dozmod.inc.php)8
-rw-r--r--modules/dozmod/templates/images-delete.html (renamed from templates/dozmod/images-delete.html)0
-rw-r--r--modules/dozmod/templates/mailconfig.html (renamed from templates/dozmod/mailconfig.html)0
-rw-r--r--modules/dozmod/templates/orglist.html (renamed from templates/dozmod/orglist.html)0
-rw-r--r--modules/dozmod/templates/userlist.html (renamed from templates/dozmod/userlist.html)0
-rw-r--r--modules/eventlog/config.json4
-rw-r--r--modules/eventlog/module.inc.php (renamed from modules/eventlog.inc.php)2
-rw-r--r--modules/eventlog/templates/_page.html (renamed from templates/eventlog/_page.html)0
-rw-r--r--modules/imgmanagement/config.json5
-rw-r--r--modules/imgmanagement/module.inc.php76
-rw-r--r--modules/imgmanagement/templates/page-imgmanagement.html46
-rw-r--r--modules/internetaccess/config.json4
-rw-r--r--modules/internetaccess/module.inc.php (renamed from modules/internetaccess.inc.php)4
-rw-r--r--modules/internetaccess/templates/_page.html (renamed from templates/internetaccess/_page.html)0
-rw-r--r--modules/internetaccess/templates/restart.html (renamed from templates/internetaccess/restart.html)0
-rw-r--r--modules/locations/config.json4
-rw-r--r--modules/locations/module.inc.php (renamed from modules/locations.inc.php)6
-rw-r--r--modules/locations/templates/location-subnets.html (renamed from templates/locations/location-subnets.html)0
-rw-r--r--modules/locations/templates/locations.html (renamed from templates/locations/locations.html)0
-rw-r--r--modules/locations/templates/subnets.html (renamed from templates/locations/subnets.html)0
-rw-r--r--modules/main/config.json4
-rw-r--r--modules/main/module.inc.php (renamed from modules/main.inc.php)16
-rw-r--r--modules/main/templates/dialog-generic.html (renamed from templates/dialog-generic.html)0
-rw-r--r--modules/main/templates/footer.html (renamed from templates/footer.html)0
-rw-r--r--modules/main/templates/main-menu.html51
-rw-r--r--modules/main/templates/main-menu.html.topnavbar (renamed from templates/main-menu.html)9
-rw-r--r--modules/main/templates/messagebox-error.html1
-rw-r--r--modules/main/templates/messagebox-info.html1
-rw-r--r--modules/main/templates/messagebox-success.html1
-rw-r--r--modules/main/templates/messagebox-warning.html1
-rw-r--r--modules/main/templates/page-login.html (renamed from templates/page-login.html)0
-rw-r--r--modules/main/templates/page-main-guest.html15
-rw-r--r--modules/main/templates/page-main.html (renamed from templates/page-main.html)1
-rw-r--r--modules/main/templates/page-minilinux.html (renamed from templates/page-minilinux.html)0
-rw-r--r--modules/main/templates/page-news.html (renamed from templates/page-news.html)0
-rw-r--r--modules/main/templates/page-syslog.html (renamed from templates/page-syslog.html)0
-rw-r--r--modules/main/templates/page-vmstore.html (renamed from templates/page-vmstore.html)0
-rw-r--r--modules/main/templates/pagenav.html (renamed from templates/pagenav.html)0
-rw-r--r--modules/main/templates/tm-callback-trigger.html (renamed from templates/tm-callback-trigger.html)0
-rw-r--r--modules/minilinux/config.json4
-rw-r--r--modules/minilinux/module.inc.php (renamed from modules/minilinux.inc.php)8
-rw-r--r--modules/minilinux/templates/download.html (renamed from templates/minilinux/download.html)0
-rw-r--r--modules/minilinux/templates/filelist.html (renamed from templates/minilinux/filelist.html)0
-rw-r--r--modules/minilinux/templates/page-minilinux.html28
-rw-r--r--modules/news/config.json4
-rw-r--r--modules/news/module.inc.php (renamed from modules/news.inc.php)2
-rw-r--r--modules/news/templates/page-news.html57
-rw-r--r--modules/serversetup/config.json4
-rw-r--r--modules/serversetup/module.inc.php (renamed from modules/serversetup.inc.php)59
-rw-r--r--modules/serversetup/templates/ipaddress.html (renamed from templates/serversetup/ipaddress.html)4
-rw-r--r--modules/serversetup/templates/ipxe.html149
-rw-r--r--modules/serversetup/templates/ipxe_update.html (renamed from templates/serversetup/ipxe_update.html)0
-rw-r--r--modules/session/config.json4
-rw-r--r--modules/session/module.inc.php (renamed from modules/session.inc.php)2
-rw-r--r--modules/session/templates/page-login.html11
-rw-r--r--modules/statistics/config.json5
-rw-r--r--modules/statistics/module.inc.php (renamed from modules/statistics.inc.php)33
-rw-r--r--modules/statistics/templates/clientlist.html (renamed from templates/statistics/clientlist.html)0
-rw-r--r--modules/statistics/templates/cpumodels.html (renamed from templates/statistics/cpumodels.html)0
-rw-r--r--modules/statistics/templates/id44.html (renamed from templates/statistics/id44.html)0
-rw-r--r--modules/statistics/templates/kvmstate.html (renamed from templates/statistics/kvmstate.html)0
-rw-r--r--modules/statistics/templates/machine-hdds.html (renamed from templates/statistics/machine-hdds.html)0
-rw-r--r--modules/statistics/templates/machine-main.html (renamed from templates/statistics/machine-main.html)0
-rw-r--r--modules/statistics/templates/machine-notes.html (renamed from templates/statistics/machine-notes.html)0
-rw-r--r--modules/statistics/templates/machine-usage.html (renamed from templates/statistics/machine-usage.html)0
-rw-r--r--modules/statistics/templates/memory.html (renamed from templates/statistics/memory.html)0
-rw-r--r--modules/statistics/templates/newclients.html (renamed from templates/statistics/newclients.html)0
-rw-r--r--modules/statistics/templates/summary.html (renamed from templates/statistics/summary.html)0
-rw-r--r--modules/statistics/templates/syslog.html (renamed from templates/statistics/syslog.html)0
-rw-r--r--modules/support/config.json4
-rw-r--r--modules/support/module.inc.php77
-rw-r--r--modules/support/templates/page-faq.html58
-rw-r--r--modules/support/templates/page-support.html67
-rw-r--r--modules/sysconfig/addconfig.inc.php4
-rw-r--r--modules/sysconfig/addmodule.inc.php31
-rw-r--r--modules/sysconfig/addmodule_adauth.inc.php108
-rw-r--r--modules/sysconfig/addmodule_branding.inc.php4
-rw-r--r--modules/sysconfig/addmodule_custommodule.inc.php4
-rw-r--r--modules/sysconfig/addmodule_ldapauth.inc.php92
-rw-r--r--modules/sysconfig/addmodule_sshconfig.inc.php2
-rw-r--r--modules/sysconfig/config.json4
-rw-r--r--modules/sysconfig/module.inc.php (renamed from modules/sysconfig.inc.php)93
-rw-r--r--modules/sysconfig/templates/_page.html (renamed from templates/sysconfig/_page.html)0
-rw-r--r--modules/sysconfig/templates/ad-finish.html (renamed from templates/sysconfig/ad-finish.html)0
-rw-r--r--modules/sysconfig/templates/ad-selfsearch.html (renamed from templates/sysconfig/ad-selfsearch.html)0
-rw-r--r--modules/sysconfig/templates/ad-start.html (renamed from templates/sysconfig/ad-start.html)0
-rw-r--r--modules/sysconfig/templates/ad_ldap-checkconnection.html (renamed from templates/sysconfig/ad_ldap-checkconnection.html)0
-rw-r--r--modules/sysconfig/templates/ad_ldap-checkcredentials.html (renamed from templates/sysconfig/ad_ldap-checkcredentials.html)0
-rw-r--r--modules/sysconfig/templates/branding-check.html (renamed from templates/sysconfig/branding-check.html)0
-rw-r--r--modules/sysconfig/templates/branding-start.html (renamed from templates/sysconfig/branding-start.html)0
-rw-r--r--modules/sysconfig/templates/cfg-finish.html (renamed from templates/sysconfig/cfg-finish.html)0
-rw-r--r--modules/sysconfig/templates/cfg-start.html (renamed from templates/sysconfig/cfg-start.html)0
-rw-r--r--modules/sysconfig/templates/config-module-list.html (renamed from templates/sysconfig/config-module-list.html)0
-rw-r--r--modules/sysconfig/templates/custom-filelist.html (renamed from templates/sysconfig/custom-filelist.html)0
-rw-r--r--modules/sysconfig/templates/custom-fileselect.html (renamed from templates/sysconfig/custom-fileselect.html)0
-rw-r--r--modules/sysconfig/templates/custom-upload.html (renamed from templates/sysconfig/custom-upload.html)0
-rw-r--r--modules/sysconfig/templates/ldap-finish.html (renamed from templates/sysconfig/ldap-finish.html)0
-rw-r--r--modules/sysconfig/templates/ldap-start.html (renamed from templates/sysconfig/ldap-start.html)0
-rw-r--r--modules/sysconfig/templates/sshconfig-start.html (renamed from templates/sysconfig/sshconfig-start.html)0
-rw-r--r--modules/sysconfig/templates/start.html (renamed from templates/sysconfig/start.html)0
-rw-r--r--modules/sysconfignew/config.json4
-rw-r--r--modules/sysconfignew/module.inc.php113
-rw-r--r--modules/sysconfignew/templates/_pagenew.html190
-rw-r--r--modules/sysconfignew/templates/module-editor.html269
-rw-r--r--modules/syslog/config.json4
-rw-r--r--modules/syslog/module.inc.php (renamed from modules/syslog.inc.php)0
-rw-r--r--modules/syslog/templates/page-syslog.html58
-rw-r--r--modules/systemstatus/config.json4
-rw-r--r--modules/systemstatus/module.inc.php (renamed from modules/systemstatus.inc.php)10
-rw-r--r--modules/systemstatus/templates/_page.html (renamed from templates/systemstatus/_page.html)0
-rw-r--r--modules/systemstatus/templates/addresses.html (renamed from templates/systemstatus/addresses.html)0
-rw-r--r--modules/systemstatus/templates/diskstat.html (renamed from templates/systemstatus/diskstat.html)0
-rw-r--r--modules/systemstatus/templates/services.html (renamed from templates/systemstatus/services.html)0
-rw-r--r--modules/systemstatus/templates/systeminfo.html (renamed from templates/systemstatus/systeminfo.html)0
-rw-r--r--modules/translation/config.json4
-rw-r--r--modules/translation/module.inc.php (renamed from modules/translation.inc.php)140
-rw-r--r--modules/translation/templates/_page.html (renamed from templates/translation/_page.html)2
-rw-r--r--modules/translation/templates/edit.html (renamed from templates/translation/edit.html)0
-rw-r--r--modules/translation/templates/module-list.html32
-rw-r--r--modules/translation/templates/template-list.html (renamed from templates/translation/template-list.html)0
-rw-r--r--modules/usermanagement/config.json5
-rw-r--r--modules/usermanagement/module.inc.php109
-rw-r--r--modules/usermanagement/templates/user-management.html127
-rw-r--r--modules/vmstore/config.json4
-rw-r--r--modules/vmstore/module.inc.php (renamed from modules/vmstore.inc.php)2
-rw-r--r--modules/vmstore/templates/mount.html (renamed from templates/vmstore/mount.html)0
-rw-r--r--modules/vmstore/templates/page-vmstore.html111
-rw-r--r--modules/webinterface/config.json4
-rw-r--r--modules/webinterface/module.inc.php (renamed from modules/webinterface.inc.php)6
-rw-r--r--modules/webinterface/templates/httpd-restart.html (renamed from templates/webinterface/httpd-restart.html)0
-rw-r--r--modules/webinterface/templates/https.html (renamed from templates/webinterface/https.html)0
-rw-r--r--modules/webinterface/templates/passwords.html (renamed from templates/webinterface/passwords.html)0
-rw-r--r--script/bootstrap-switch.js710
-rw-r--r--style/bootstrap-switch.css196
-rw-r--r--style/categories.json7
-rw-r--r--style/default.css192
-rw-r--r--templates/baseconfig/_page.html42
-rw-r--r--templates/messagebox-error.html1
-rw-r--r--templates/messagebox-info.html1
-rw-r--r--templates/messagebox-success.html1
-rw-r--r--templates/messagebox-warning.html1
-rw-r--r--templates/page-main-guest.html13
-rw-r--r--templates/serversetup/ipxe.html70
-rw-r--r--templates/sysconfig/ad_ldap-homedir.html79
261 files changed, 3837 insertions, 602 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 00000000..a1a4a559
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+fix translations path (lang/<lang>/...) for de, pt
+fix translations page for templates/modules
+fix sql setup scripts for c3sl's new stuff
+fix support page
+rework/fix c3sl's partition / user config variables (baseconfig)
diff --git a/fonts/loader.gif b/fonts/loader.gif
new file mode 100644
index 00000000..d0bce154
--- /dev/null
+++ b/fonts/loader.gif
Binary files differ
diff --git a/inc/configmodule/adauth.inc.php b/inc/configmodule/adauth.inc.php
index 9fe32f43..efc8afd7 100644
--- a/inc/configmodule/adauth.inc.php
+++ b/inc/configmodule/adauth.inc.php
@@ -14,8 +14,7 @@ class ConfigModule_AdAuth extends ConfigModule
const VERSION = 1;
private static $REQUIRED_FIELDS = array('server', 'searchbase', 'binddn');
- private static $OPTIONAL_FIELDS = array('bindpw', 'home', 'ssl', 'fingerprint', 'certificate', 'homeattr',
- 'shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia', 'shareOther', 'shareHomeDrive');
+ private static $OPTIONAL_FIELDS = array('bindpw', 'home', 'ssl', 'fingerprint', 'certificate', 'homeattr');
protected function generateInternal($tgz, $parent)
{
diff --git a/inc/configmodule/ldapauth.inc.php b/inc/configmodule/ldapauth.inc.php
index 118e324f..67b1997a 100644
--- a/inc/configmodule/ldapauth.inc.php
+++ b/inc/configmodule/ldapauth.inc.php
@@ -14,8 +14,7 @@ class ConfigModule_LdapAuth extends ConfigModule
const VERSION = 1;
private static $REQUIRED_FIELDS = array('server', 'searchbase');
- private static $OPTIONAL_FIELDS = array('binddn', 'bindpw', 'home', 'ssl', 'fingerprint', 'certificate',
- 'shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia', 'shareOther', 'shareHomeDrive');
+ private static $OPTIONAL_FIELDS = array('binddn', 'bindpw', 'home', 'ssl', 'fingerprint', 'certificate');
protected function generateInternal($tgz, $parent)
{
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php
index fc509112..ec4f4195 100644
--- a/inc/dictionary.inc.php
+++ b/inc/dictionary.inc.php
@@ -51,21 +51,26 @@ class Dictionary
define('LANG', $language);
}
- public static function getArrayTemplate($template, $lang = false)
+ public static function getArrayTemplate($template, $module = false, $lang = false)
{
- return self::getArray('templates/' . $template, $lang);
+ return self::getArray($module . "/" . $template, $lang);
}
- public static function getArray($section, $lang = false)
+ public static function getArray($module, $lang = false, $isMessage = false)
{
if ($lang === false)
$lang = LANG;
- $file = Util::safePath("lang/" . $lang . "/" . $section . ".json");
+ if(!$isMessage)
+ $file = Util::safePath("lang/" . $lang . "/modules/" . $module . ".json");
+ else
+ $file = Util::safePath("lang/" . $lang . "/" . $module . ".json");
+
if (isset(self::$stringCache[$file]))
return self::$stringCache[$file];
$content = @file_get_contents($file);
- if ($content === false) // File does not exist for language
+ if ($content === false) {// File does not exist for language {
return array();
+ }
$json = json_decode($content, true);
if (!is_array($json))
return array();
@@ -83,9 +88,10 @@ class Dictionary
return "(missing: $string :missing)";
return self::$hardcodedMessages[$string];
}
- $strings = self::getArray($section);
- if (!isset($strings[$string]))
+ $strings = self::getArray($section, false, true);
+ if (!isset($strings[$string])) {
return "(missing: '$string' in '$section')";
+ }
return $strings[$string];
}
diff --git a/inc/event.inc.php b/inc/event.inc.php
index e014666a..01a148b0 100644
--- a/inc/event.inc.php
+++ b/inc/event.inc.php
@@ -26,7 +26,8 @@ class Event
$mountId = Trigger::mount();
$autoIp = Trigger::autoUpdateServerIp();
$ldadpId = Trigger::ldadp();
-
+ $ipxeId = Trigger::ipxe();
+
Taskmanager::submit('DozmodLauncher', array(
'operation' => 'start'
));
@@ -59,6 +60,17 @@ class Event
EventLog::failure("The server's IP address could not be determined automatically, and there is no valid address configured.");
$everythingFine = false;
}
+ // iPXE generation
+ if ($ipxeId === false) {
+ EventLog::failure('Cannot generate PXE menu: Taskmanager unreachable!');
+ $everythingFine = false;
+ } else {
+ $res = Taskmanager::waitComplete($ipxeId, 5000);
+ if (Taskmanager::isFailed($res)) {
+ EventLog::failure('Update PXE Menu failed', $res['data']['error']);
+ $everythingFine = false;
+ }
+ }
// Just so we know booting is done (and we don't expect any more errors from booting up)
if ($everythingFine) {
@@ -73,11 +85,9 @@ class Event
*/
public static function serverIpChanged()
{
+ error_log('Server ip changed');
global $tidIpxe;
$tidIpxe = Trigger::ipxe();
- if (is_string($tidIpxe)) {
- TaskmanagerCallback::addCallback($tidIpxe, 'cbIpxeBuilt');
- }
ConfigModule::serverIpChanged();
}
@@ -86,6 +96,7 @@ class Event
*/
public static function activeConfigChanged()
{
+ error_log('Active config changed');
$task = Trigger::ldadp();
TaskmanagerCallback::addCallback($task, 'ldadpStartup');
}
diff --git a/inc/message.inc.php b/inc/message.inc.php
index 472811ff..d2fd74b9 100644
--- a/inc/message.inc.php
+++ b/inc/message.inc.php
@@ -59,20 +59,22 @@ class Message
foreach ($item['params'] as $index => $text) {
$message = str_replace('{{' . $index . '}}', '<b>' . htmlspecialchars($text) . '</b>', $message);
}
- echo Render::parse('messagebox-' . $item['type'], array('message' => $message));
+ echo Render::parse('messagebox-' . $item['type'], array('message' => $message), 'main');
}
self::$list = array();
return;
}
// Non-Ajax
+ if (!self::$flushed) Render::openTag('div', array('class' => 'container'));
foreach (self::$list as $item) {
$message = Dictionary::getMessage($item['id']);
foreach ($item['params'] as $index => $text) {
$message = str_replace('{{' . $index . '}}', '<b>' . htmlspecialchars($text) . '</b>', $message);
}
- Render::addTemplate('messagebox-' . $item['type'], array('message' => $message));
+ Render::addTemplate('messagebox-' . $item['type'], array('message' => $message),'main');
self::$alreadyDisplayed[] = $item;
}
+ if (!self::$flushed) Render::closeTag('div');
self::$list = array();
self::$flushed = true;
}
diff --git a/inc/paginate.inc.php b/inc/paginate.inc.php
index 62345ffe..91f52077 100644
--- a/inc/paginate.inc.php
+++ b/inc/paginate.inc.php
@@ -104,7 +104,7 @@ class Paginate
$pages = Render::parse('pagenav', array(
'url' => $this->url,
'pages' => $pages,
- ));
+ ),'main');
$data['page'] = $this->currentPage;
$data['pagenav'] = $pages;
Render::addTemplate($template, $data);
diff --git a/inc/render.inc.php b/inc/render.inc.php
index 6de00eee..10d18514 100644
--- a/inc/render.inc.php
+++ b/inc/render.inc.php
@@ -18,6 +18,7 @@ class Render
private static $mustache = false;
private static $body = '';
private static $header = '';
+ private static $dashboard = '';
private static $footer = '';
private static $title = '';
private static $templateCache = array();
@@ -39,6 +40,9 @@ class Render
$zip = isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false);
if ($zip)
ob_start();
+ $page = strtolower($_GET['do']);
+ if(User::isLoggedIn())
+ self::createDashboard($page);
echo
'<!DOCTYPE html>
<html>
@@ -50,6 +54,9 @@ class Render
<link href="style/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="style/bootstrap-tagsinput.css" rel="stylesheet" media="screen">
<link href="style/default.css" rel="stylesheet" media="screen">
+ <link href="style/bootstrap-switch.css" rel="stylesheet" media="screen">
+
+ <script src="script/bootstrap-switch.js"></script>
<script type="text/javascript">
var TOKEN = "' . Session::get('token') . '";
</script>
@@ -58,11 +65,15 @@ class Render
,
' </head>
<body>
- <div class="container" id="mainpage">
+ <div class="container-fluid" id="mainpage">
+ <div class="row">
',
+ self::$dashboard
+ ,
self::$body
,
' </div>
+ </div>
<script src="script/jquery.js"></script>
<script src="script/bootstrap.min.js"></script>
<script src="script/taskmanager.js"></script>
@@ -129,9 +140,9 @@ class Render
/**
* Add the given template to the output, using the given params for placeholders in the template
*/
- public static function addTemplate($template, $params = false)
+ public static function addTemplate($template, $params = false, $module = false)
{
- self::$body .= self::parse($template, $params);
+ self::$body .= self::parse($template, $params, $module);
}
/**
@@ -148,7 +159,7 @@ class Render
'title' => $title,
'next' => $next,
'body' => self::parse($template, $params)
- ));
+ ), 'main');
}
/**
@@ -164,15 +175,19 @@ class Render
* @param string $template name of template, relative to templates/, without .html extension
* @return string Rendered template
*/
- public static function parse($template, $params = false)
+ public static function parse($template, $params = false, $module = false)
{
// Load html snippet
- $html = self::getTemplate($template);
+ $html = self::getTemplate($template,$module);
if ($html === false) {
return '<h3>Template ' . htmlspecialchars($template) . '</h3>' . nl2br(htmlspecialchars(print_r($params, true))) . '<hr>';
}
// Get all translated strings for this template
- $dictionary = Dictionary::getArrayTemplate($template);
+ if($module === false){
+ $module = strtolower(empty($_REQUEST['do']) ? 'main' : $_REQUEST['do']);
+ }
+ $dictionary = Dictionary::getArrayTemplate($template, $module);
+
// Now find all language tags in this array
preg_match_all('/{{(lang_.+?)}}/', $html, $out);
foreach ($out[1] as $tag) {
@@ -183,7 +198,7 @@ class Render
// Always add token to parameter list
if (is_array($params) || $params === false || is_null($params))
$params['token'] = Session::get('token');
- // Likewise, add currently selected language (its two letter code) to params
+ // Likewise, add currently selected language ( its two letter code) to params
$params['current_lang'] = LANG;
// Add desired password field type
$params['password_type'] = Property::getPasswordFieldType();
@@ -224,15 +239,66 @@ class Render
/**
* Private helper: Load the given template and return it
*/
- private static function getTemplate($template)
+ private static function getTemplate($template, $module = false)
{
if (isset(self::$templateCache[$template])) {
return self::$templateCache[$template];
}
+ // Select current module
+ if(!$module){
+ $module = strtolower(empty($_REQUEST['do']) ? 'Main' : $_REQUEST['do']);
+ }
// Load from disk
- $data = @file_get_contents('templates/' . $template . '.html');
+ $data = @file_get_contents('modules/' . $module . '/templates/' . $template . '.html');
+ if ($data === false)
+ $data = '<b>Non-existent template ' . $template . ' requested!</b>';
self::$templateCache[$template] = & $data;
return $data;
}
+ /**
+ * Create the dashboard menu
+ */
+ private static function createDashboard($page)
+ {
+ // Check all required modules
+ $requiredModules = array('adduser','main','session','translation','usermanagement');
+ $notFound = '';
+ foreach ($requiredModules as $module) {
+ if(!is_dir('modules/' . $module . '/')){
+ $notFound .= '\'' . $module . '\' ';
+ }
+ }
+ if(strlen($notFound) > 0){
+ Util::traceError('At least one required module was not found: ' . $notFound);
+ }else{
+ $modules = array_diff(scandir('modules/'), array('..', '.'));
+ $categories = array();
+ foreach ($modules as $module) {
+ $json = json_decode(file_get_contents("modules/" . $module . "/config.json"),true);
+ $categories[$json['category']][] = $module;
+ }
+ unset($categories['hidden']);
+ self::$dashboard = '<div class="col-sm-3 col-md-2 sidebar">';
+ foreach ($categories as $cat => $modules) {
+ self::$dashboard .= '<div class="dash-header"></span> <span class="glyphicon glyphicon-' . self::getGlyphicon($cat)
+ . '" aria-hidden="true"></span> ' . Dictionary::translate('lang_' . $cat) . '</div>';
+ self::$dashboard .= '<ul class="nav nav-sidebar">';
+ foreach ($modules as $module) {
+ self::$dashboard .= '<li class="' . (($page == $module) ? 'active' : '')
+ . '"><a href="?do=' . ucfirst($module) . '"> ' . (Dictionary::translate('lang_' . $module)) . '</a></li>';
+ }
+ self::$dashboard .= '</ul>';
+ }
+ self::$dashboard .= '</div> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">';
+ }
+ }
+
+ /**
+ * get categories glyph icons
+ */
+ private static function getGlyphicon($category){
+ return json_decode(file_get_contents("style/categories.json"),true)[$category];
+ }
+
}
diff --git a/inc/taskmanagercallback.inc.php b/inc/taskmanagercallback.inc.php
index efa5aacd..cec763fb 100644
--- a/inc/taskmanagercallback.inc.php
+++ b/inc/taskmanagercallback.inc.php
@@ -116,13 +116,6 @@ class TaskmanagerCallback
EventLog::warning("Could not generate Active Directory configuration", $task['data']['error']);
}
- public static function cbIpxeBuilt($task)
- {
- if (Taskmanager::isFailed($task)) {
- EventLog::warning("Could not recompile iPXE menu.", $task['data']['error']);
- }
- }
-
/**
* Generating a config module has finished.
*
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 0f7e1b13..353d6d69 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -15,6 +15,7 @@ class Trigger
* Compile iPXE pxelinux menu. Needs to be done whenever the server's IP
* address changes.
*
+ * @param boolean $force force recompilation even if it seems up to date
* @return boolean|string false if launching task failed, task-id otherwise
*/
public static function ipxe()
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 111849fe..d3cdc65a 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -12,6 +12,13 @@ class User
return self::$user !== false;
}
+ public static function getId()
+ {
+ if (!self::isLoggedIn())
+ return false;
+ return self::$user['userid'];
+ }
+
public static function getName()
{
if (!self::isLoggedIn())
@@ -58,6 +65,7 @@ class User
public static function logout()
{
+ error_log("in logout");
Session::delete();
Header('Location: ?do=Main&fromlogout');
exit(0);
@@ -81,4 +89,19 @@ class User
return self::$user['lasteventid'];
}
+ public static function addUser($data){
+ Database::exec ( "INSERT INTO user SET login = :login, passwd = :pass, fullname = :name, phone = :phone, email = :email, permissions = 4", $data );
+ $ret = Database::queryFirst('SELECT userid FROM user WHERE login = :user LIMIT 1', array('user' => $data['login']));
+ $user = array(
+ 'user' => $ret['userid']
+ );
+ Database::exec ( "INSERT INTO setting_partition SET partition_id = '44', size = '5G', mount_point = '/tmp', user = :user", $user );
+ Database::exec ( "INSERT INTO setting_partition SET partition_id = '43', size = '20G', mount_point = '/boot', options = 'bootable', user = :user", $user );
+ Database::exec ( "INSERT INTO setting_partition SET partition_id = '40', size = '20G', mount_point = '/cache/export/dnbd3', user = :user", $user );
+ Database::exec ( "INSERT INTO setting_partition SET partition_id = '41', size = '5G', mount_point = '/home', user = :user", $user );
+ Database::exec ( "INSERT INTO setting_partition SET partition_id = '82', size = '1G', user = :user", $user );
+ Message::addSuccess('add-user');
+ EventLog::info ( User::getName () . ' created user ' . $data['login'] );
+ }
+
}
diff --git a/index.php b/index.php
index 021820b8..84450da5 100644
--- a/index.php
+++ b/index.php
@@ -53,12 +53,14 @@ abstract class Page
* @var \Page
*/
private static $instance = false;
+ public static $name = false;
public static function set($name)
{
$name = preg_replace('/[^A-Za-z]/', '', $name);
- $modulePath = 'modules/' . strtolower($name) . '.inc.php';
- if (!file_exists($modulePath)) {
+ $modulePath = 'modules/' . strtolower($name) . '/module.inc.php';
+ $moduleConfig = json_decode(file_get_contents('modules/' . strtolower($name) . '/config.json'),true);
+ if (!file_exists($modulePath) || empty($moduleConfig) || $moduleConfig['enabled'] != 'true') {
Util::traceError('Invalid module file: ' . $modulePath);
}
require_once $modulePath;
@@ -67,6 +69,7 @@ abstract class Page
Util::traceError('Module not found: ' . $name);
}
self::$instance = new $className();
+ self::$name = strtolower($name);
}
}
@@ -130,7 +133,7 @@ Render::addTemplate('main-menu', array(
'user' => User::getName(),
'warning' => User::getName() !== false && User::getLastSeenEvent() < Property::getLastWarningId(),
'needsSetup' => User::getName() !== false && Property::getNeedsSetup()
-));
+),'main');
Message::renderList();
@@ -142,10 +145,10 @@ if (defined('CONFIG_DEBUG') && CONFIG_DEBUG) {
}
if (defined('CONFIG_FOOTER')) {
- Render::addTemplate('footer', array('text' => CONFIG_FOOTER));
+ Render::addTemplate('footer', array('text' => CONFIG_FOOTER), 'main');
}
-Render::addTemplate('tm-callback-trigger');
+Render::addTemplate('tm-callback-trigger', array(), 'main');
// Send page to client.
Render::output();
diff --git a/lang/de/messages-hardcoded.json b/lang/de/messages-hardcoded.json
index f785f042..692bc9bc 100644
--- a/lang/de/messages-hardcoded.json
+++ b/lang/de/messages-hardcoded.json
@@ -4,12 +4,15 @@
"lang_contentOf": "Inhalt von",
"lang_createUser": "Benutzer anlegen",
"lang_days": "Tag(e)",
+ "lang_eventLog": "Server Log",
"lang_hours": "Stunde(n)",
"lang_location": "Lokalisierung",
"lang_login": "Anmelden",
"lang_moduleAdd": "Modul hinzuf\u00fcgen",
"lang_noModuleFromThisGroup": "(Kein Modul dieser Gruppe)",
"lang_serverConfiguration": "Serverseitige Konfiguration",
+ "lang_serverStatus": "Server Status",
+ "lang_status": "Status",
"lang_titleBackup": "Sichern und Wiederherstellen",
"lang_titleClientStatistics": "Client-Statistiken",
"lang_titleEventLog": "Ereignisprotokoll",
diff --git a/lang/de/modules/adduser.json b/lang/de/modules/adduser.json
new file mode 100644
index 00000000..0f446025
--- /dev/null
+++ b/lang/de/modules/adduser.json
@@ -0,0 +1,8 @@
+{
+ "lang_confirmation": "Wiederholen",
+ "lang_createUser": "Benutzer anlegen",
+ "lang_fullName": "Vollst\u00e4ndiger Name",
+ "lang_password": "Passwort",
+ "lang_telephone": "Telefon",
+ "lang_username": "Benutzerkennung"
+} \ No newline at end of file
diff --git a/lang/de/modules/backup.json b/lang/de/modules/backup.json
new file mode 100644
index 00000000..5e3efea2
--- /dev/null
+++ b/lang/de/modules/backup.json
@@ -0,0 +1,14 @@
+{
+ "lang_backup": "Sichern",
+ "lang_backupDescription": "Hier k\u00f6nnen Sie die Konfiguration des Satellitenservers sichern. Dies beinhaltet die Datenbank \u00fcber alle Virtuellen Maschinen, Veranstaltungen, Authentifizerungsmodule, Passw\u00f6rter, Proxies, den konfigurierten VM-Store sowie weitere Konfiguration des MiniLinux.\r\nDie Festplattenabbilder der Virtuellen Maschinen auf dem VM-Store werden hierbei nicht gesichert. Eventuelle Backups des Stores m\u00fcssen separat durchgef\u00fchrt werden.",
+ "lang_backupRestore": "Sichern und Wiederherstellen",
+ "lang_browseForFile": "Durchsuchen",
+ "lang_download": "Herunterladen",
+ "lang_dozmodExplanation": "Die Datenbank des Dozentenmoduls wiederherstellen. Dazu geh\u00f6ren die Metadaten der Virtuellen Maschinen, die Veranstaltungen, etc. Bitte beachten Sie, dass hierzu auf dem konfigurierten VM-Store die passenden VM-Abbilder vorliegen m\u00fcssen, da diese extern gespeichert werden. Wenn sich der Servername oder die -adresse ge\u00e4ndert haben stellen Sie bitte sicher, dass die relativen Pfade innerhalb des Netzlaufwerks gleich geblieben sind. Ansonsten werden die wiederhergestellten VMs nicht verwendbar sein.",
+ "lang_restore": "Hochladen",
+ "lang_restoreDescription": "Hier k\u00f6nnen Sie ein Backup der Konfiguration wieder einspielen. Bitte beachten Sie, dass der Server dabei neu gestartet wird, daher sollten Sie dies m\u00f6glichst durchf\u00fchren, wenn das System nicht genutzt wird, und keine Dozenten Veranstaltungen oder Virtuelle Labore erstellen oder hoch-\/herunterladen. Bitte beachten Sie, dass dabei auch das urspr\u00fcngliche Passwort der Weboberfl\u00e4che wiederhergestellt wird.",
+ "lang_restoreDozmodConfig": "Dozentenmodul-Konfiguration wiederherstellen",
+ "lang_restoreSystemConfig": "Systemkonfiguration wiederherstellen",
+ "lang_selectFile": "Bitte w\u00e4hlen Sie ein Backup-Archiv",
+ "lang_systemExplanation": "Die Grundkonfiguration des Satelliten wiederherstellen: Authentifizierungmethode, Passw\u00f6rter, Proxies, VM-Storage, etc.\r\nACHTUNG: Wenn Sie ein Backup von vor WS15\/16 einspielen (Backup-Format vor Version 10), wird die Systemkonfiguration in jedem Fall wiederhergestellt, auch wenn Sie diesen Haken nicht setzen."
+} \ No newline at end of file
diff --git a/lang/de/templates/baseconfig/_page.json b/lang/de/templates/baseconfig/_page.json
index 5a4e5a6d..0f4819b4 100644
--- a/lang/de/templates/baseconfig/_page.json
+++ b/lang/de/templates/baseconfig/_page.json
@@ -1,7 +1,15 @@
{
"lang_basicConfiguration": "Basiskonfiguration",
+ "lang_catUser": "Benutzerverwaltung",
"lang_clientRelatedConfig": "Die Optionen auf dieser Seite beziehen sich auf das Verhalten der bwLehrpool-Clients.",
"lang_close": "Schlie\u00dfen",
+ "lang_create": "Schaffen",
+ "lang_delete": "L\u00f6schen",
+ "lang_help": "Hilfe",
+ "lang_newUser": "Neuer Benutzer",
+ "lang_partitionMountPoint": "Mount Point",
"lang_reset": "Zur\u00fccksetzen",
- "lang_save": "Speichern"
+ "lang_save": "Speichern",
+ "lang_userName": "Benutzername",
+ "lang_userPasswd": "Passwort"
} \ No newline at end of file
diff --git a/lang/de/templates/page-news.json b/lang/de/templates/page-news.json
index d1cf877e..7801584d 100644
--- a/lang/de/templates/page-news.json
+++ b/lang/de/templates/page-news.json
@@ -1,4 +1,5 @@
{
+ "lang_activeNews": "Aktive News",
"lang_content": "Inhalt",
"lang_date": "Datum",
"lang_delete": "L\u00f6schen",
diff --git a/lang/de/templates/serversetup/ipxe.json b/lang/de/templates/serversetup/ipxe.json
index 54a3408b..edce0b5e 100644
--- a/lang/de/templates/serversetup/ipxe.json
+++ b/lang/de/templates/serversetup/ipxe.json
@@ -4,6 +4,7 @@
"lang_bootMenu": "Bootmen\u00fc",
"lang_bootMenuCreate": "Bootmen\u00fc erzeugen",
"lang_close": "Schlie\u00dfen",
+ "lang_compile": "Kompilieren",
"lang_customEntry": "Eigener Eintrag",
"lang_example": "Beispiel",
"lang_localHDD": "Lokale HDD",
diff --git a/lang/de/templates/sysconfig/ad_ldap-homedir.json b/lang/de/templates/sysconfig/ad_ldap-homedir.json
deleted file mode 100644
index 9d199688..00000000
--- a/lang/de/templates/sysconfig/ad_ldap-homedir.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "lang_folderRedirection": "Folder Redirection",
- "lang_handlingNotes": "Hier k\u00f6nnen Sie festlegen, wie Netzwerk-Shares (inkl. des Home-Verzeichnisses) an Virtuelle Maschinen durchgereicht werden. In \u00e4lteren Versionen von bwLehrpool wurden die VMware Shared Folders genutzt, was mit bestimmten file servern Probleme verursachen konnte. Der neue native Modus funktioniert deutlich besser, ist aber bei Windows-G\u00e4sten darauf angewiesen, dass (1) der file server smb\/cifs spricht (z.B. Windows Server, Samba unter Linux) und (2) die openslx.exe im Autostart eingebunden ist (bei den bwLehrpool Vorlagen bereits der Fall). Der native Modus mit Fallback auf VMware ist experimentell und kann dazu f\u00fchren, dass die VM in regelm\u00e4\u00dfigen Abst\u00e4nden H\u00e4nger hat. WICHTIG: Bitte w\u00e4hlen Sie einen Laufwerksbuchstaben, der in den eingesetzten VMs verf\u00fcgbar ist, da ansonsten auf einen anderen Buchstaben ausgewichen werden muss.",
- "lang_homedirHandling": "(Home-)Verzeichnis Einbindung",
- "lang_mapModeNative": "Nativ direkt in der VM einbinden [openslx.exe]",
- "lang_mapModeNativeFallback": "Nativ in der VM einbinden; Fallback auf VMware Shared Folders",
- "lang_mapModeNone": "Verzeichnisse nicht durchreichen",
- "lang_mapModeVmware": "VMware Shared Folders [VMwareTools]",
- "lang_next": "Weiter",
- "lang_redirectionWarning": "ACHTUNG: Diese Funktion ist experimentell. Sie biegt nach dem Starten mittels openslx.exe die ausgew\u00e4hlten Verzeichnisse auf das Home-Verzeichnis des angemeldeten Benutzers um (getestet mit Windows 7 und 10). Da hierzu undokumentierte Windows-Einstellungen zur Laufzeit ge\u00e4ndert werden ist nicht garantiert, dass diese Methode in sp\u00e4teren Versionen\/Updates von Windows noch funktioniert. Wir empfehlen, stattdessen die Verzeichnisse - sofern gew\u00fcnscht - bereits in der Vorlage auf den oben konfigurierten Laufwerksbuchstaben des Home-Verzeichnisses umzukonfigurieren.",
- "lang_shareDesktop": "Desktop (Achtung: Vom Dozent angelegte Verkn\u00fcpfungen nicht sichtbar!)",
- "lang_shareDocuments": "Eigene Dokumente",
- "lang_shareDownloads": "Downloads",
- "lang_shareHomeDrive": "Home-Verzeichnis Buchstabe (Windows)",
- "lang_shareMapCreate": "Ordner auf dem Netzlaufwerk bei Bedarf anlegen",
- "lang_shareMedia": "Eigene Musik, Videos, Bilder",
- "lang_shareOther": "Andere (Saved Games, Kontakte, Favoriten, ...)",
- "lang_shareRemapMode": "Einbindemodus"
-} \ No newline at end of file
diff --git a/lang/en/messages-hardcoded.json b/lang/en/messages-hardcoded.json
index b19ef60a..7c781d4e 100644
--- a/lang/en/messages-hardcoded.json
+++ b/lang/en/messages-hardcoded.json
@@ -1,21 +1,55 @@
{
+ "lang_administration": "Translations",
+ "lang_backup": "Backup",
+ "lang_baseconfig": "Variables",
+ "lang_cities":"Cities",
+ "lang_citymanagement":"Management",
+ "lang_clientLog": "Client Log",
"lang_clientSshConfig": "SSH configuration",
"lang_configurationCompilation": "Compile configuration",
+ "lang_content": "Content",
"lang_contentOf": "Content of \"",
"lang_createUser": "Create User",
"lang_days": "Day(s)",
+ "lang_dozmod": "Tutor Module",
+ "lang_eventLog": "Server Log",
+ "lang_eventlog": "Client Log",
"lang_hours": "Hour(s)",
- "lang_location": "Location",
+ "lang_internetaccess": "Internet Access",
+ "lang_imgmanagement": "Image Management",
+ "lang_locations": "Room/Locations",
"lang_login": "Login",
+ "lang_minilinux": "Minilinux",
+ "lang_modules": "Modules",
"lang_moduleAdd": "Add Module",
+ "lang_news": "News",
"lang_noModuleFromThisGroup": "(No module from this group)",
+ "lang_server": "iPXE \/ Boot Menu",
"lang_serverConfiguration": "Server-side Configuration",
+ "lang_serverStatus": "Server",
+ "lang_serversetup": "iPXE \/ Boot Menu",
+ "lang_settings": "Settings",
+ "lang_statistics": "Client Statistics",
+ "lang_status": "Status",
+ "lang_support": "Support",
+ "lang_sysconfig": "Modules",
+ "lang_syslog": "Server Log",
+ "lang_systemstatus": "Server",
"lang_titleBackup": "Save and Restore",
"lang_titleClientStatistics": "Client statistics",
"lang_titleEventLog": "Event log",
+ "lang_translation": "Translation",
+ "lang_user": "Users",
+ "lang_userManagement": "Management",
+ "lang_usermanagement": "Management",
+ "lang_users": "Users",
+ "lang_variables": "Variables",
+ "lang_vmLocation": "Virtual Machine",
+ "lang_vmstore": "Virtual Machine",
"lang_titleWebinterface": "Web Interface",
"lang_unknwonTaskManager": "Unknown Task Manager error",
+ "lang_webinterface": "Web Interface",
"today": "Today",
"unused": "Unused",
"yesterday": "Yesterday"
-} \ No newline at end of file
+}
diff --git a/lang/en/templates/page-adduser.json b/lang/en/modules/adduser/page-adduser.json
index 42bae6dc..42bae6dc 100644
--- a/lang/en/templates/page-adduser.json
+++ b/lang/en/modules/adduser/page-adduser.json
diff --git a/lang/en/templates/backup/_page.json b/lang/en/modules/backup/_page.json
index 799c6168..799c6168 100644
--- a/lang/en/templates/backup/_page.json
+++ b/lang/en/modules/backup/_page.json
diff --git a/lang/en/templates/backup/restore.json b/lang/en/modules/backup/restore.json
index 5a5f6f64..5a5f6f64 100644
--- a/lang/en/templates/backup/restore.json
+++ b/lang/en/modules/backup/restore.json
diff --git a/lang/en/templates/baseconfig/_page.json b/lang/en/modules/baseconfig/_page.json
index 6429a835..6429a835 100644
--- a/lang/en/templates/baseconfig/_page.json
+++ b/lang/en/modules/baseconfig/_page.json
diff --git a/lang/en/modules/citymanagement/citymanagement.json b/lang/en/modules/citymanagement/citymanagement.json
new file mode 100644
index 00000000..27bb60c0
--- /dev/null
+++ b/lang/en/modules/citymanagement/citymanagement.json
@@ -0,0 +1,13 @@
+{
+ "lang_cancelConfirm": "Do you really want to remove this city?",
+ "lang_cityInfo":"Here you can create new cities for the website, besides editing or removing the existing ones",
+ "lang_cityPage":"Manage cities",
+ "lang_cityname":"City name",
+ "lang_close": "Close",
+ "lang_create": "Create",
+ "lang_edit":"Edit",
+ "lang_editcity":"Edit City",
+ "lang_operations": "Operations",
+ "lang_remove": "Remove",
+ "lang_save": "Save"
+}
diff --git a/lang/en/templates/dozmod/images-delete.json b/lang/en/modules/dozmod/images-delete.json
index fcc8c7e7..fcc8c7e7 100644
--- a/lang/en/templates/dozmod/images-delete.json
+++ b/lang/en/modules/dozmod/images-delete.json
diff --git a/lang/en/templates/dozmod/mailconfig.json b/lang/en/modules/dozmod/mailconfig.json
index 0c0dcd7f..0c0dcd7f 100644
--- a/lang/en/templates/dozmod/mailconfig.json
+++ b/lang/en/modules/dozmod/mailconfig.json
diff --git a/lang/en/templates/dozmod/orglist.json b/lang/en/modules/dozmod/orglist.json
index 37b89e02..37b89e02 100644
--- a/lang/en/templates/dozmod/orglist.json
+++ b/lang/en/modules/dozmod/orglist.json
diff --git a/lang/en/templates/dozmod/userlist.json b/lang/en/modules/dozmod/userlist.json
index 615f1b14..615f1b14 100644
--- a/lang/en/templates/dozmod/userlist.json
+++ b/lang/en/modules/dozmod/userlist.json
diff --git a/lang/en/templates/eventlog/_page.json b/lang/en/modules/eventlog/_page.json
index 21ec64ea..21ec64ea 100644
--- a/lang/en/templates/eventlog/_page.json
+++ b/lang/en/modules/eventlog/_page.json
diff --git a/lang/en/templates/internetaccess/_page.json b/lang/en/modules/internetaccess/_page.json
index c02ca4f5..c02ca4f5 100644
--- a/lang/en/templates/internetaccess/_page.json
+++ b/lang/en/modules/internetaccess/_page.json
diff --git a/lang/en/templates/internetaccess/restart.json b/lang/en/modules/internetaccess/restart.json
index badad460..badad460 100644
--- a/lang/en/templates/internetaccess/restart.json
+++ b/lang/en/modules/internetaccess/restart.json
diff --git a/lang/en/templates/locations/location-subnets.json b/lang/en/modules/locations/location-subnets.json
index 2ba94384..2ba94384 100644
--- a/lang/en/templates/locations/location-subnets.json
+++ b/lang/en/modules/locations/location-subnets.json
diff --git a/lang/en/templates/locations/locations.json b/lang/en/modules/locations/locations.json
index db4fd0a7..db4fd0a7 100644
--- a/lang/en/templates/locations/locations.json
+++ b/lang/en/modules/locations/locations.json
diff --git a/lang/en/templates/locations/subnets.json b/lang/en/modules/locations/subnets.json
index 65da254b..65da254b 100644
--- a/lang/en/templates/locations/subnets.json
+++ b/lang/en/modules/locations/subnets.json
diff --git a/lang/en/templates/dialog-generic.json b/lang/en/modules/main/dialog-generic.json
index c7551ed3..c7551ed3 100644
--- a/lang/en/templates/dialog-generic.json
+++ b/lang/en/modules/main/dialog-generic.json
diff --git a/lang/en/templates/main-menu.json b/lang/en/modules/main/main-menu.json
index d22f90d7..d22f90d7 100644
--- a/lang/en/templates/main-menu.json
+++ b/lang/en/modules/main/main-menu.json
diff --git a/lang/en/templates/messagebox-warning.json b/lang/en/modules/main/messagebox-warning.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/messagebox-warning.json
+++ b/lang/en/modules/main/messagebox-warning.json
diff --git a/lang/en/templates/page-main-guest.json b/lang/en/modules/main/page-main-guest.json
index 6526f5bd..6526f5bd 100644
--- a/lang/en/templates/page-main-guest.json
+++ b/lang/en/modules/main/page-main-guest.json
diff --git a/lang/en/templates/page-main.json b/lang/en/modules/main/page-main.json
index 8031ac1c..8031ac1c 100644
--- a/lang/en/templates/page-main.json
+++ b/lang/en/modules/main/page-main.json
diff --git a/lang/en/templates/pagenav.json b/lang/en/modules/main/pagenav.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/pagenav.json
+++ b/lang/en/modules/main/pagenav.json
diff --git a/lang/en/templates/messagebox-error.json b/lang/en/modules/messagebox-error.json
index c44dc44f..c44dc44f 100644
--- a/lang/en/templates/messagebox-error.json
+++ b/lang/en/modules/messagebox-error.json
diff --git a/lang/en/templates/messagebox-info.json b/lang/en/modules/messagebox-info.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/messagebox-info.json
+++ b/lang/en/modules/messagebox-info.json
diff --git a/lang/en/templates/messagebox-success.json b/lang/en/modules/messagebox-success.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/messagebox-success.json
+++ b/lang/en/modules/messagebox-success.json
diff --git a/lang/en/templates/minilinux/download.json b/lang/en/modules/minilinux/download.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/minilinux/download.json
+++ b/lang/en/modules/minilinux/download.json
diff --git a/lang/en/templates/minilinux/filelist.json b/lang/en/modules/minilinux/filelist.json
index 89fed42b..89fed42b 100644
--- a/lang/en/templates/minilinux/filelist.json
+++ b/lang/en/modules/minilinux/filelist.json
diff --git a/lang/en/templates/page-minilinux.json b/lang/en/modules/minilinux/page-minilinux.json
index 2f59fa57..2f59fa57 100644
--- a/lang/en/templates/page-minilinux.json
+++ b/lang/en/modules/minilinux/page-minilinux.json
diff --git a/lang/en/templates/page-news.json b/lang/en/modules/news/page-news.json
index df63658c..df63658c 100644
--- a/lang/en/templates/page-news.json
+++ b/lang/en/modules/news/page-news.json
diff --git a/lang/en/templates/systemstatus/addresses.json b/lang/en/modules/pagenav.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/systemstatus/addresses.json
+++ b/lang/en/modules/pagenav.json
diff --git a/lang/en/templates/serversetup/ipaddress.json b/lang/en/modules/serversetup/ipaddress.json
index 699aeacc..699aeacc 100644
--- a/lang/en/templates/serversetup/ipaddress.json
+++ b/lang/en/modules/serversetup/ipaddress.json
diff --git a/lang/en/templates/serversetup/ipxe.json b/lang/en/modules/serversetup/ipxe.json
index 39bb0d54..70c17f43 100644
--- a/lang/en/templates/serversetup/ipxe.json
+++ b/lang/en/modules/serversetup/ipxe.json
@@ -3,9 +3,18 @@
"lang_bootInfo": "Here adjustments can be made to the appearance of the boot menu.",
"lang_bootMenu": "Boot Menu",
"lang_bootMenuCreate": "Create Boot Menu",
+ "lang_cancel": "Cancel",
"lang_close": "Close",
+ "lang_compile": "Compile",
+ "lang_compilingIpxe": "Compiling iPXE",
"lang_customEntry": "Custom entry",
+ "lang_customScript": "Custom script",
+ "lang_download": "Download",
"lang_example": "Example",
+ "lang_extension": "Extension",
+ "lang_ipxeInfo": "Here it is possible to compile iPXE using a custom script.",
+ "lang_ipxeWarning": "If this is your first time compiling, it may take 1 to 4 minutes to finish.",
+ "lang_loading": "Loading",
"lang_localHDD": "Local HDD",
"lang_masterPassword": "Master password",
"lang_masterPasswordHelp": "The master password is required to edit a boot menu entry. This should be set for security reasons.",
@@ -14,5 +23,9 @@
"lang_menuCustomHint2": "You can create one or more entries. If you want to create an entry that starts automatically when the user makes a selection, assign as",
"lang_menuCustomHint3": "and select as the default boot behavior custom as well.",
"lang_menuDisplayTime": "Menu Display Time",
- "lang_seconds": "Seconds"
-} \ No newline at end of file
+ "lang_mountIpxe": "Mount iPXE",
+ "lang_restoreDefault": "Restore Default",
+ "lang_saveScript": "Save Script",
+ "lang_seconds": "Seconds",
+ "lang_success": "Successfully create file:"
+}
diff --git a/lang/en/templates/serversetup/ipxe_update.json b/lang/en/modules/serversetup/ipxe_update.json
index b33b12dd..b33b12dd 100644
--- a/lang/en/templates/serversetup/ipxe_update.json
+++ b/lang/en/modules/serversetup/ipxe_update.json
diff --git a/lang/en/templates/page-login.json b/lang/en/modules/session/page-login.json
index 4b192a7a..4b192a7a 100644
--- a/lang/en/templates/page-login.json
+++ b/lang/en/modules/session/page-login.json
diff --git a/lang/en/templates/statistics/clientlist.json b/lang/en/modules/statistics/clientlist.json
index ae692154..ae692154 100644
--- a/lang/en/templates/statistics/clientlist.json
+++ b/lang/en/modules/statistics/clientlist.json
diff --git a/lang/en/templates/statistics/cpumodels.json b/lang/en/modules/statistics/cpumodels.json
index 864933dd..864933dd 100644
--- a/lang/en/templates/statistics/cpumodels.json
+++ b/lang/en/modules/statistics/cpumodels.json
diff --git a/lang/en/templates/statistics/id44.json b/lang/en/modules/statistics/id44.json
index 0d0081a8..0d0081a8 100644
--- a/lang/en/templates/statistics/id44.json
+++ b/lang/en/modules/statistics/id44.json
diff --git a/lang/en/templates/statistics/kvmstate.json b/lang/en/modules/statistics/kvmstate.json
index b4846473..b4846473 100644
--- a/lang/en/templates/statistics/kvmstate.json
+++ b/lang/en/modules/statistics/kvmstate.json
diff --git a/lang/en/templates/statistics/machine-hdds.json b/lang/en/modules/statistics/machine-hdds.json
index 8ce6801d..8ce6801d 100644
--- a/lang/en/templates/statistics/machine-hdds.json
+++ b/lang/en/modules/statistics/machine-hdds.json
diff --git a/lang/en/templates/statistics/machine-main.json b/lang/en/modules/statistics/machine-main.json
index 1addd437..1addd437 100644
--- a/lang/en/templates/statistics/machine-main.json
+++ b/lang/en/modules/statistics/machine-main.json
diff --git a/lang/en/templates/statistics/machine-notes.json b/lang/en/modules/statistics/machine-notes.json
index 7a13f28a..7a13f28a 100644
--- a/lang/en/templates/statistics/machine-notes.json
+++ b/lang/en/modules/statistics/machine-notes.json
diff --git a/lang/en/templates/statistics/machine-usage.json b/lang/en/modules/statistics/machine-usage.json
index 398996f6..398996f6 100644
--- a/lang/en/templates/statistics/machine-usage.json
+++ b/lang/en/modules/statistics/machine-usage.json
diff --git a/lang/en/templates/statistics/memory.json b/lang/en/modules/statistics/memory.json
index decdd021..decdd021 100644
--- a/lang/en/templates/statistics/memory.json
+++ b/lang/en/modules/statistics/memory.json
diff --git a/lang/en/templates/statistics/newclients.json b/lang/en/modules/statistics/newclients.json
index f7e55f3f..f7e55f3f 100644
--- a/lang/en/templates/statistics/newclients.json
+++ b/lang/en/modules/statistics/newclients.json
diff --git a/lang/en/templates/statistics/summary.json b/lang/en/modules/statistics/summary.json
index b57c290f..b57c290f 100644
--- a/lang/en/templates/statistics/summary.json
+++ b/lang/en/modules/statistics/summary.json
diff --git a/lang/en/templates/statistics/syslog.json b/lang/en/modules/statistics/syslog.json
index 6737ca68..6737ca68 100644
--- a/lang/en/templates/statistics/syslog.json
+++ b/lang/en/modules/statistics/syslog.json
diff --git a/lang/en/templates/sysconfig/_page.json b/lang/en/modules/sysconfig/_page.json
index 6f139359..6f139359 100644
--- a/lang/en/templates/sysconfig/_page.json
+++ b/lang/en/modules/sysconfig/_page.json
diff --git a/lang/en/templates/sysconfig/ad-finish.json b/lang/en/modules/sysconfig/ad-finish.json
index 8f89046e..8f89046e 100644
--- a/lang/en/templates/sysconfig/ad-finish.json
+++ b/lang/en/modules/sysconfig/ad-finish.json
diff --git a/lang/en/templates/sysconfig/ad-selfsearch.json b/lang/en/modules/sysconfig/ad-selfsearch.json
index 70db0620..70db0620 100644
--- a/lang/en/templates/sysconfig/ad-selfsearch.json
+++ b/lang/en/modules/sysconfig/ad-selfsearch.json
diff --git a/lang/en/templates/sysconfig/ad-start.json b/lang/en/modules/sysconfig/ad-start.json
index ff35fc03..ff35fc03 100644
--- a/lang/en/templates/sysconfig/ad-start.json
+++ b/lang/en/modules/sysconfig/ad-start.json
diff --git a/lang/en/templates/sysconfig/ad_ldap-checkconnection.json b/lang/en/modules/sysconfig/ad_ldap-checkconnection.json
index 6a924f8b..6a924f8b 100644
--- a/lang/en/templates/sysconfig/ad_ldap-checkconnection.json
+++ b/lang/en/modules/sysconfig/ad_ldap-checkconnection.json
diff --git a/lang/en/templates/sysconfig/ad_ldap-checkcredentials.json b/lang/en/modules/sysconfig/ad_ldap-checkcredentials.json
index 2b83a231..2b83a231 100644
--- a/lang/en/templates/sysconfig/ad_ldap-checkcredentials.json
+++ b/lang/en/modules/sysconfig/ad_ldap-checkcredentials.json
diff --git a/lang/en/templates/sysconfig/ad_ldap-homedir.json b/lang/en/modules/sysconfig/ad_ldap-homedir.json
index 82550b8a..90d4a211 100644
--- a/lang/en/templates/sysconfig/ad_ldap-homedir.json
+++ b/lang/en/modules/sysconfig/ad_ldap-homedir.json
@@ -6,8 +6,7 @@
"lang_mapModeNativeFallback": "Natively map inside VM; fallback to VMware Shared Folders",
"lang_mapModeNone": "Don't map shares at all",
"lang_mapModeVmware": "VMware Shared Folders [VMwareTools]",
- "lang_next": "Next",
- "lang_redirectionWarning": "WARNING: This feature is experimental. It remaps the selected folders after the VM booted (via openslx.exe) to the logged in user's home drive. This might cause problems with applications that start before the pathes are patched, as they will see the old unpatched settings. Please note that this is usign undocumented or unsupported techniques to achieve this goal. It is not guaranteed that this method will work in future versions or updates of Windows. If you want to reliably remap these directories, you might want to change their locations in the VM before uploading it.",
+ "lang_redirectionWarning": "WARNING: This feature is experimental. It remaps the selected folders after the VM booted (via openslx.exe) to the logged in user's home drive. This might cause problems with applications that start before the pathes are patched, as they will see the old unpatched settings. This also doesn't work fully on Windows 10. If you want to reliably remap these directories, it's recommended to change their locations in the VM before uploading it.",
"lang_shareDesktop": "Desktop (Might hide shortcuts created by the tutor)",
"lang_shareDocuments": "My Documents",
"lang_shareDownloads": "Downloads",
diff --git a/lang/en/templates/sysconfig/branding-check.json b/lang/en/modules/sysconfig/branding-check.json
index 6a481d8b..6a481d8b 100644
--- a/lang/en/templates/sysconfig/branding-check.json
+++ b/lang/en/modules/sysconfig/branding-check.json
diff --git a/lang/en/templates/sysconfig/branding-start.json b/lang/en/modules/sysconfig/branding-start.json
index 4423784d..4423784d 100644
--- a/lang/en/templates/sysconfig/branding-start.json
+++ b/lang/en/modules/sysconfig/branding-start.json
diff --git a/lang/en/templates/sysconfig/cfg-finish.json b/lang/en/modules/sysconfig/cfg-finish.json
index b8729636..b8729636 100644
--- a/lang/en/templates/sysconfig/cfg-finish.json
+++ b/lang/en/modules/sysconfig/cfg-finish.json
diff --git a/lang/en/templates/sysconfig/cfg-start.json b/lang/en/modules/sysconfig/cfg-start.json
index a00a6720..9afc6ce3 100644
--- a/lang/en/templates/sysconfig/cfg-start.json
+++ b/lang/en/modules/sysconfig/cfg-start.json
@@ -2,6 +2,5 @@
"lang_configuration": "Configuration",
"lang_configurationChoose": "Please select which modules will be used for this configuration.",
"lang_name": "Name",
- "lang_next": "Next",
"lang_noModuleOfType": "No module of this type found."
-} \ No newline at end of file
+}
diff --git a/lang/en/templates/sysconfig/config-module-list.json b/lang/en/modules/sysconfig/config-module-list.json
index ff30c0b4..ff30c0b4 100644
--- a/lang/en/templates/sysconfig/config-module-list.json
+++ b/lang/en/modules/sysconfig/config-module-list.json
diff --git a/lang/en/templates/sysconfig/custom-filelist.json b/lang/en/modules/sysconfig/custom-filelist.json
index 50bec5b5..50bec5b5 100644
--- a/lang/en/templates/sysconfig/custom-filelist.json
+++ b/lang/en/modules/sysconfig/custom-filelist.json
diff --git a/lang/en/templates/sysconfig/custom-fileselect.json b/lang/en/modules/sysconfig/custom-fileselect.json
index 2ae25e16..2ae25e16 100644
--- a/lang/en/templates/sysconfig/custom-fileselect.json
+++ b/lang/en/modules/sysconfig/custom-fileselect.json
diff --git a/lang/en/templates/sysconfig/custom-upload.json b/lang/en/modules/sysconfig/custom-upload.json
index 26b7c186..26b7c186 100644
--- a/lang/en/templates/sysconfig/custom-upload.json
+++ b/lang/en/modules/sysconfig/custom-upload.json
diff --git a/lang/en/templates/sysconfig/ldap-checkconnection.json b/lang/en/modules/sysconfig/ldap-checkconnection.json
index 52fbae9e..52fbae9e 100644
--- a/lang/en/templates/sysconfig/ldap-checkconnection.json
+++ b/lang/en/modules/sysconfig/ldap-checkconnection.json
diff --git a/lang/en/templates/sysconfig/ldap-checkcredentials.json b/lang/en/modules/sysconfig/ldap-checkcredentials.json
index 2a8723c9..2a8723c9 100644
--- a/lang/en/templates/sysconfig/ldap-checkcredentials.json
+++ b/lang/en/modules/sysconfig/ldap-checkcredentials.json
diff --git a/lang/en/templates/sysconfig/ldap-finish.json b/lang/en/modules/sysconfig/ldap-finish.json
index bd15bafc..bd15bafc 100644
--- a/lang/en/templates/sysconfig/ldap-finish.json
+++ b/lang/en/modules/sysconfig/ldap-finish.json
diff --git a/lang/en/templates/sysconfig/ldap-start.json b/lang/en/modules/sysconfig/ldap-start.json
index 45ba19f1..45ba19f1 100644
--- a/lang/en/templates/sysconfig/ldap-start.json
+++ b/lang/en/modules/sysconfig/ldap-start.json
diff --git a/lang/en/templates/sysconfig/sshconfig-start.json b/lang/en/modules/sysconfig/sshconfig-start.json
index 1ce553cd..1ce553cd 100644
--- a/lang/en/templates/sysconfig/sshconfig-start.json
+++ b/lang/en/modules/sysconfig/sshconfig-start.json
diff --git a/lang/en/templates/sysconfig/start.json b/lang/en/modules/sysconfig/start.json
index 4567d649..4567d649 100644
--- a/lang/en/templates/sysconfig/start.json
+++ b/lang/en/modules/sysconfig/start.json
diff --git a/lang/en/templates/page-syslog.json b/lang/en/modules/syslog/page-syslog.json
index 71f61693..71f61693 100644
--- a/lang/en/templates/page-syslog.json
+++ b/lang/en/modules/syslog/page-syslog.json
diff --git a/lang/en/templates/systemstatus/_page.json b/lang/en/modules/systemstatus/_page.json
index f698521d..f698521d 100644
--- a/lang/en/templates/systemstatus/_page.json
+++ b/lang/en/modules/systemstatus/_page.json
diff --git a/lang/en/templates/systemstatus/services.json b/lang/en/modules/systemstatus/addresses.json
index 2c63c085..2c63c085 100644
--- a/lang/en/templates/systemstatus/services.json
+++ b/lang/en/modules/systemstatus/addresses.json
diff --git a/lang/en/templates/systemstatus/diskstat.json b/lang/en/modules/systemstatus/diskstat.json
index 6c880ebe..6c880ebe 100644
--- a/lang/en/templates/systemstatus/diskstat.json
+++ b/lang/en/modules/systemstatus/diskstat.json
diff --git a/lang/en/modules/systemstatus/services.json b/lang/en/modules/systemstatus/services.json
new file mode 100644
index 00000000..2c63c085
--- /dev/null
+++ b/lang/en/modules/systemstatus/services.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/lang/en/templates/systemstatus/systeminfo.json b/lang/en/modules/systemstatus/systeminfo.json
index 602693f5..602693f5 100644
--- a/lang/en/templates/systemstatus/systeminfo.json
+++ b/lang/en/modules/systemstatus/systeminfo.json
diff --git a/lang/en/templates/translation/_page.json b/lang/en/modules/translation/_page.json
index 5a48b696..5a48b696 100644
--- a/lang/en/templates/translation/_page.json
+++ b/lang/en/modules/translation/_page.json
diff --git a/lang/en/templates/translation/edit.json b/lang/en/modules/translation/edit.json
index 05c6697a..05c6697a 100644
--- a/lang/en/templates/translation/edit.json
+++ b/lang/en/modules/translation/edit.json
diff --git a/lang/en/templates/translation/template-list.json b/lang/en/modules/translation/template-list.json
index e3feb70b..e3feb70b 100644
--- a/lang/en/templates/translation/template-list.json
+++ b/lang/en/modules/translation/template-list.json
diff --git a/lang/en/modules/usermanagement/user-management.json b/lang/en/modules/usermanagement/user-management.json
new file mode 100644
index 00000000..61225f55
--- /dev/null
+++ b/lang/en/modules/usermanagement/user-management.json
@@ -0,0 +1,18 @@
+{
+ "lang_cancelConfirm": "Do you really want to delete this users?",
+ "lang_close": "Close",
+ "lang_create": "Create",
+ "lang_edit": "Edit",
+ "lang_editUser": "Edit User",
+ "lang_email": "Email",
+ "lang_login": "Login",
+ "lang_operations": "Operation",
+ "lang_password": "Password",
+ "lang_remove": "Remove",
+ "lang_save": "Save",
+ "lang_telephone": "Telephone",
+ "lang_userAdmin": "Administrator",
+ "lang_userInfo": "On this section, you will be able to create website users, besides editing or removing existing users.",
+ "lang_userPage": "Users",
+ "lang_username": "Username"
+} \ No newline at end of file
diff --git a/lang/en/templates/vmstore/mount.json b/lang/en/modules/vmstore/mount.json
index 29814430..29814430 100644
--- a/lang/en/templates/vmstore/mount.json
+++ b/lang/en/modules/vmstore/mount.json
diff --git a/lang/en/templates/page-vmstore.json b/lang/en/modules/vmstore/page-vmstore.json
index 23ddbbd3..23ddbbd3 100644
--- a/lang/en/templates/page-vmstore.json
+++ b/lang/en/modules/vmstore/page-vmstore.json
diff --git a/lang/en/templates/webinterface/httpd-restart.json b/lang/en/modules/webinterface/httpd-restart.json
index 0a7d4aea..0a7d4aea 100644
--- a/lang/en/templates/webinterface/httpd-restart.json
+++ b/lang/en/modules/webinterface/httpd-restart.json
diff --git a/lang/en/templates/webinterface/https.json b/lang/en/modules/webinterface/https.json
index 64631a9a..64631a9a 100644
--- a/lang/en/templates/webinterface/https.json
+++ b/lang/en/modules/webinterface/https.json
diff --git a/lang/en/templates/webinterface/passwords.json b/lang/en/modules/webinterface/passwords.json
index 2db88ae2..2db88ae2 100644
--- a/lang/en/templates/webinterface/passwords.json
+++ b/lang/en/modules/webinterface/passwords.json
diff --git a/lang/pt/templates/sysconfig/ad_ldap-homedir.json b/lang/pt/templates/sysconfig/ad_ldap-homedir.json
deleted file mode 100644
index c44dc44f..00000000
--- a/lang/pt/templates/sysconfig/ad_ldap-homedir.json
+++ /dev/null
@@ -1,3 +0,0 @@
-[
-
-] \ No newline at end of file
diff --git a/modules/adduser/config.json b/modules/adduser/config.json
new file mode 100644
index 00000000..d5da4cc8
--- /dev/null
+++ b/modules/adduser/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"hidden",
+ "enabled":"true"
+}
diff --git a/modules/adduser.inc.php b/modules/adduser/module.inc.php
index c236cb6f..c236cb6f 100644
--- a/modules/adduser.inc.php
+++ b/modules/adduser/module.inc.php
diff --git a/templates/page-adduser.html b/modules/adduser/templates/page-adduser.html
index 0b097890..0b097890 100644
--- a/templates/page-adduser.html
+++ b/modules/adduser/templates/page-adduser.html
diff --git a/modules/backup/config.json b/modules/backup/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/backup/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/backup.inc.php b/modules/backup/module.inc.php
index 24352a9a..4095f875 100644
--- a/modules/backup.inc.php
+++ b/modules/backup/module.inc.php
@@ -25,10 +25,10 @@ class Page_Backup extends Page
{
Render::setTitle(Dictionary::translate('lang_titleBackup'));
if ($this->action === 'restore') {
- Render::addTemplate('backup/restore', $this->templateData);
+ Render::addTemplate('restore', $this->templateData);
} else {
Render::addScriptBottom('fileselect');
- Render::addTemplate('backup/_page');
+ Render::addTemplate('_page');
}
}
@@ -130,5 +130,35 @@ class Page_Backup extends Page
if (isset($task['id']))
$this->templateData['rebootid'] = $task['id'];
}
-
+ private function stopDaemons($parent)
+ {
+ $task = Taskmanager::submit('SyncdaemonLauncher', array(
+ 'operation' => 'stop',
+ 'parentTask' => $parent,
+ 'failOnParentFail' => false
+ ));
+ if (isset($task['id'])) {
+ $this->templateData['syncid'] = $task['id'];
+ $parent = $task['id'];
+ }
+ $task = Taskmanager::submit('DozmodLauncher', array(
+ 'operation' => 'stop',
+ 'parentTask' => $parent,
+ 'failOnParentFail' => false
+ ));
+ if (isset($task['id'])) {
+ $this->templateData['dmsdid'] = $task['id'];
+ $parent = $task['id'];
+ }
+ $task = Taskmanager::submit('LdadpLauncher', array(
+ 'ids' => array(),
+ 'parentTask' => $parent,
+ 'failOnParentFail' => false
+ ));
+ if (isset($task['id'])) {
+ $this->templateData['ldadpid'] = $task['id'];
+ $parent = $task['id'];
+ }
+ return $parent;
+ }
}
diff --git a/templates/backup/_page.html b/modules/backup/templates/_page.html
index 47b5a174..47b5a174 100644
--- a/templates/backup/_page.html
+++ b/modules/backup/templates/_page.html
diff --git a/templates/backup/restore.html b/modules/backup/templates/restore.html
index e7dadae3..4494a993 100644
--- a/templates/backup/restore.html
+++ b/modules/backup/templates/restore.html
@@ -2,6 +2,7 @@
<div class="panel-heading">{{lang_backup}}</div>
<div class="panel-body">
<div id="zeug">
+ <div data-tm-id="{{syncid}}" data-tm-log="messages">{{lang_stopping}} syncdaemon</div>
<div data-tm-id="{{dmsdid}}" data-tm-log="messages">{{lang_stopping}} dmsd</div>
<div data-tm-id="{{ldadpid}}" data-tm-log="messages">{{lang_stopping}} ldadp</div>
<div data-tm-id="{{mountid}}" data-tm-log="messages">{{lang_stopping}} vmstore</div>
diff --git a/modules/baseconfig/config.json b/modules/baseconfig/config.json
new file mode 100644
index 00000000..93209f62
--- /dev/null
+++ b/modules/baseconfig/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"settings",
+ "enabled":"true"
+}
diff --git a/modules/baseconfig.inc.php b/modules/baseconfig/module.inc.php
index 152e3372..3d187d30 100644
--- a/modules/baseconfig.inc.php
+++ b/modules/baseconfig/module.inc.php
@@ -87,9 +87,9 @@ class Page_BaseConfig extends Page
$row['item'] = $this->makeInput($row['validator'], $row['setting'], $row['displayvalue']);
$settings[$row['catid']]['settings'][] = $row;
$settings[$row['catid']]['category_name'] = Dictionary::translate('settings/cat_setting', 'cat_' . $row['catid']);
+ $settings[$row['catid']]['category_id'] = $row['catid'];
}
-
- Render::addTemplate('baseconfig/_page', array(
+ Render::addTemplate('_page', array(
'categories' => array_values($settings)
));
}
diff --git a/modules/baseconfig/templates/_page.html b/modules/baseconfig/templates/_page.html
new file mode 100644
index 00000000..c72f0a5e
--- /dev/null
+++ b/modules/baseconfig/templates/_page.html
@@ -0,0 +1,186 @@
+<h1>{{lang_basicConfiguration}}</h1>
+<p>{{lang_clientRelatedConfig}}</p>
+<form action="?do=BaseConfig" method="post">
+ <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
+ <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;">
+ <input type="password" name="password_fake" id="password_fake" value="" style="display:none;">
+ {{#categories}}
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="heading{{category_id}}">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{category_id}}" aria-expanded="false" aria-controls="collapse{{category_id}}">
+ {{category_name}}
+ </a>
+ </div>
+ <div id="collapse{{category_id}}" class="accordion-body collapse" role="tabpanel" aria-labelledby="heading{{category_id}}">
+ <div class="panel-body">
+ <div class="list-group">
+ {{#settings}}
+ <div class="list-group-item {{class}}">
+ <div class="row">
+ <div class="col-md-1" style="width:118px;">
+ <input type="checkbox" name="switch[{{setting}}]" {{checked}}>
+ </div>
+ <div class="col-md-4">
+ {{setting}}
+ <div class="slx-default">{{defaultvalue}}</div>
+ </div>
+ <div class="col-md-4">
+ {{{item}}}
+ </div>
+ <div class="col-md-2">
+ <a class="btn btn-default" data-toggle="modal" data-target="#help-{{setting}}"><span class="glyphicon glyphicon-question-sign"></span></a>
+ </div>
+ </div>
+ </div>
+ <div class="modal fade" id="help-{{setting}}" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">{{setting}}</div>
+ <div class="modal-body">{{{description}}}</div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+ </div>
+ {{/settings}}
+ </div>
+ <div id="cat-extra-{{category_id}}">
+
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/categories}}
+
+
+
+ <!-- User Managment Section -->
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingUsers">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapseUsers" aria-expanded="false" aria-controls="collapseUsers">
+ {{lang_catUser}}
+ </a>
+ <span style="display:inline-block; float: right; margin-top: -7px;">
+ <a class="btn btn-default " data-toggle="modal" data-target="#add-user">
+ <span class="glyphicon glyphicon-plus"></span>
+ </a>
+ </span>
+ </div>
+ <div id="collapseUsers" class="accordion-body collapse" role="tabpanel" aria-labelledby="headingUsers">
+ <div class="panel-body">
+ <div class="list-group">
+ {{#users}}
+ <div class="list-group-item">
+ <div class="row">
+ <div class="col-md-5">
+ <input name="user-{{id}}-name" type="text" class="form-control" size="30" value="{{name}}" />
+ </div>
+ <div class="col-md-5">
+ <input name="user-{{id}}-password" type="text" class="form-control" size="30" placeholder="{{lang_userPasswd}}" />
+ </div>
+ <div class="col-md-2">
+ <a class="btn btn-danger" href="?do=BaseConfig&deleteUser={{id}}&token={{token}}" ><span class="glyphicon glyphicon-trash"></span> {{lang_delete}}</a>
+ </div>
+ </div>
+ </div>
+ {{/users}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <input type="hidden" name="token" value="{{token}}">
+ <button class="btn btn-lg btn-primary" type="submit">{{lang_save}}</button>
+ <button class="btn btn-lg btn-primary" type="reset">{{lang_reset}}</button>
+ <a class="btn btn-lg btn-primary" href="api.php?do=getconfig">Download</a>
+</form>
+<p>
+ <form method="post" action="?do=BaseConfig">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="reset">
+ <button class="btn btn-default" type="submit" onclick="return confirm('{{lang_resetConfirm}}');">{{lang_resetDefault}}</button>
+ </form>
+</p>
+<!-- Create User Window -->
+<form action="?do=BaseConfig" method="post">
+ <div class="modal fade" id="add-user" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+
+ <div class="modal-content">
+ <div class="modal-header">{{lang_newUser}}</div>
+ <div class="modal-body">
+
+ <p>
+ <input name="new-user-name" placeholder="{{lang_userName}}" class="form-control" type="text">
+ </p>
+ <p>
+ <input name="new-user-passwd" placeholder="{{lang_userPasswd}}" class="form-control" type="password">
+ </p>
+ <input type="submit" class="btn btn-primary" value="{{lang_create}}">
+ </div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+ </div>
+ <input type="hidden" name="action" value="new_user">
+ <input type="hidden" name="token" value="{{token}}">
+</form>
+<!-- Create Partition Window -->
+<form action="?do=BaseConfig" method="post">
+ <div class="modal fade" id="add-partition" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+
+ <div class="modal-content">
+ <div class="modal-header">{{lang_newPartition}}</div>
+ <div class="modal-body">
+
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_partitionId}}</span>
+ <input name="new-partition-id" class="form-control" type="text">
+ </div>
+ <p class="help-block">{{lang_helpId}}</p>
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_partitionSize}}</span>
+ <input name="new-partition-size" class="form-control" type="text">
+ </div>
+ <p class="help-block">{{lang_helpSize}}</p>
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_partitionMountPoint}}</span>
+ <input name="new-partition-mount-point" class="form-control" type="text">
+ </div>
+ <p class="help-block">{{lang_helpMountPoint}}</p>
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_partitionOptions}}</span>
+ <input name="new-partition-options" class="form-control" type="text">
+ </div>
+ <p class="help-block">{{lang_helpOptions}}</p>
+ <input type="submit" class="btn btn-primary" value="{{lang_create}}">
+ </div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+ </div>
+ <input type="hidden" name="action" value="new_partition">
+ <input type="hidden" name="token" value="{{token}}">
+</form>
+<script type="text/javascript">
+document.getElementById("cat-extra-6").innerHTML = "<div class='list-group'> <div class='list-group-item' style='background-color:#f5f5f5;color:#428bca;'> " +
+"{{lang_catPartition}} <span style='display:inline-block; float: right; margin-top: -7px;'> <a class='btn btn-default ' data-toggle='modal' " +
+"data-target='#add-partition'> <span class='glyphicon glyphicon-plus'></span> </a> </span> </div> {{#partitions}} <div class='list-group-item'> " +
+"<div class='row'> <div class='col-md-1'> <input name='partition-{{id}}-partition_id' type='text' class='form-control' size='30' value='{{partition_id}}'" +
+" placeholder='{{lang_partitionId}}' /> </div> <div class='col-md-1'> <input name='partition-{{id}}-size' type='text' class='form-control' size='30' " +
+"value='{{size}}' placeholder='{{lang_partitionSize}}'/> </div> <div class='col-md-4'> <input name='partition-{{id}}-mount_point' type='text' " +
+"class='form-control' size='30' value='{{mount_point}}' placeholder='{{lang_partitionMountPoint}}'/> </div> <div class='col-md-4'> <input " +
+"name='partition-{{id}}-options' type='text' class='form-control' size='30' value='{{options}}' placeholder='{{lang_partitionOptions}}'/> </div> " +
+"<div class='col-md-2'> <a class='btn btn-danger' href='?do=BaseConfig&deletePartition={{id}}&token={{token}}' ><span class='glyphicon glyphicon-trash'>" +
+"</span> {{lang_delete}}</a> </div> </div> </div> {{/partitions}} </div> </div>";
+
+function saveConfig(){
+ if(confirm('{{lang_confirm}}'))
+ window.location = 'api.php?do=getconfig&user={{user}}&save=true';
+ else
+ window.location = 'api.php?do=getconfig&user={{user}}';
+}
+
+$("[name^='switch']").bootstrapSwitch();
+
+</script>
diff --git a/modules/citymanagement/config.json b/modules/citymanagement/config.json
new file mode 100644
index 00000000..3cd4afd3
--- /dev/null
+++ b/modules/citymanagement/config.json
@@ -0,0 +1,5 @@
+{
+ "category":"hidden",
+ "enabled":"false",
+ "permission":"0"
+}
diff --git a/modules/citymanagement/module.inc.php b/modules/citymanagement/module.inc.php
new file mode 100644
index 00000000..acc30bf9
--- /dev/null
+++ b/modules/citymanagement/module.inc.php
@@ -0,0 +1,81 @@
+<?php
+
+class Page_Citymanagement extends Page
+{
+
+ private $page;
+
+ protected function doPreprocess()
+ {
+ User::load();
+
+ $p = Request::get('page');
+ if($p != false)
+ $this->page = $p;
+ else
+ $this->page = 1;
+ switch(Request::post('action')){
+ case "edit":
+ $this->edit(Request::post('cityid'),Request::post('name'));
+ break;
+ case "create":
+ $this->create(Request::post('name'));
+ break;
+ case "delete":
+ $this->delete(Request::post('cityid'));
+ break;
+ }
+
+
+ if (!User::hasPermission('superadmin')) {
+ Message::addError('no-permission');
+ Util::redirect('?do=Main');
+ }
+
+ }
+
+ protected function doRender()
+ {
+ // load every city
+ $cities = array();
+ $res = Database::simpleQuery("SELECT cityid, name FROM cities ORDER BY cityid DESC");
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $cities[] = array(
+ 'id' => $row['cityid'],
+ 'name' => $row['name'],
+ );
+ }
+
+ $pag = new Pagination($cities,$this->page);
+
+ Render::addTemplate('page-citymanagement', array(
+ 'cities' => $pag->getItems(),
+ 'pages' => $pag->getPagination()
+ ));
+ }
+
+ private function edit($cityid, $newname){
+ $data = array (
+ 'cityid' => $cityid,
+ 'name' => $newname,
+ );
+ Database::exec ( 'UPDATE cities SET name = :name WHERE cityid = :cityid', $data );
+ Message::addSuccess('update-city');
+ }
+
+ private function create($name){
+ $data = array (
+ 'name' => $name,
+ );
+ Database::exec('INSERT INTO cities(name) VALUES( :name )',$data);
+ Message::addSuccess('add-city');
+ }
+
+ private function delete($cityid){
+ $data = array (
+ 'cityid' => $cityid
+ );
+ Database::exec ( 'DELETE FROM cities WHERE cityid = :cityid', $data );
+ Message::addSuccess('delete-city');
+ }
+}
diff --git a/modules/citymanagement/templates/page-citymanagement.html b/modules/citymanagement/templates/page-citymanagement.html
new file mode 100644
index 00000000..6d7750cf
--- /dev/null
+++ b/modules/citymanagement/templates/page-citymanagement.html
@@ -0,0 +1,77 @@
+<div class="panel panel-default" style="border-color:#333;">
+ <div class="panel-heading" style="border-color:#333;background-color:#333;background-image: none;color:#FFF;">
+ <div class="panel-title">{{lang_cityPage}}</div>
+ </div>
+ <div class="panel-body">
+ <p>
+ {{lang_cityInfo}}
+ </p>
+
+ </div>
+ <table class="table">
+ <tr>
+ <form method="post" action="?do=Citymanagement">
+ <input type="hidden" name="action" value="create">
+ <input type="hidden" name="token" value="{{token}}">
+ <td><input class="form-control" name="name" type="text" placeholder="{{lang_cityname}}"></td>
+ <td><input class="btn btn-primary" type="submit" value="{{lang_create}}"></td>
+ </form>
+ </tr>
+ <tr>
+ <th style="text-align: center;">ID</th>
+ <th style="text-align: center;">{{lang_cityname}}</th>
+ <th colspan="4">{{lang_operations}}</th>
+ </tr>
+ {{#cities}}
+ <tr>
+ <td><input class="form-control" type="text" disabled="disabled" value="{{id}}" size="3"></td>
+ <td><input class="form-control" type="text" disabled="disabled" value="{{name}}"></td>
+ <td colspan="4">
+ <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#city{{id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> {{lang_edit}}</button>
+ <form method="post" action="?do=Citymanagement" style="display:inline-block;">
+ <input type="hidden" name="action" value="delete">
+ <input type="hidden" name="cityid" value="{{id}}">
+ <input type="hidden" name="token" value="{{token}}">
+ <button class="btn btn-danger" type="submit" onclick="return confirm('{{lang_cancelConfirm}}');"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {{lang_remove}}</a>
+ </form>
+ </td>
+ </tr>
+ {{/cities}}
+ <tr>
+ <td colspan="6">
+ <ul class="pagination" style="margin:10px 0;">
+ {{#pages}}
+ <li class="{{class}}"><a href="?do=Citymanagement&page={{page}}">{{page}}</a></li>
+ {{/pages}}
+ </ul>
+ </td>
+ </tr>
+ </table>
+</div>
+{{#cities}}
+<div class="modal fade" id="city{{id}}" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header"><h4 class="modal-title">{{lang_editcity}}</h4></div>
+ <div class="modal-body">
+ <form method="post" action="">
+ <input type="hidden" name="action" value="edit">
+ <input type="hidden" name="token" value="{{token}}">
+ <div class="form-group">
+ <label for="cityid">ID</label>
+ <input type="text" class="form-control" name="cityid" readonly="readonly" value="{{id}}">
+ </div>
+ <div class="form-group">
+ <label for="cityid">{{lang_cityname}}</label>
+ <input type="text" class="form-control" name="name" placeholder="{{lang_cityname}}" value="{{name}}">
+ </div>
+ <div class="modal-footer">
+ <input class="btn btn-primary" type="submit" value="{{lang_save}}">
+ <a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+{{/cities}}
diff --git a/modules/dozmod/config.json b/modules/dozmod/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/dozmod/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/dozmod.inc.php b/modules/dozmod/module.inc.php
index 98cacd59..f98d8952 100644
--- a/modules/dozmod.inc.php
+++ b/modules/dozmod/module.inc.php
@@ -37,7 +37,7 @@ class Page_DozMod extends Page
$conf['set_' . $conf['ssl']] = 'selected="selected"';
}
}
- Render::addTemplate('dozmod/mailconfig', $conf);
+ Render::addTemplate('mailconfig', $conf);
// User list for making people admin
$this->listUsers();
$this->listOrganizations();
@@ -72,7 +72,7 @@ class Page_DozMod extends Page
}
if (empty($rows))
return;
- Render::addTemplate('dozmod/images-delete', array('images' => $rows));
+ Render::addTemplate('images-delete', array('images' => $rows));
}
private function cleanMailArray()
@@ -179,7 +179,7 @@ class Page_DozMod extends Page
$row['lastlogin'] = date('d.m.Y', $row['lastlogin']);
$rows[] = $row;
}
- Render::addTemplate('dozmod/userlist', array('users' => $rows));
+ Render::addTemplate('userlist', array('users' => $rows));
}
private function listOrganizations()
@@ -191,7 +191,7 @@ class Page_DozMod extends Page
$row['canlogin'] = $this->checked($row['canlogin']);
$rows[] = $row;
}
- Render::addTemplate('dozmod/orglist', array('organizations' => $rows));
+ Render::addTemplate('orglist', array('organizations' => $rows));
}
private function checked($val)
diff --git a/templates/dozmod/images-delete.html b/modules/dozmod/templates/images-delete.html
index c4cbfd34..c4cbfd34 100644
--- a/templates/dozmod/images-delete.html
+++ b/modules/dozmod/templates/images-delete.html
diff --git a/templates/dozmod/mailconfig.html b/modules/dozmod/templates/mailconfig.html
index b19776c0..b19776c0 100644
--- a/templates/dozmod/mailconfig.html
+++ b/modules/dozmod/templates/mailconfig.html
diff --git a/templates/dozmod/orglist.html b/modules/dozmod/templates/orglist.html
index d325cc4d..d325cc4d 100644
--- a/templates/dozmod/orglist.html
+++ b/modules/dozmod/templates/orglist.html
diff --git a/templates/dozmod/userlist.html b/modules/dozmod/templates/userlist.html
index a76eae5e..a76eae5e 100644
--- a/templates/dozmod/userlist.html
+++ b/modules/dozmod/templates/userlist.html
diff --git a/modules/eventlog/config.json b/modules/eventlog/config.json
new file mode 100644
index 00000000..d42dc3e3
--- /dev/null
+++ b/modules/eventlog/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"status",
+ "enabled":"true"
+}
diff --git a/modules/eventlog.inc.php b/modules/eventlog/module.inc.php
index a070f5a2..7cfc8a55 100644
--- a/modules/eventlog.inc.php
+++ b/modules/eventlog/module.inc.php
@@ -34,7 +34,7 @@ class Page_EventLog extends Page
$lines[] = $row;
}
- $paginate->render('eventlog/_page', array(
+ $paginate->render('_page', array(
'list' => $lines
));
}
diff --git a/templates/eventlog/_page.html b/modules/eventlog/templates/_page.html
index 2e657805..2e657805 100644
--- a/templates/eventlog/_page.html
+++ b/modules/eventlog/templates/_page.html
diff --git a/modules/imgmanagement/config.json b/modules/imgmanagement/config.json
new file mode 100644
index 00000000..49daa91a
--- /dev/null
+++ b/modules/imgmanagement/config.json
@@ -0,0 +1,5 @@
+{
+ "category":"hidden",
+ "enabled":"false",
+ "permission":"1"
+}
diff --git a/modules/imgmanagement/module.inc.php b/modules/imgmanagement/module.inc.php
new file mode 100644
index 00000000..27844e23
--- /dev/null
+++ b/modules/imgmanagement/module.inc.php
@@ -0,0 +1,76 @@
+<?php
+
+class Page_Imgmanagement extends Page
+{
+
+ private $page;
+ private $baselocation;
+ private $images;
+
+ protected function doPreprocess()
+ {
+
+ User::load();
+ if (!User::hasPermission('baseconfig_local')) {
+ Message::addError('no-permission');
+ Util::redirect('?do=Main');
+ }
+
+
+ //Depends on the server location;
+ $this->baselocation = '/var/images/';
+ $this->images = array();
+
+ error_reporting(E_ALL);
+ ini_set('display_errors','on');
+
+ Session::get('token');
+
+ }
+
+ protected function doRender()
+ {
+ /*get city of user !!!!NOT TESTED!!!!
+
+ $data=array( 'id'= User.getId());
+ $res = Database::exec("SELECT cityid FROM user WHERE userid=:id",$data);
+ $cityid = $res->fetch(PDO::FETCH_ASSOC);
+ $res = Database::exec("SELECT name FROM cities WHERE cityid=:cityid",$cityid);
+ $city = $res->fetch(PDO::FETCH_ASSOC);
+ $location = $baselocation . $city;
+
+
+ verify type of vars (string concatenation and more)
+ !!!!NOT TESTED!!!!
+ */
+
+ error_reporting(E_ALL);
+ ini_set('display_errors','on');
+ //Search images on location specified
+ $location = $this->baselocation . 'curitiba/*';
+ //Gets the configuration of each image
+ $config = substr($location,0,-1).'config.json';
+ $imgsactive = json_decode(file_get_contents($config),true);
+ $images = glob($location, GLOB_ONLYDIR);
+ $actives = array();
+ $deactives= array();
+ foreach($images as &$imgname){
+ $imgname= substr($imgname, strlen($location)-1);
+ //fill associative array (img->active[true/false])
+ $this->images[$imgname] = isset($imgsactive[$imgname])?$imgsactive[$imgname] : false;
+ if($this->images[$imgname]){
+ array_push($actives, array('name' => $imgname));
+ }else{
+ array_push($deactives, array('name'=>$imgname));
+ }
+ }
+
+ //Save eventually new images to config.json
+ $fp = fopen($config,'w');
+ fwrite($fp,json_encode($this->images));
+ fclose($fp);
+ Render::addTemplate('page-imgmanagement', array(
+ 'deactives' => $deactives,
+ 'actives' => $actives));
+ }
+}
diff --git a/modules/imgmanagement/templates/page-imgmanagement.html b/modules/imgmanagement/templates/page-imgmanagement.html
new file mode 100644
index 00000000..795ae39f
--- /dev/null
+++ b/modules/imgmanagement/templates/page-imgmanagement.html
@@ -0,0 +1,46 @@
+<div class="panel panel-default">
+ <div class="panel-heading">
+ Gerenciamento de Imagens
+ </div>
+
+ <div class="panel-body">
+ <div class="alert alert-info">
+ Imagens em azul indicam imagens criadas pelo usuário
+ </div>
+
+ <div class="panel-body col-xs-6">
+ <div class="left">
+ <ul class="source connected">
+ {{#deactives}}
+ <li>{{name}}</li>
+ {{/deactives}}
+ </ul>
+ </div>
+ </div>
+
+ <div class="panel-body col-xs-6">
+ <div class="right">
+ <ul class="target connected" id="ativa1">
+
+ {{#actives}}
+ <li>{{name}}</li>
+ {{/actives}}
+ </ul>
+ </div>
+ </div>
+
+ <a class="btn btn-default" href="#" role="button">Upload de Nova Imagem<a>
+ <a class="btn btn-info" href="#" role="button">Gerar IPXE<a>
+
+ </div>
+</div>
+
+<script src="script/jquery.sortable.min.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $(".source, .target").sortable({
+ connectWith: ".connected"
+ });
+
+ });
+</script>
diff --git a/modules/internetaccess/config.json b/modules/internetaccess/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/internetaccess/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/internetaccess.inc.php b/modules/internetaccess/module.inc.php
index c142285d..b949be26 100644
--- a/modules/internetaccess.inc.php
+++ b/modules/internetaccess/module.inc.php
@@ -36,7 +36,7 @@ class Page_InternetAccess extends Page
if (Request::any('show') === 'update') {
$taskids = Session::get('ia-restart');
if (is_array($taskids)) {
- Render::addTemplate('internetaccess/restart', $taskids);
+ Render::addTemplate('restart', $taskids);
} else {
Message::addError('invalid-action', 'Restart');
}
@@ -45,7 +45,7 @@ class Page_InternetAccess extends Page
if (!isset($data['PROXY_CONF']))
$data['PROXY_CONF'] = 'AUTO';
$data['selected_' . $data['PROXY_CONF']] = 'selected';
- Render::addTemplate('internetaccess/_page', $data);
+ Render::addTemplate('_page', $data);
}
}
diff --git a/templates/internetaccess/_page.html b/modules/internetaccess/templates/_page.html
index a2aaddac..a2aaddac 100644
--- a/templates/internetaccess/_page.html
+++ b/modules/internetaccess/templates/_page.html
diff --git a/templates/internetaccess/restart.html b/modules/internetaccess/templates/restart.html
index effe1feb..effe1feb 100644
--- a/templates/internetaccess/restart.html
+++ b/modules/internetaccess/templates/restart.html
diff --git a/modules/locations/config.json b/modules/locations/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/locations/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/locations.inc.php b/modules/locations/module.inc.php
index d4d0c85f..60af719b 100644
--- a/modules/locations.inc.php
+++ b/modules/locations/module.inc.php
@@ -255,10 +255,10 @@ class Page_Locations extends Page
$row['locations'] = Location::getLocations($row['locationid']);
$rows[] = $row;
}
- Render::addTemplate('locations/subnets', array('list' => $rows));
+ Render::addTemplate('subnets', array('list' => $rows));
} elseif ($getAction === 'showlocations') {
$locs = Location::getLocations();
- Render::addTemplate('locations/locations', array('list' => $locs));
+ Render::addTemplate('locations', array('list' => $locs));
}
}
@@ -325,7 +325,7 @@ class Page_Locations extends Page
$data['machines_online'] = $online;
$data['machines_used'] = $used;
$data['used_percent'] = round(100 * $used / $online);
- echo Render::parse('locations/location-subnets', $data);
+ echo Render::parse('location-subnets', $data);
}
/*
diff --git a/templates/locations/location-subnets.html b/modules/locations/templates/location-subnets.html
index 76b7442a..76b7442a 100644
--- a/templates/locations/location-subnets.html
+++ b/modules/locations/templates/location-subnets.html
diff --git a/templates/locations/locations.html b/modules/locations/templates/locations.html
index 76c8f97c..76c8f97c 100644
--- a/templates/locations/locations.html
+++ b/modules/locations/templates/locations.html
diff --git a/templates/locations/subnets.html b/modules/locations/templates/subnets.html
index 2294f42b..2294f42b 100644
--- a/templates/locations/subnets.html
+++ b/modules/locations/templates/subnets.html
diff --git a/modules/main/config.json b/modules/main/config.json
new file mode 100644
index 00000000..d5da4cc8
--- /dev/null
+++ b/modules/main/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"hidden",
+ "enabled":"true"
+}
diff --git a/modules/main.inc.php b/modules/main/module.inc.php
index 9af1afef..369d4b54 100644
--- a/modules/main.inc.php
+++ b/modules/main/module.inc.php
@@ -18,7 +18,7 @@ class Page_Main extends Page
$this->vmstore = !is_array(Property::getVmStoreConfig());
$this->ipxe = !preg_match('/^\d+\.\d+\.\d+\.\d+$/', Property::getServerIp());
Property::setNeedsSetup(($this->sysconfig || $this->minilinux || $this->vmstore || $this->ipxe) ? 1 : 0);
- $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'");
+ $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'", array(), true);
$this->delPending = isset($res['cnt']) ? $res['cnt'] : 0;
}
}
@@ -34,14 +34,24 @@ class Page_Main extends Page
return;
}
// Logged in here
-
+
+ // Load news
+ $lines = array();
+ $paginate = new Paginate("SELECT newsid, dateline, title, content FROM news ORDER BY dateline DESC", 10);
+ $res = $paginate->exec();
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ if(count($lines) >= 3) break;
+ $lines[] = $row;
+ }
+
Render::addTemplate('page-main', array(
'user' => User::getName(),
'sysconfig' => $this->sysconfig,
'minilinux' => $this->minilinux,
'vmstore' => $this->vmstore,
'ipxe' => $this->ipxe,
- 'delpending' => $this->delPending
+ 'delpending' => $this->delPending,
+ 'news' => $lines
));
}
diff --git a/templates/dialog-generic.html b/modules/main/templates/dialog-generic.html
index 5face8ce..5face8ce 100644
--- a/templates/dialog-generic.html
+++ b/modules/main/templates/dialog-generic.html
diff --git a/templates/footer.html b/modules/main/templates/footer.html
index 8cf71a5c..8cf71a5c 100644
--- a/templates/footer.html
+++ b/modules/main/templates/footer.html
diff --git a/modules/main/templates/main-menu.html b/modules/main/templates/main-menu.html
new file mode 100644
index 00000000..c4534c2f
--- /dev/null
+++ b/modules/main/templates/main-menu.html
@@ -0,0 +1,51 @@
+<!-- Fixed navbar -->
+<div class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="?do=Main">OpenSLX Admin</a>
+ </div>
+ <div class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ {{#dbupdate}}
+ <li><a href="api.php?do=update"><span class="slx-warning-badge badge"><span class="glyphicon glyphicon-exclamation-sign"></span> DB-Update</span></a></li>
+ {{/dbupdate}}
+ {{#warning}}
+ <li><a href="?do=EventLog"><span class="slx-warning-badge badge"><span class="glyphicon glyphicon-exclamation-sign"></span> {{lang_warning}}</span></a></li>
+ {{/warning}}
+ {{#needsSetup}}
+ <li><a href="?do=Main"><span class="slx-warning-badge badge"><span class="glyphicon glyphicon-exclamation-sign"></span> {{lang_needsSetup}}</span></a></li>
+ {{/needsSetup}}
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="lang/{{current_lang}}/flag.png"><b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li class="dropdown-header">{{lang_language}}</li>
+ {{#langs}}
+ <li><a href="?lang={{cc}}&amp;url={{url}}"><img src="lang/{{cc}}/flag.png" alt="{{name}}"> {{name}}</a></li>
+ {{/langs}}
+ </ul>
+ </li>
+ {{#user}}
+ <li>
+ <form method="post" action="?do=Session">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="logout">
+ <b>{{user}}</b>
+ <button class="btn btn-default btn-xs" type="submit">{{lang_logout}}</button>
+ </form>
+ </li>
+ {{/user}}
+ {{^user}}
+ <li><a href="?do=Session&amp;action=login">{{lang_login}}</a></li>
+ {{/user}}
+ </ul>
+ </div>
+ </div>
+</div>
+
diff --git a/templates/main-menu.html b/modules/main/templates/main-menu.html.topnavbar
index 7852dd39..8da8edd0 100644
--- a/templates/main-menu.html
+++ b/modules/main/templates/main-menu.html.topnavbar
@@ -63,6 +63,15 @@
{{/needsSetup}}
</ul>
<ul class="nav navbar-nav navbar-right">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="lang/{{current_lang}}/flag.png"><b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li class="dropdown-header">{{lang_language}}</li>
+ {{#langs}}
+ <li><a href="?lang={{cc}}&amp;url={{url}}"><img src="lang/{{cc}}/flag.png" alt="{{name}}"> {{name}}</a></li>
+ {{/langs}}
+ </ul>
+ </li>
{{#user}}
<li>
<form method="post" action="?do=Session">
diff --git a/modules/main/templates/messagebox-error.html b/modules/main/templates/messagebox-error.html
new file mode 100644
index 00000000..873716c9
--- /dev/null
+++ b/modules/main/templates/messagebox-error.html
@@ -0,0 +1 @@
+<div class="alert alert-danger"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {{{message}}}</div>
diff --git a/modules/main/templates/messagebox-info.html b/modules/main/templates/messagebox-info.html
new file mode 100644
index 00000000..eb9d518a
--- /dev/null
+++ b/modules/main/templates/messagebox-info.html
@@ -0,0 +1 @@
+<div class="alert alert-info"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {{{message}}}</div>
diff --git a/modules/main/templates/messagebox-success.html b/modules/main/templates/messagebox-success.html
new file mode 100644
index 00000000..93674d69
--- /dev/null
+++ b/modules/main/templates/messagebox-success.html
@@ -0,0 +1 @@
+<div class="alert alert-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> {{{message}}}</div>
diff --git a/modules/main/templates/messagebox-warning.html b/modules/main/templates/messagebox-warning.html
new file mode 100644
index 00000000..b02e2e8a
--- /dev/null
+++ b/modules/main/templates/messagebox-warning.html
@@ -0,0 +1 @@
+<div class="alert alert-warning"><span class="glyphicon glyphicon-warning" aria-hidden="true"></span> {{{message}}}</div>
diff --git a/templates/page-login.html b/modules/main/templates/page-login.html
index 247e9a55..247e9a55 100644
--- a/templates/page-login.html
+++ b/modules/main/templates/page-login.html
diff --git a/modules/main/templates/page-main-guest.html b/modules/main/templates/page-main-guest.html
new file mode 100644
index 00000000..28b0d04c
--- /dev/null
+++ b/modules/main/templates/page-main-guest.html
@@ -0,0 +1,15 @@
+<div class="col-md-10" style="float:none; margin: 0 auto;">
+ <div class="jumbotron">
+ <h1>{{lang_welcome}}</h1>
+ <p>{{lang_introGuest}}</p>
+ {{#register}}
+ <ul class="list-group">
+ <li class="list-group-item list-group-item-info">
+ {{lang_noExistingAccount}}
+ <a href="?do=AddUser" class="btn btn-primary btn-lg">{{lang_register}} &raquo;</a>
+ </li>
+ </ul>
+ {{/register}}
+ <p><a href="?do=Session&amp;action=login" class="btn btn-primary btn-lg">{{lang_login}} &raquo;</a></p>
+ </div>
+</div>
diff --git a/templates/page-main.html b/modules/main/templates/page-main.html
index 64264a5d..39e4e74e 100644
--- a/templates/page-main.html
+++ b/modules/main/templates/page-main.html
@@ -1,6 +1,7 @@
<div class="jumbotron">
<h1>{{lang_welcome}}, {{user}}</h1>
<p>{{lang_intro}}</p>
+
</div>
<ul class="list-group">
{{#vmstore}}
diff --git a/templates/page-minilinux.html b/modules/main/templates/page-minilinux.html
index dc13e6b0..dc13e6b0 100644
--- a/templates/page-minilinux.html
+++ b/modules/main/templates/page-minilinux.html
diff --git a/templates/page-news.html b/modules/main/templates/page-news.html
index 8e400498..8e400498 100644
--- a/templates/page-news.html
+++ b/modules/main/templates/page-news.html
diff --git a/templates/page-syslog.html b/modules/main/templates/page-syslog.html
index 98e94291..98e94291 100644
--- a/templates/page-syslog.html
+++ b/modules/main/templates/page-syslog.html
diff --git a/templates/page-vmstore.html b/modules/main/templates/page-vmstore.html
index fe2c5225..fe2c5225 100644
--- a/templates/page-vmstore.html
+++ b/modules/main/templates/page-vmstore.html
diff --git a/templates/pagenav.html b/modules/main/templates/pagenav.html
index 93194999..93194999 100644
--- a/templates/pagenav.html
+++ b/modules/main/templates/pagenav.html
diff --git a/templates/tm-callback-trigger.html b/modules/main/templates/tm-callback-trigger.html
index cd03a1fe..cd03a1fe 100644
--- a/templates/tm-callback-trigger.html
+++ b/modules/main/templates/tm-callback-trigger.html
diff --git a/modules/minilinux/config.json b/modules/minilinux/config.json
new file mode 100644
index 00000000..93209f62
--- /dev/null
+++ b/modules/minilinux/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"settings",
+ "enabled":"true"
+}
diff --git a/modules/minilinux.inc.php b/modules/minilinux/module.inc.php
index 0853c0db..91be456e 100644
--- a/modules/minilinux.inc.php
+++ b/modules/minilinux/module.inc.php
@@ -29,7 +29,7 @@ class Page_MiniLinux extends Page
if (!is_array($data) || !isset($data['systems'])) {
echo Render::parse('messagebox-error', array(
'message' => 'Failed to retrieve the list: ' . print_r($data, true)
- ));
+ ),'main');
return;
}
$action = Request::any('action');
@@ -68,7 +68,7 @@ class Page_MiniLinux extends Page
if ($taskId !== false) {
$task = Taskmanager::status($taskId);
if (isset($task['data']['progress'])) {
- $file['download'] = Render::parse('minilinux/download', array(
+ $file['download'] = Render::parse('download', array(
'task' => $taskId,
'name' => $file['name']
));
@@ -80,7 +80,7 @@ class Page_MiniLinux extends Page
$system['version'] = $selected['version'];
}
$data['versions'] = array_values($versionNumbers);
- echo Render::parse('minilinux/filelist', $data);
+ echo Render::parse('filelist', $data);
return;
case 'download':
$id = Request::post('id');
@@ -117,7 +117,7 @@ class Page_MiniLinux extends Page
return;
}
Property::setDownloadTask($file['md5'], $task['id']);
- echo Render::parse('minilinux/download', array(
+ echo Render::parse('download', array(
'name' => $name,
'task' => $task['id']
));
diff --git a/templates/minilinux/download.html b/modules/minilinux/templates/download.html
index 2e32df5a..2e32df5a 100644
--- a/templates/minilinux/download.html
+++ b/modules/minilinux/templates/download.html
diff --git a/templates/minilinux/filelist.html b/modules/minilinux/templates/filelist.html
index ca94f4d0..ca94f4d0 100644
--- a/templates/minilinux/filelist.html
+++ b/modules/minilinux/templates/filelist.html
diff --git a/modules/minilinux/templates/page-minilinux.html b/modules/minilinux/templates/page-minilinux.html
new file mode 100644
index 00000000..007e1e1b
--- /dev/null
+++ b/modules/minilinux/templates/page-minilinux.html
@@ -0,0 +1,28 @@
+<div id="systemlist">
+ <div class="panel panel-default">{{lang_listObtained}}</div>
+ <!-- OLD CODE ??
+ <script type="text/javascript">
+ var slx_check = setInterval(function() {
+ if (typeof $ === 'undefined') return;
+ clearInterval(slx_check);
+ $('#systemlist').load('{{{listurl}}}', function( response, status, xhr ) {
+ if ( status === "error" ) {
+ var msg = "{{lang_errorGetting}}";
+ $( "#systemlist" ).html( msg + xhr.status + " " + xhr.statusText );
+ }
+ })
+ }, 100);
+ </script>
+ OLD CODE ?? -->
+</div>
+
+<script type="text/javascript"><!--
+ function loadSystemList(version) {
+ $('#systemlist').load('{{{listurl}}}', { token: TOKEN, version: version }, function( response, status, xhr ) {
+ if ( status === "error" ) {
+ var msg = "{{lang_errorGetting}}";
+ $( "#systemlist" ).html( msg + xhr.status + " " + xhr.statusText );
+ }
+ });
+ }
+// --></script> \ No newline at end of file
diff --git a/modules/news/config.json b/modules/news/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/news/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/news.inc.php b/modules/news/module.inc.php
index d0aa32ea..9bbadc4f 100644
--- a/modules/news.inc.php
+++ b/modules/news/module.inc.php
@@ -164,4 +164,4 @@ class Page_News extends Page
Util::redirect('?do=News');
}
-}
+} \ No newline at end of file
diff --git a/modules/news/templates/page-news.html b/modules/news/templates/page-news.html
new file mode 100644
index 00000000..8e400498
--- /dev/null
+++ b/modules/news/templates/page-news.html
@@ -0,0 +1,57 @@
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_editNews}}
+ </div>
+ <div class="panel-body">
+ <p>{{lang_newsIntro}}</p>
+ <form action="?do=News&amp;action=save" method="post">
+ <div class="form-group">
+ <label for="news-title-id">{{lang_title}}</label>
+ <input type="text" name="news-title" id ="news-title-id" class="form-control" placeholder="{{welcome}}" value="{{latestTitle}}">
+ </div>
+ <div class="form-group">
+ <label for="news-content-id">{{lang_content}}</label>
+ <textarea name="news-content" id ="news-content-id" class="form-control" rows="5" cols="30" placeholder="">{{latestContent}}</textarea>
+ </div>
+ <p>{{lang_latestUpdate}}: {{latestDate}}</p>
+ <button class="btn btn-primary btn-sm" type="submit">{{lang_save}}</button>
+ <input type="hidden" name="token" value="{{token}}">
+ </form>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_newsOld}}
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <form method="post" action="?do=News&amp;action=delete">
+ <input type="hidden" name="token" value="{{token}}">
+ <table class="table table-stripped table-condensed">
+ <thead>
+ <tr>
+ <th>{{lang_date}}</th>
+ <th>{{lang_title}}</th>
+ <th>{{lang_content}}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#list}}
+ <tr {{#active}}class="active"{{/active}}>
+ <td class="text-left nowrap">{{date}}</td>
+ <td class="slx-ellipsis">{{title}}</td>
+ <td class="slx-ellipsis">{{content}}</td>
+ <td>
+ <a class="btn btn-primary btn-xs" href="?do=news&amp;newsid={{newsid}}&amp;action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a>
+ <button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button>
+ </td>
+ </tr>
+ {{/list}}
+ </tbody>
+ </table>
+ </form>
+ </div>
+ </div>
+</div>
diff --git a/modules/serversetup/config.json b/modules/serversetup/config.json
new file mode 100644
index 00000000..93209f62
--- /dev/null
+++ b/modules/serversetup/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"settings",
+ "enabled":"true"
+}
diff --git a/modules/serversetup.inc.php b/modules/serversetup/module.inc.php
index 87ebfdad..e37d7d40 100644
--- a/modules/serversetup.inc.php
+++ b/modules/serversetup/module.inc.php
@@ -3,10 +3,10 @@
class Page_ServerSetup extends Page
{
+ private $mountIpxeTask;
private $taskStatus;
private $currentAddress;
private $currentMenu;
- private $hasIpSet = false;
protected function doPreprocess()
{
@@ -19,6 +19,14 @@ class Page_ServerSetup extends Page
$this->currentMenu = Property::getBootMenu();
+ if(Request::get('download') !== false){
+ $this->downloadIpxe(Request::get('download'));
+ }
+
+ if(Request::get('defaultIpxe') !== false){
+ $this->defaultIpxe(Request::get('defaultIpxe'));
+ }
+
$action = Request::post('action');
if ($action === false) {
@@ -36,6 +44,16 @@ class Page_ServerSetup extends Page
// iPXE stuff changes
$this->updatePxeMenu();
}
+
+ if($action === 'save-script') {
+ // Save new iPXE script
+ $this->updateIpxeScript();
+ }
+
+ if($action === 'default-script') {
+ // Restore iPXE script to default
+ $this->defaultIpxe();
+ }
}
protected function doRender()
@@ -44,12 +62,11 @@ class Page_ServerSetup extends Page
$taskid = Request::any('taskid');
if ($taskid !== false && Taskmanager::isTask($taskid)) {
- Render::addTemplate('serversetup/ipxe_update', array('taskid' => $taskid));
+ Render::addTemplate('ipxe_update', array('taskid' => $taskid));
}
- Render::addTemplate('serversetup/ipaddress', array(
- 'ips' => $this->taskStatus['data']['addresses'],
- 'chooseHintClass' => $this->hasIpSet ? '' : 'alert alert-danger'
+ Render::addTemplate('ipaddress', array(
+ 'ips' => $this->taskStatus['data']['addresses']
));
$data = $this->currentMenu;
if (!isset($data['defaultentry']))
@@ -60,7 +77,7 @@ class Page_ServerSetup extends Page
$data['active-hdd'] = 'checked';
if ($data['defaultentry'] === 'custom')
$data['active-custom'] = 'checked';
- Render::addTemplate('serversetup/ipxe', $data);
+ Render::addTemplate('ipxe', $data);
}
// -----------------------------------------------------------------------------------------------
@@ -87,7 +104,6 @@ class Page_ServerSetup extends Page
}
if ($this->currentAddress === $item['ip']) {
$item['default'] = true;
- $this->hasIpSet = true;
}
$sortIp[] = $item['ip'];
}
@@ -138,4 +154,33 @@ class Page_ServerSetup extends Page
Util::redirect('?do=ServerSetup&taskid=' . $id);
}
+ private function downloadIpxe($ipxe){
+ $file = '/opt/taskmanager/data/ipxe/src/bin/ipxe.' . $ipxe;
+ if (file_exists($file)) {
+ header('Content-Description: File Transfer');
+ header('Content-Type: application/octet-stream');
+ header('Content-Disposition: attachment; filename='.basename($file));
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($file));
+ ob_clean();
+ flush();
+ readfile($file);
+ exit();
+ }
+ }
+
+ private function updateIpxeScript(){
+ $newScript = Request::post('custom-script');
+ file_put_contents("/opt/taskmanager/data/pxe.embed",$newScript);
+ Util::redirect('?do=ServerSetup');
+ }
+
+ private function defaultIpxe(){
+ $default = file_get_contents("/opt/taskmanager/data/pxe_default.embed");
+ $default = str_replace("{{ip}}", "http://" . Property::getServerIp(), $default);
+ file_put_contents("/opt/taskmanager/data/pxe.embed",$default);
+ Util::redirect('?do=ServerSetup');
+ }
}
diff --git a/templates/serversetup/ipaddress.html b/modules/serversetup/templates/ipaddress.html
index 0b3b2ed7..e4967703 100644
--- a/templates/serversetup/ipaddress.html
+++ b/modules/serversetup/templates/ipaddress.html
@@ -3,9 +3,9 @@
{{lang_bootAddress}}
</div>
<div class="panel-body">
- <div class="{{chooseHintClass}}">
+ <p>
{{lang_chooseIP}}
- </div>
+ </p>
<form method="post" action="?do=ServerSetup">
<input type="hidden" name="action" value="ip">
<input type="hidden" name="token" value="{{token}}">
diff --git a/modules/serversetup/templates/ipxe.html b/modules/serversetup/templates/ipxe.html
new file mode 100644
index 00000000..54d7db16
--- /dev/null
+++ b/modules/serversetup/templates/ipxe.html
@@ -0,0 +1,149 @@
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_mountIpxe}}
+ </div>
+ <div class="panel-body">
+ <p>{{lang_ipxeInfo}}</p>
+ <label for="ext">{{lang_extension}}:</label>
+ <select name="ext" class="form-control">
+ <option value="kkpxe">.kkpxe</option>
+ <option value="usb">.usb</option>
+ <option value="iso">.iso</option>
+ </select>
+ <br>
+ <form method="post" action="?do=ServerSetup" style="display:inline;">
+ <input type="hidden" name="action" value="save-script">
+ <input type="hidden" name="token" value="{{token}}">
+
+ <label for="custom-script">{{lang_customScript}}</label>
+ <textarea class="form-control" name="custom-script" rows="9" style="resize:none">{{script}}</textarea>
+ <br>
+ <input class="btn btn-default btn-sm" type="submit" value="{{lang_saveScript}}" />
+ </form>
+ <form method="post" action="?do=ServerSetup" style="display:inline;">
+ <input type="hidden" name="action" value="default-script">
+ <input type="hidden" name="token" value="{{token}}">
+ <input class="btn btn-default btn-sm" type="submit" value="{{lang_restoreDefault}}" />
+ </form>
+ </div>
+ <div class="panel-footer">
+ <button id="mount-button" onclick="mountIpxe();" class="btn btn-primary" type="button" data-toggle="modal" data-target="#ipxe-modal" data-backdrop="static"> {{lang_compile}}
+ </button>
+ </div>
+</div>
+
+<form method="post" action="?do=ServerSetup">
+ <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;">
+ <input type="password" name="password_fake" id="password_fake" value="" style="display:none;">
+ <input type="hidden" name="action" value="ipxe">
+ <input type="hidden" name="token" value="{{token}}">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_bootMenu}}
+ </div>
+ <div class="panel-body">
+ <p>
+ {{lang_bootInfo}}
+ </p>
+ <br>
+
+ <div class="form-group">
+ <strong>{{lang_bootBehavior}}</strong>
+ <div><label class="radio-inline"><input type="radio" name="defaultentry" value="net" {{active-net}}> bwLehrpool</label></div>
+ <div><label class="radio-inline"><input type="radio" name="defaultentry" value="hdd" {{active-hdd}}> {{lang_localHDD}}</label></div>
+ <div><label class="radio-inline"><input type="radio" name="defaultentry" value="custom" {{active-custom}}> {{lang_customEntry}} (&quot;custom&quot;)</label></div>
+ </div>
+
+ <div class="form-group">
+ <strong>{{lang_menuDisplayTime}}</strong>
+ <div class="input-group form-narrow">
+ <input type="text" class="form-control" name="timeout" value="{{timeout}}" pattern="\d+">
+ <span class="input-group-addon">{{lang_seconds}}</span>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <strong>{{lang_masterPassword}}</strong>
+ <div class="form-narrow">
+ <input type="{{password_type}}" class="form-control" name="masterpassword" value="{{masterpasswordclear}}">
+ </div>
+ <i>{{lang_masterPasswordHelp}}</i>
+ </div>
+
+ <div class="form-group">
+ <strong>{{lang_menuCustom}}</strong> <a class="btn btn-default btn-xs" data-toggle="modal" data-target="#help-custom"><span class="glyphicon glyphicon-question-sign"></span></a>
+ <textarea class="form-control" name="custom" rows="8">{{custom}}</textarea>
+ </div>
+ </div>
+
+ <div class="panel-footer">
+ <button class="btn btn-primary" name="action" value="ipxe">{{lang_bootMenuCreate}}</button>
+ </div>
+ </div>
+</form>
+
+<div class="modal fade" id="help-custom" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">{{lang_menuCustom}}</div>
+ <div class="modal-body">
+ {{lang_menuCustomHint1}}
+ <br>{{lang_example}}:
+ <pre>LABEL custom
+ MENU LABEL ^My Boot Entry
+ KERNEL http://1.2.3.4/kernel
+ INITRD http://1.2.3.4/initramfs-stage31
+ APPEND custom=option
+ IPAPPEND 3</pre>
+ {{lang_menuCustomHint2}} LABEL <strong>custom</strong>
+ {{lang_menuCustomHint3}}
+ </div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fade" id="ipxe-modal" tabindex="-1" role="dialog" aria-labelledby="ipxe-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="ipxe-modal-label">{{lang_compilingIpxe}}</h4>
+ </div>
+ <div class="modal-body" id="ipxe-modal-body">
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
+ <button id="download-btn" type="button" class="btn btn-primary" disabled="disabled" onclick="downloadIpxe()">{{lang_download}}</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script>
+ function mountIpxe() {
+ document.getElementById('ipxe-modal-body').innerHTML = "<div class='alert alert-info' role='alert'>{{lang_ipxeWarning}}</div>"
+ + "{{lang_loading}} <img src='fonts/loader.gif'/>";
+ $("#download-btn").prop("disabled",true);
+ var xmlhttp = new XMLHttpRequest();
+ var extension = $("select[name=ext]").val();
+ xmlhttp.open("GET","?do=ServerSetup&async=true&submitTask=true&extension=" + extension,true);
+ xmlhttp.onreadystatechange= function() {
+ if (xmlhttp.readyState==4 && xmlhttp.status==200) {
+ var initResponse = xmlhttp.responseText;
+ if(initResponse != "success")
+ document.getElementById('ipxe-modal-body').innerHTML = initResponse;
+ else {
+ document.getElementById('ipxe-modal-body').innerHTML = "{{lang_success}}: ipxe." + extension;
+ $("#download-btn").prop("disabled",false);
+ }
+ }
+ }
+ xmlhttp.send();
+ }
+
+ function downloadIpxe() {
+ window.location = "?do=ServerSetup&download=" + $("select[name=ext]").val();
+ }
+</script>
diff --git a/templates/serversetup/ipxe_update.html b/modules/serversetup/templates/ipxe_update.html
index 9c598667..9c598667 100644
--- a/templates/serversetup/ipxe_update.html
+++ b/modules/serversetup/templates/ipxe_update.html
diff --git a/modules/session/config.json b/modules/session/config.json
new file mode 100644
index 00000000..d5da4cc8
--- /dev/null
+++ b/modules/session/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"hidden",
+ "enabled":"true"
+}
diff --git a/modules/session.inc.php b/modules/session/module.inc.php
index 5b9bc7fc..ef135f9d 100644
--- a/modules/session.inc.php
+++ b/modules/session/module.inc.php
@@ -6,7 +6,6 @@ class Page_Session extends Page
protected function doPreprocess()
{
User::load();
-
if (Request::post('action') === 'login') {
// Login - see if already logged in
if (User::isLoggedIn()) // and then just redirect
@@ -18,7 +17,6 @@ class Page_Session extends Page
sleep(1);
Message::addError('loginfail');
}
-
if (Request::post('action') === 'logout') {
// Log user out (or do nothing if not logged in)
User::logout();
diff --git a/modules/session/templates/page-login.html b/modules/session/templates/page-login.html
new file mode 100644
index 00000000..247e9a55
--- /dev/null
+++ b/modules/session/templates/page-login.html
@@ -0,0 +1,11 @@
+<form class="form-signin" action="?do=Session" method="post">
+ <h2 class="form-signin-heading">{{lang_enter}}</h2>
+ <input type="text" name="user" class="form-control" placeholder="{{lang_username}}" autofocus>
+ <input type="password" name="pass" class="form-control" placeholder="{{lang_password}}">
+ <!--label class="checkbox">
+ <input type="checkbox" name="remember" value="remember-me"> {{lang_rememberID}}
+ </label-->
+ <button class="btn btn-lg btn-primary btn-block" type="submit">{{lang_login}}</button>
+ <a class="btn btn-lg btn-primary btn-block" href="?do=AddUser">{{lang_register}}</a>
+ <input type="hidden" name="action" value="login">
+</form> \ No newline at end of file
diff --git a/modules/statistics/config.json b/modules/statistics/config.json
new file mode 100644
index 00000000..17acab76
--- /dev/null
+++ b/modules/statistics/config.json
@@ -0,0 +1,5 @@
+{
+ "category":"status",
+ "enabled":"true",
+ "permission":"0"
+}
diff --git a/modules/statistics.inc.php b/modules/statistics/module.inc.php
index dbac4b75..faf88521 100644
--- a/modules/statistics.inc.php
+++ b/modules/statistics/module.inc.php
@@ -66,6 +66,8 @@ class Page_Statistics extends Page
foreach ($json as $entry) {
$total += $entry['value'];
}
+ if ($total === 0)
+ return;
$cap = ceil($total * $cutoff);
$accounted = 0;
$id = 0;
@@ -92,11 +94,16 @@ class Page_Statistics extends Page
$on = Database::queryFirst("SELECT Count(*) AS val FROM machine WHERE lastseen > $online");
$used = Database::queryFirst("SELECT Count(*) AS val FROM machine WHERE lastseen > $online AND logintime <> 0");
$hdd = Database::queryFirst("SELECT Count(*) AS val FROM machine WHERE badsectors > 10 AND lastseen > $cutoff");
+ if ($on['val'] != 0) {
+ $usedpercent = round($used['val'] / $on['val'] * 100);
+ } else {
+ $usedpercent = 0;
+ }
$data = array(
'known' => $known['val'],
'online' => $on['val'],
'used' => $used['val'],
- 'usedpercent' => round($used['val'] / $on['val'] * 100),
+ 'usedpercent' => $usedpercent,
'badhdd' => $hdd['val']
);
// Graph
@@ -123,7 +130,7 @@ class Page_Statistics extends Page
}
$data['json'] = json_encode(array('labels' => $labels, 'datasets' => array($points1, $points2)));
// Draw
- Render::addTemplate('statistics/summary', $data);
+ Render::addTemplate('summary', $data);
}
private function showSystemModels()
@@ -148,7 +155,7 @@ class Page_Statistics extends Page
++$id;
}
$this->capChart($json, 0.92);
- Render::addTemplate('statistics/cpumodels', array('rows' => $lines, 'json' => json_encode($json)));
+ Render::addTemplate('cpumodels', array('rows' => $lines, 'json' => json_encode($json)));
}
private function showMemory()
@@ -185,7 +192,7 @@ class Page_Statistics extends Page
}
$this->capChart($json, 0.92);
$data['json'] = json_encode($json);
- Render::addTemplate('statistics/memory', $data);
+ Render::addTemplate('memory', $data);
}
private function showKvmState()
@@ -202,7 +209,7 @@ class Page_Statistics extends Page
'value' => $row['count']
);
}
- Render::addTemplate('statistics/kvmstate', array('rows' => $lines, 'json' => json_encode($json)));
+ Render::addTemplate('kvmstate', array('rows' => $lines, 'json' => json_encode($json)));
}
private function showId44()
@@ -245,7 +252,7 @@ class Page_Statistics extends Page
}
$this->capChart($json, 0.95);
$data['json'] = json_encode($json);
- Render::addTemplate('statistics/id44', $data);
+ Render::addTemplate('id44', $data);
}
private function showLatestMachines()
@@ -271,7 +278,7 @@ class Page_Statistics extends Page
}
$rows[] = $row;
}
- Render::addTemplate('statistics/newclients', array('rows' => $rows, 'openbutton' => $count > 5));
+ Render::addTemplate('newclients', array('rows' => $rows, 'openbutton' => $count > 5));
}
private function showMachineList($filter, $argument)
@@ -352,7 +359,7 @@ class Page_Statistics extends Page
if (empty($row['hostname'])) $row['hostname'] = $row['clientip'];
$rows[] = $row;
}
- Render::addTemplate('statistics/clientlist', array('rows' => $rows, 'filter' => $filter, 'argument' => $argument));
+ Render::addTemplate('clientlist', array('rows' => $rows, 'filter' => $filter, 'argument' => $argument));
}
private function ramColorClass($mb)
@@ -469,7 +476,7 @@ class Page_Statistics extends Page
}
unset($client['data']);
// Throw output at user
- Render::addTemplate('statistics/machine-main', $client);
+ Render::addTemplate('machine-main', $client);
// Sessions
$NOW = time();
$cutoff = $NOW - 86400 * 7;
@@ -538,11 +545,11 @@ class Page_Statistics extends Page
$spans['rows2'] = array_slice($spans['rows'], ceil(count($spans['rows']) / 2));
$spans['rows'] = array_slice($spans['rows'], 0, ceil(count($spans['rows']) / 2));
}
- Render::addTemplate('statistics/machine-usage', $spans);
+ Render::addTemplate('machine-usage', $spans);
// Any hdds?
if (!empty($hdds['hdds'])) {
Render::addScriptBottom('chart.min');
- Render::addTemplate('statistics/machine-hdds', $hdds);
+ Render::addTemplate('machine-hdds', $hdds);
}
// Client log
$lres = Database::simpleQuery("SELECT logid, dateline, logtypeid, clientip, description, extra FROM clientlog"
@@ -564,12 +571,12 @@ class Page_Statistics extends Page
$log[] = $row;
if (++$count === 10) break;
}
- Render::addTemplate('statistics/syslog', array(
+ Render::addTemplate('syslog', array(
'clientip' => $client['clientip'],
'list' => $log
));
// Notes
- Render::addTemplate('statistics/machine-notes', $client);
+ Render::addTemplate('machine-notes', $client);
}
private function eventToIconName($event)
diff --git a/templates/statistics/clientlist.html b/modules/statistics/templates/clientlist.html
index 8e8565fe..8e8565fe 100644
--- a/templates/statistics/clientlist.html
+++ b/modules/statistics/templates/clientlist.html
diff --git a/templates/statistics/cpumodels.html b/modules/statistics/templates/cpumodels.html
index 2f24cd92..2f24cd92 100644
--- a/templates/statistics/cpumodels.html
+++ b/modules/statistics/templates/cpumodels.html
diff --git a/templates/statistics/id44.html b/modules/statistics/templates/id44.html
index 730839b1..730839b1 100644
--- a/templates/statistics/id44.html
+++ b/modules/statistics/templates/id44.html
diff --git a/templates/statistics/kvmstate.html b/modules/statistics/templates/kvmstate.html
index 107a34f7..107a34f7 100644
--- a/templates/statistics/kvmstate.html
+++ b/modules/statistics/templates/kvmstate.html
diff --git a/templates/statistics/machine-hdds.html b/modules/statistics/templates/machine-hdds.html
index fd6cf1be..fd6cf1be 100644
--- a/templates/statistics/machine-hdds.html
+++ b/modules/statistics/templates/machine-hdds.html
diff --git a/templates/statistics/machine-main.html b/modules/statistics/templates/machine-main.html
index 8071416a..8071416a 100644
--- a/templates/statistics/machine-main.html
+++ b/modules/statistics/templates/machine-main.html
diff --git a/templates/statistics/machine-notes.html b/modules/statistics/templates/machine-notes.html
index c4f97543..c4f97543 100644
--- a/templates/statistics/machine-notes.html
+++ b/modules/statistics/templates/machine-notes.html
diff --git a/templates/statistics/machine-usage.html b/modules/statistics/templates/machine-usage.html
index ffaa747b..ffaa747b 100644
--- a/templates/statistics/machine-usage.html
+++ b/modules/statistics/templates/machine-usage.html
diff --git a/templates/statistics/memory.html b/modules/statistics/templates/memory.html
index f4d2ad24..f4d2ad24 100644
--- a/templates/statistics/memory.html
+++ b/modules/statistics/templates/memory.html
diff --git a/templates/statistics/newclients.html b/modules/statistics/templates/newclients.html
index 0d9c74df..0d9c74df 100644
--- a/templates/statistics/newclients.html
+++ b/modules/statistics/templates/newclients.html
diff --git a/templates/statistics/summary.html b/modules/statistics/templates/summary.html
index 5f16fd89..5f16fd89 100644
--- a/templates/statistics/summary.html
+++ b/modules/statistics/templates/summary.html
diff --git a/templates/statistics/syslog.html b/modules/statistics/templates/syslog.html
index c82cb8ac..c82cb8ac 100644
--- a/templates/statistics/syslog.html
+++ b/modules/statistics/templates/syslog.html
diff --git a/modules/support/config.json b/modules/support/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/support/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/support/module.inc.php b/modules/support/module.inc.php
new file mode 100644
index 00000000..d4012c1a
--- /dev/null
+++ b/modules/support/module.inc.php
@@ -0,0 +1,77 @@
+<?php
+
+class Page_Support extends Page
+{
+
+ protected function doPreprocess(){
+ User::load();
+ if (!User::hasPermission('superadmin')) {
+ Message::addError('no-permission');
+ Util::redirect('?do=Main');
+ }
+ error_reporting(E_ALL);
+ ini_set('display_errors','on');
+
+ Session::get('token');
+
+
+ //THIS IS NOT WORKING
+ //Cant connect to ANY smtp server
+ /*
+ if (strpos($_SERVER['REQUEST_URI'], "action=send") !== false){
+ require '/var/www/slx-admin/phpmailer/PHPMailerAutoload.php';
+
+ $mail = new PHPMailer;
+ $mail->SMTPDebug = 3; // Enable verbose debug output
+ $mail->isSMTP(); // Set mailer to use SMTP
+ $mail->Host = 'mx.c3sl.ufpr.br'; // Specify main and backup SMTP servers
+ $mail->SMTPAuth = true; // Enable SMTP authentication
+ $mail->Username = 'xxx00@inf.ufpr.br'; // SMTP username
+ $mail->Password = ''; // SMTP password
+ // $mail->SMTPSecure = 'false'; // Enable TLS encryption, `ssl` also accepted
+ $mail->Port = 25; // TCP port to connect to
+
+ $mail->From = 'xxx00@inf.ufpr.br';
+ $mail->FromName = 'Someone';
+ $mail->addAddress('receiver@email.com', 'Another One'); // Add a recipient
+ // $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
+ // $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
+ $mail->isHTML(true); // Set email format to HTML
+ $mail->Subject = 'Here is the subject';
+ $mail->Body = 'This is the HTML message body <b>in bold!</b>';
+ $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
+
+ if(!$mail->send()) {
+ echo 'Message could not be sent.';
+ echo 'Mailer Error: ' . $mail->ErrorInfo;
+ } else {
+ echo 'Message has been sent';
+ }
+ */
+// $uploaddir = '/var/www/uploads/';
+// $uploadfile = $uploaddir . basename($_FILES['inp_file']['name']);
+// if(move_uploaded_file($_FILES['inp_file']['tmp_name'], $uploadfile))
+// Message::addSuccess('news-save-success');
+// else
+// Message::addError('news-empty');
+// mail($to,$_POST[assuntoEmail],$_POST[conteudoEmail],"-r".$from);
+// mail($to,$assunto,$content,$headers);
+
+
+ }
+
+
+
+ protected function doRender(){
+ error_reporting(E_ALL);
+ ini_set('display_errors','on');
+ if (strpos($_SERVER['REQUEST_URI'], "true") !== false)
+ Render::addTemplate('page-faq');
+ else
+ Render::addTemplate('page-support');
+// Render::addTemplate('page-support', array(
+// 'token' => Session:get('token'));
+ }
+
+
+}
diff --git a/modules/support/templates/page-faq.html b/modules/support/templates/page-faq.html
new file mode 100644
index 00000000..ec9fe832
--- /dev/null
+++ b/modules/support/templates/page-faq.html
@@ -0,0 +1,58 @@
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <strong>{{lang_faq}}</strong>
+ </div>
+ <!-- //FAQ -->
+ <div class="panel-body" id="accordion" role="tablist" aria-multiselectable="true">
+
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingOne">
+ <h4 class="panel-title">
+ <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
+ {{lang_faq#1}}
+ </a>
+ </h4>
+ </div>
+ <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
+ <div class="panel-body">
+ {{lang_content#1}}
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingTwo">
+ <h4 class="panel-title">
+ <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
+ {{lang_faq#2}}
+ </a>
+ </h4>
+ </div>
+ <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
+ <div class="panel-body">
+ {{lang_content#2}}
+ </div>
+ </div>
+ </div>
+
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingThree">
+ <h4 class="panel-title">
+ <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
+ {{lang_faq#3}}
+ </a>
+ </h4>
+ </div>
+ <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
+ <div class="panel-body">
+ {{lang_content#3}}
+ </div>
+ </div>
+ </div>
+
+ <a class="btn btn-default" href="?do=Support&amp;showfaq=false" role="button"><strong>{{lang_supIntro}}</strong></a>
+ </div>
+</div>
+</div>
+
+
diff --git a/modules/support/templates/page-support.html b/modules/support/templates/page-support.html
new file mode 100644
index 00000000..231cbc1b
--- /dev/null
+++ b/modules/support/templates/page-support.html
@@ -0,0 +1,67 @@
+<p>{{lang_supIntro}}</p>
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <strong>{{lang_faq}}</strong>
+ </div>
+ <!-- //FAQ -->
+ <div class="panel-body" id="accordion" role="tablist" aria-multiselectable="true">
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingOne">
+ <h4 class="panel-title">
+ <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
+ {{lang_faq#1}}
+ </a>
+ </h4>
+ </div>
+ <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
+ <div class="panel-body">
+ {{lang_content#1}}
+ </div>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingTwo">
+ <h4 class="panel-title">
+ <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
+ {{lang_faq#2}}
+ </a>
+ </h4>
+ </div>
+ <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
+ <div class="panel-body">
+ {{lang_content#2}}
+ </div>
+ </div>
+ </div>
+ <a class="btn btn-default" href="?do=Support&amp;showfaq=true" role="button"><strong>{{lang_showall}}</strong></a>
+ </div>
+</div>
+
+ <!-- //Send questions (token and input not ok) -->
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <strong>{{lang_form}}</strong>
+ </div>
+ <div class="panel-body">
+ <form action="?do=Support&amp;showfaq=false&amp;action=send" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="token" value="{{token}}">
+ <div class="form-group">
+ <label for="emailHeader">{{lang_header}}</label>
+ <input type="text" class="form-control" placeholder="{{lang_header}}" value="{{assuntoEmail}}">
+ </div>
+ <div class="form-group">
+ <label for="emailContent">{{lang_content}}</label>
+ <textarea class="form-control" rows="2" cols="20" placeholder="{{lang_content}}">{{conteudoEmail}}</textarea>
+ </div>
+ <div class="form-group">
+ <label for="inputFile">{{lang_fileInput}}</label>
+ <input type="file" name="inp_file" id="inp_file">
+ <input type="hidden" name="token" value="{{token}}">
+ <p class="help-block">{{lang_helpInput}}</p>
+ </div>
+ <button type="submit" class="btn btn-default">{{lang_submit}}</button>
+ </form>
+ </div>
+</div>
+
+
diff --git a/modules/sysconfig/addconfig.inc.php b/modules/sysconfig/addconfig.inc.php
index e51a7f64..8203e555 100644
--- a/modules/sysconfig/addconfig.inc.php
+++ b/modules/sysconfig/addconfig.inc.php
@@ -170,7 +170,7 @@ class AddConfig_Start extends AddConfig_Base
}
}
unset($mod);
- Render::addDialog(Dictionary::translate("lang_configurationCompilation"), false, 'sysconfig/cfg-start', array(
+ Render::addDialog(Dictionary::translate("lang_configurationCompilation"), false, 'cfg-start', array(
'step' => 'AddConfig_Finish',
'groups' => array_values($modGroups),
'title' => $title,
@@ -213,7 +213,7 @@ class AddConfig_Finish extends AddConfig_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('lang_configurationCompilation'), false, 'sysconfig/cfg-finish', array(
+ Render::addDialog(Dictionary::translate('lang_configurationCompilation'), false, 'cfg-finish', array(
'configid' => $this->config->id()
));
}
diff --git a/modules/sysconfig/addmodule.inc.php b/modules/sysconfig/addmodule.inc.php
index a20bda37..bcd8e796 100644
--- a/modules/sysconfig/addmodule.inc.php
+++ b/modules/sysconfig/addmodule.inc.php
@@ -18,35 +18,6 @@ abstract class AddModule_Base
* @var \ConfigModule
*/
protected $edit = false;
-
- protected $bag = false;
-
- private $bagId = false;
-
- protected function loadBag($createIfNone = true)
- {
- if ($this->bagId !== false)
- return $this->bagId;
- $bagId = Request::any('bag', '', 'string');
- $this->bag = Session::get($bagId);
- if ($this->bag === false) {
- if (!$createIfNone)
- return false;
- $this->bagId = dechex(rand());
- $this->bag = array();
- } else {
- $this->bagId = $bagId;
- }
- return $this->bagId;
- }
-
- protected function saveBag()
- {
- if ($this->bagId === false)
- return false;
- Session::set($this->bagId, $this->bag);
- return true;
- }
/**
*
@@ -160,7 +131,7 @@ class AddModule_Start extends AddModule_Base
$order[] = $module['sortOrder'];
}
array_multisort($order, SORT_ASC, $title, SORT_ASC, $mods);
- Render::addDialog(Dictionary::translate('lang_moduleAdd'), false, 'sysconfig/start', array('modules' => array_values($mods)));
+ Render::addDialog(Dictionary::translate('lang_moduleAdd'), false, 'start', array('modules' => array_values($mods)));
}
}
diff --git a/modules/sysconfig/addmodule_adauth.inc.php b/modules/sysconfig/addmodule_adauth.inc.php
index cba09382..e295630c 100644
--- a/modules/sysconfig/addmodule_adauth.inc.php
+++ b/modules/sysconfig/addmodule_adauth.inc.php
@@ -25,7 +25,7 @@ class AdAuth_Start extends AddModule_Base
$data['server'] = $out[1];
}
$data['step'] = 'AdAuth_CheckConnection';
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad-start', $data);
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad-start', $data);
}
}
@@ -88,7 +88,7 @@ class AdAuth_CheckConnection extends AddModule_Base
} else {
$data['next'] = 'AdAuth_CheckCredentials';
}
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad_ldap-checkconnection', $data);
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad_ldap-checkconnection', $data);
}
}
@@ -165,7 +165,7 @@ class AdAuth_SelfSearch extends AddModule_Base
} else {
$data['next'] = 'AdAuth_CheckCredentials';
}
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad-selfsearch',
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad-selfsearch',
array_merge($this->taskIds, $data));
}
@@ -218,7 +218,7 @@ class AdAuth_HomeAttrCheck extends AddModule_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad-selfsearch', array_merge($this->taskIds, array(
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad-selfsearch', array_merge($this->taskIds, array(
'edit' => Request::post('edit'),
'title' => Request::post('title'),
'server' => Request::post('server'),
@@ -289,7 +289,7 @@ class AdAuth_CheckCredentials extends AddModule_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad_ldap-checkcredentials', array_merge($this->taskIds, array(
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad_ldap-checkcredentials', array_merge($this->taskIds, array(
'edit' => Request::post('edit'),
'title' => Request::post('title'),
'server' => Request::post('server') . ':' . Request::post('port'),
@@ -303,24 +303,23 @@ class AdAuth_CheckCredentials extends AddModule_Base
'certificate' => Request::post('certificate', ''),
'originalbinddn' => Request::post('originalbinddn'),
'prev' => 'AdAuth_Start',
- 'next' => 'AdAuth_HomeDir'
+ 'next' => 'AdAuth_Finish'
))
);
}
}
-class AdAuth_HomeDir extends AddModule_Base
+class AdAuth_Finish extends AddModule_Base
{
- private $searchbase;
- private $binddn;
-
+ private $taskIds;
+
protected function preprocessInternal()
{
- $this->binddn = Request::post('binddn');
- $this->searchbase = Request::post('searchbase');
- if (empty($this->searchbase)) {
+ $binddn = Request::post('binddn');
+ $searchbase = Request::post('searchbase');
+ if (empty($searchbase)) {
// If no search base was given, determine it from the dn
$originalBindDn = str_replace('\\', '/', trim(Request::post('originalbinddn')));
if (!preg_match('#^([^/]+)/[^/]+$#', $originalBindDn, $out)) {
@@ -328,81 +327,25 @@ class AdAuth_HomeDir extends AddModule_Base
Util::redirect('?do=SysConfig&action=addmodule&step=AdAuth_Start');
} // $out[1] is the domain
// Find the domain in the dn
- $i = mb_stripos($this->binddn, '=' . $out[1] . ',');
+ $i = mb_stripos($binddn, '=' . $out[1] . ',');
if ($i === false) {
Message::addError('value-invalid', 'binddn', $out[1]);
Util::redirect('?do=SysConfig&action=addmodule&step=AdAuth_Start');
}
// Now find ',' before it so we get the key
- $i = mb_strrpos(mb_substr($this->binddn, 0, $i), ',');
+ $i = mb_strrpos(mb_substr($binddn, 0, $i), ',');
if ($i === false)
$i = -1;
- $this->searchbase = mb_substr($this->binddn, $i + 1);
+ $searchbase = mb_substr($binddn, $i + 1);
} else {
$somedn = Request::post('somedn', false);
if (!empty($somedn)) {
- $i = stripos($somedn, $this->searchbase);
+ $i = stripos($somedn, $searchbase);
if ($i !== false) {
- $this->searchbase = substr($somedn, $i, strlen($this->searchbase));
- }
- }
- }
- }
-
- protected function renderInternal()
- {
- $data = array(
- 'edit' => Request::post('edit'),
- 'title' => Request::post('title'),
- 'server' => Request::post('server'),
- 'searchbase' => $this->searchbase,
- 'binddn' => $this->binddn,
- 'bindpw' => Request::post('bindpw'),
- 'home' => Request::post('home'),
- 'homeattr' => Request::post('homeattr'),
- 'ssl' => Request::post('ssl') === 'on',
- 'fingerprint' => Request::post('fingerprint'),
- 'certificate' => Request::post('certificate', ''),
- 'originalbinddn' => Request::post('originalbinddn'),
- 'prev' => 'AdAuth_Start',
- 'next' => 'AdAuth_Finish'
- );
- if ($this->edit !== false) {
- foreach (self::getAttributes() as $key) {
- if ($this->edit->getData($key)) {
- $data[$key . '_c'] = 'checked="checked"';
+ $searchbase = substr($somedn, $i, strlen($searchbase));
}
}
- $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
- $letter = $this->edit->getData('shareHomeDrive');
- } else {
- $data['shareDownloads'] = $data['shareMedia'] = $data['shareDocuments'] = 'selected="selected"';
- $letter = 'H:';
}
- $data['drives'] = array();
- foreach (range('D', 'Z') as $l) {
- $data['drives'][] = array(
- 'drive' => $l . ':',
- 'selected' => (strtoupper($letter{0}) === $l) ? 'selected="selected"' : ''
- );
- }
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad_ldap-homedir', $data);
- }
-
- public static function getAttributes()
- {
- return array('shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia', 'shareOther', 'shareHomeDrive');
- }
-
-}
-
-class AdAuth_Finish extends AddModule_Base
-{
-
- private $taskIds;
-
- protected function preprocessInternal()
- {
$title = Request::post('title');
if (empty($title))
$title = 'AD: ' . Request::post('server');
@@ -412,24 +355,13 @@ class AdAuth_Finish extends AddModule_Base
$module = $this->edit;
$ssl = Request::post('ssl', 'off') === 'on';
$module->setData('server', Request::post('server'));
- $module->setData('searchbase', Request::post('searchbase'));
- $module->setData('binddn', Request::post('binddn'));
+ $module->setData('searchbase', $searchbase);
+ $module->setData('binddn', $binddn);
$module->setData('bindpw', Request::post('bindpw'));
$module->setData('home', Request::post('home'));
$module->setData('homeattr', Request::post('homeattr'));
$module->setData('certificate', Request::post('certificate'));
$module->setData('ssl', $ssl);
- foreach (AdAuth_HomeDir::getAttributes() as $key) {
- $value = Request::post($key);
- if (is_numeric($value)) {
- settype($value, 'integer');
- } elseif ($value === 'on') {
- $value = 1;
- } elseif ($value === false) {
- $value = 0;
- }
- $module->setData($key, $value);
- }
if ($ssl) {
$module->setData('fingerprint', Request::post('fingerprint', ''));
} else {
@@ -475,7 +407,7 @@ class AdAuth_Finish extends AddModule_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'sysconfig/ad-finish', $this->taskIds);
+ Render::addDialog(Dictionary::translate('config-module', 'adAuth_title'), false, 'ad-finish', $this->taskIds);
}
}
diff --git a/modules/sysconfig/addmodule_branding.inc.php b/modules/sysconfig/addmodule_branding.inc.php
index 336e2a77..67e20892 100644
--- a/modules/sysconfig/addmodule_branding.inc.php
+++ b/modules/sysconfig/addmodule_branding.inc.php
@@ -10,7 +10,7 @@ class Branding_Start extends AddModule_Base
protected function renderInternal()
{
Render::addScriptBottom('fileselect');
- Render::addDialog(Dictionary::translate('config-module', 'branding_title'), false, 'sysconfig/branding-start', array(
+ Render::addDialog(Dictionary::translate('config-module', 'branding_title'), false, 'branding-start', array(
'step' => 'Branding_ProcessFile',
'edit' => $this->edit ? $this->edit->id() : false
));
@@ -76,7 +76,7 @@ class Branding_ProcessFile extends AddModule_Base
$png = base64_encode(file_get_contents($this->task['data']['pngFile']));
if (filesize($this->svgFile) < 1000000)
$svg = base64_encode(file_get_contents($this->svgFile));
- Render::addDialog(Dictionary::translate('config-module', 'branding_title'), false, 'sysconfig/branding-check', array(
+ Render::addDialog(Dictionary::translate('config-module', 'branding_title'), false, 'branding-check', array(
'png' => $png,
'svg' => $svg,
'error' => $this->task['data']['error'],
diff --git a/modules/sysconfig/addmodule_custommodule.inc.php b/modules/sysconfig/addmodule_custommodule.inc.php
index f7342b7b..023463f7 100644
--- a/modules/sysconfig/addmodule_custommodule.inc.php
+++ b/modules/sysconfig/addmodule_custommodule.inc.php
@@ -13,7 +13,7 @@ class CustomModule_Start extends AddModule_Base
{
Session::set('mod_temp', false);
Render::addScriptBottom('fileselect');
- Render::addDialog(Dictionary::translate('config-module', 'custom_title'), false, 'sysconfig/custom-upload', array(
+ Render::addDialog(Dictionary::translate('config-module', 'custom_title'), false, 'custom-upload', array(
'step' => 'CustomModule_ProcessUpload',
'edit' => $this->edit ? $this->edit->id() : false
));
@@ -92,7 +92,7 @@ class CustomModule_ProcessUpload extends AddModule_Base
$title = basename($_FILES['modulefile']['name']);
else
$title = '';
- Render::addDialog(Dictionary::translate('config-module', 'custom_title'), false, 'sysconfig/custom-fileselect', array(
+ Render::addDialog(Dictionary::translate('config-module', 'custom_title'), false, 'custom-fileselect', array(
'step' => 'CustomModule_CompressModule',
'files' => $list,
'edit' => $this->edit ? $this->edit->id() : false,
diff --git a/modules/sysconfig/addmodule_ldapauth.inc.php b/modules/sysconfig/addmodule_ldapauth.inc.php
index 0dad780b..e17469a0 100644
--- a/modules/sysconfig/addmodule_ldapauth.inc.php
+++ b/modules/sysconfig/addmodule_ldapauth.inc.php
@@ -21,7 +21,7 @@ class LdapAuth_Start extends AddModule_Base
$data['server'] = $out[1];
}
$data['step'] = 'LdapAuth_CheckConnection';
- Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'sysconfig/ldap-start', $data);
+ Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'ldap-start', $data);
}
}
@@ -77,7 +77,7 @@ class LdapAuth_CheckConnection extends AddModule_Base
);
$data['prev'] = 'LdapAuth_Start';
$data['next'] = 'LdapAuth_CheckCredentials';
- Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'sysconfig/ad_ldap-checkconnection', $data);
+ Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'ad_ldap-checkconnection', $data);
}
}
@@ -133,7 +133,7 @@ class LdapAuth_CheckCredentials extends AddModule_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'sysconfig/ad_ldap-checkcredentials', array_merge($this->taskIds, array(
+ Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'ad_ldap-checkcredentials', array_merge($this->taskIds, array(
'edit' => Request::post('edit'),
'title' => Request::post('title'),
'server' => Request::post('server') . ':' . Request::post('port'),
@@ -145,73 +145,9 @@ class LdapAuth_CheckCredentials extends AddModule_Base
'fingerprint' => Request::post('fingerprint'),
'certificate' => Request::post('certificate', ''),
'prev' => 'LdapAuth_Start',
- 'next' => 'LdapAuth_HomeDir'
- ))
- );
- }
-
-}
-
-class LdapAuth_HomeDir extends AddModule_Base
-{
-
- private $searchbase;
-
- protected function preprocessInternal()
- {
- $this->searchbase = Request::post('searchbase');
- $somedn = Request::post('somedn', false);
- if (!empty($somedn)) {
- $i = stripos($somedn, $this->searchbase);
- if ($i !== false) {
- $this->searchbase = substr($somedn, $i, strlen($this->searchbase));
- }
- }
- }
-
- protected function renderInternal()
- {
- $data = array(
- 'edit' => Request::post('edit'),
- 'title' => Request::post('title'),
- 'server' => Request::post('server'),
- 'searchbase' => $this->searchbase,
- 'binddn' => Request::post('binddn'),
- 'bindpw' => Request::post('bindpw'),
- 'home' => Request::post('home'),
- 'homeattr' => Request::post('homeattr'),
- 'ssl' => Request::post('ssl') === 'on',
- 'fingerprint' => Request::post('fingerprint'),
- 'certificate' => Request::post('certificate', ''),
- 'originalbinddn' => Request::post('originalbinddn'),
- 'prev' => 'LdapAuth_Start',
'next' => 'LdapAuth_Finish'
+ ))
);
- if ($this->edit !== false) {
- foreach (self::getAttributes() as $key) {
- if ($this->edit->getData($key)) {
- $data[$key . '_c'] = 'checked="checked"';
- }
- }
- $data['shareRemapMode_' . $this->edit->getData('shareRemapMode')] = 'selected="selected"';
- $letter = $this->edit->getData('shareHomeDrive');
- } else {
- $data['shareDownloads'] = $data['shareMedia'] = $data['shareDocuments'] = 'selected="selected"';
- $letter = 'H:';
- }
- $data['drives'] = array();
- foreach (range('D', 'Z') as $l) {
- $data['drives'][] = array(
- 'drive' => $l . ':',
- 'selected' => (strtoupper($letter{0}) === $l) ? 'selected="selected"' : ''
- );
- }
- Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'sysconfig/ad_ldap-homedir', $data);
- }
-
- public static function getAttributes()
- {
- return array('shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia', 'shareOther', 'shareHomeDrive');
}
}
@@ -232,6 +168,13 @@ class LdapAuth_Finish extends AddModule_Base
$module = ConfigModule::getInstance('LdapAuth');
else
$module = $this->edit;
+ $somedn = Request::post('somedn', false);
+ if (!empty($somedn)) {
+ $i = stripos($somedn, $searchbase);
+ if ($i !== false) {
+ $searchbase = substr($somedn, $i, strlen($searchbase));
+ }
+ }
$ssl = Request::post('ssl', 'off') === 'on';
$module->setData('server', Request::post('server'));
$module->setData('searchbase', $searchbase);
@@ -240,17 +183,6 @@ class LdapAuth_Finish extends AddModule_Base
$module->setData('home', Request::post('home'));
$module->setData('certificate', Request::post('certificate'));
$module->setData('ssl', $ssl);
- foreach (LdapAuth_HomeDir::getAttributes() as $key) {
- $value = Request::post($key);
- if (is_numeric($value)) {
- settype($value, 'integer');
- } elseif ($value === 'on') {
- $value = 1;
- } elseif ($value === false) {
- $value = 0;
- }
- $module->setData($key, $value);
- }
if ($ssl) {
$module->setData('fingerprint', Request::post('fingerprint', ''));
} else {
@@ -296,7 +228,7 @@ class LdapAuth_Finish extends AddModule_Base
protected function renderInternal()
{
- Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'sysconfig/ldap-finish', $this->taskIds);
+ Render::addDialog(Dictionary::translate('config-module', 'ldapAuth_title'), false, 'ldap-finish', $this->taskIds);
}
}
diff --git a/modules/sysconfig/addmodule_sshconfig.inc.php b/modules/sysconfig/addmodule_sshconfig.inc.php
index e50ca72c..5f0f7222 100644
--- a/modules/sysconfig/addmodule_sshconfig.inc.php
+++ b/modules/sysconfig/addmodule_sshconfig.inc.php
@@ -18,7 +18,7 @@ class SshConfig_Start extends AddModule_Base
} else {
$data = array();
}
- Render::addDialog(Dictionary::translate('lang_clientSshConfig'), false, 'sysconfig/sshconfig-start', $data + array(
+ Render::addDialog(Dictionary::translate('lang_clientSshConfig'), false, 'sshconfig-start', $data + array(
'step' => 'SshConfig_Finish',
));
}
diff --git a/modules/sysconfig/config.json b/modules/sysconfig/config.json
new file mode 100644
index 00000000..93209f62
--- /dev/null
+++ b/modules/sysconfig/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"settings",
+ "enabled":"true"
+}
diff --git a/modules/sysconfig.inc.php b/modules/sysconfig/module.inc.php
index 8d19d62a..0c06e125 100644
--- a/modules/sysconfig.inc.php
+++ b/modules/sysconfig/module.inc.php
@@ -3,6 +3,45 @@
class Page_SysConfig extends Page
{
+ /**
+ * Holds all the known configuration modules, with title, description, start class for their wizard, etc.
+ * @var array
+ */
+ protected static $moduleTypes = array();
+
+ /**
+ * Add a known configuration module. Every addmoule_* file should call this
+ * for its module provided.
+ *
+ * @param string $id Internal identifier for the module
+ * @param string $startClass Class to start wizard for creating such a module
+ * @param string $title Title of this module type
+ * @param string $description Description for this module type
+ * @param string $group Title for group this module type belongs to
+ * @param bool $unique Can only one such module be added to a config?
+ * @param int $sortOrder Lower comes first, alphabetical ordering otherwiese
+ */
+ public static function addModule($id, $startClass, $title, $description, $group, $unique, $sortOrder = 0)
+ {
+ self::$moduleTypes[$id] = array(
+ 'startClass' => $startClass,
+ 'title' => $title,
+ 'description' => $description,
+ 'group' => $group,
+ 'unique' => $unique,
+ 'sortOrder' => $sortOrder
+ );
+ }
+
+ /**
+ *
+ * @return array All registered module types
+ */
+ public static function getModuleTypes()
+ {
+ return self::$moduleTypes;
+ }
+
protected function doPreprocess()
{
User::load();
@@ -14,6 +53,12 @@ class Page_SysConfig extends Page
$action = Request::any('action', 'list');
+ // Load all addmodule classes, as they populate the $moduleTypes array
+ require_once 'modules/sysconfig/addmodule.inc.php';
+ foreach (glob('modules/sysconfig/addmodule_*.inc.php') as $file) {
+ require_once $file;
+ }
+
// Action: "addmodule" (upload new module)
if ($action === 'addmodule') {
$this->initAddModule();
@@ -89,47 +134,7 @@ class Page_SysConfig extends Page
}
break;
}
- Message::addError('invalid-action', $action);
- }
-
- /**
- * If modules need updates (blue refresh buttons), we query their state
- * via ajax, in case they are about to generate. This happens for example
- * if you edit a module and a bunch of configs depend on it and will be
- * rebuilt.
- */
- protected function doAjax()
- {
- if (Request::post('action') === 'status') {
- $mods = Request::post('mods');
- $confs = Request::post('confs');
- $outMods = array();
- $outConfs = array();
- $mods = explode(',', $mods);
- $confs = explode(',', $confs);
- // Mods
- $string = '0';
- foreach ($mods as $mod) {
- if (is_numeric($mod))
- $string .= ',' . $mod;
- }
- $res = Database::simpleQuery("SELECT moduleid FROM configtgz_module WHERE moduleid in ($string) AND status = 'OK'");
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- $outMods[] = $row['moduleid'];
- }
- // Confs
- $string = '0';
- foreach ($confs as $conf) {
- if (is_numeric($conf))
- $string .= ',' . $conf;
- }
- $res = Database::simpleQuery("SELECT configid FROM configtgz WHERE configid in ($string) AND status = 'OK'");
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- $outConfs[] = $row['configid'];
- }
- Header('Content-Type: application/json');
- die(json_encode(array('mods' => $outMods, 'confs' => $outConfs)));
- }
+ Message::addError('invalid-action', $action, 'main');
}
/**
@@ -165,7 +170,7 @@ class Page_SysConfig extends Page
'needrebuild' => ($row['status'] !== 'OK')
);
}
- Render::addTemplate('sysconfig/_page', array(
+ Render::addTemplate('_page', array(
'configs' => $configs,
'modules' => $modules,
'havemodules' => (count($modules) > 0)
@@ -219,7 +224,7 @@ class Page_SysConfig extends Page
}
// render the template
- Render::addDialog(Dictionary::translate('lang_contentOf') . ' ' . $row['title'], false, 'sysconfig/custom-filelist', array(
+ Render::addDialog(Dictionary::translate('lang_contentOf') . ' ' . $row['title'], false, 'custom-filelist', array(
'files' => $list,
));
}
@@ -248,7 +253,7 @@ class Page_SysConfig extends Page
}
// render the template
- Render::addDialog(Dictionary::translate('lang_contentOf') . ' ' . $config['title'], false, 'sysconfig/config-module-list', array(
+ Render::addDialog(Dictionary::translate('lang_contentOf') . ' ' . $config['title'], false, 'config-module-list', array(
'modules' => $modules
));
}
diff --git a/templates/sysconfig/_page.html b/modules/sysconfig/templates/_page.html
index 1a2f64d6..1a2f64d6 100644
--- a/templates/sysconfig/_page.html
+++ b/modules/sysconfig/templates/_page.html
diff --git a/templates/sysconfig/ad-finish.html b/modules/sysconfig/templates/ad-finish.html
index f73cad9d..f73cad9d 100644
--- a/templates/sysconfig/ad-finish.html
+++ b/modules/sysconfig/templates/ad-finish.html
diff --git a/templates/sysconfig/ad-selfsearch.html b/modules/sysconfig/templates/ad-selfsearch.html
index 76952dc3..76952dc3 100644
--- a/templates/sysconfig/ad-selfsearch.html
+++ b/modules/sysconfig/templates/ad-selfsearch.html
diff --git a/templates/sysconfig/ad-start.html b/modules/sysconfig/templates/ad-start.html
index 98546140..98546140 100644
--- a/templates/sysconfig/ad-start.html
+++ b/modules/sysconfig/templates/ad-start.html
diff --git a/templates/sysconfig/ad_ldap-checkconnection.html b/modules/sysconfig/templates/ad_ldap-checkconnection.html
index 5925829a..5925829a 100644
--- a/templates/sysconfig/ad_ldap-checkconnection.html
+++ b/modules/sysconfig/templates/ad_ldap-checkconnection.html
diff --git a/templates/sysconfig/ad_ldap-checkcredentials.html b/modules/sysconfig/templates/ad_ldap-checkcredentials.html
index 0586209b..0586209b 100644
--- a/templates/sysconfig/ad_ldap-checkcredentials.html
+++ b/modules/sysconfig/templates/ad_ldap-checkcredentials.html
diff --git a/templates/sysconfig/branding-check.html b/modules/sysconfig/templates/branding-check.html
index 8f6ef055..8f6ef055 100644
--- a/templates/sysconfig/branding-check.html
+++ b/modules/sysconfig/templates/branding-check.html
diff --git a/templates/sysconfig/branding-start.html b/modules/sysconfig/templates/branding-start.html
index 09b9ca27..09b9ca27 100644
--- a/templates/sysconfig/branding-start.html
+++ b/modules/sysconfig/templates/branding-start.html
diff --git a/templates/sysconfig/cfg-finish.html b/modules/sysconfig/templates/cfg-finish.html
index a6e51996..a6e51996 100644
--- a/templates/sysconfig/cfg-finish.html
+++ b/modules/sysconfig/templates/cfg-finish.html
diff --git a/templates/sysconfig/cfg-start.html b/modules/sysconfig/templates/cfg-start.html
index 50f366ea..50f366ea 100644
--- a/templates/sysconfig/cfg-start.html
+++ b/modules/sysconfig/templates/cfg-start.html
diff --git a/templates/sysconfig/config-module-list.html b/modules/sysconfig/templates/config-module-list.html
index 6cd77f9e..6cd77f9e 100644
--- a/templates/sysconfig/config-module-list.html
+++ b/modules/sysconfig/templates/config-module-list.html
diff --git a/templates/sysconfig/custom-filelist.html b/modules/sysconfig/templates/custom-filelist.html
index 3ad241dd..3ad241dd 100644
--- a/templates/sysconfig/custom-filelist.html
+++ b/modules/sysconfig/templates/custom-filelist.html
diff --git a/templates/sysconfig/custom-fileselect.html b/modules/sysconfig/templates/custom-fileselect.html
index 000c8d10..000c8d10 100644
--- a/templates/sysconfig/custom-fileselect.html
+++ b/modules/sysconfig/templates/custom-fileselect.html
diff --git a/templates/sysconfig/custom-upload.html b/modules/sysconfig/templates/custom-upload.html
index c453a97d..c453a97d 100644
--- a/templates/sysconfig/custom-upload.html
+++ b/modules/sysconfig/templates/custom-upload.html
diff --git a/templates/sysconfig/ldap-finish.html b/modules/sysconfig/templates/ldap-finish.html
index a735e792..a735e792 100644
--- a/templates/sysconfig/ldap-finish.html
+++ b/modules/sysconfig/templates/ldap-finish.html
diff --git a/templates/sysconfig/ldap-start.html b/modules/sysconfig/templates/ldap-start.html
index 7892b63f..7892b63f 100644
--- a/templates/sysconfig/ldap-start.html
+++ b/modules/sysconfig/templates/ldap-start.html
diff --git a/templates/sysconfig/sshconfig-start.html b/modules/sysconfig/templates/sshconfig-start.html
index 2aa409d3..2aa409d3 100644
--- a/templates/sysconfig/sshconfig-start.html
+++ b/modules/sysconfig/templates/sshconfig-start.html
diff --git a/templates/sysconfig/start.html b/modules/sysconfig/templates/start.html
index f55a5501..f55a5501 100644
--- a/templates/sysconfig/start.html
+++ b/modules/sysconfig/templates/start.html
diff --git a/modules/sysconfignew/config.json b/modules/sysconfignew/config.json
new file mode 100644
index 00000000..d5da4cc8
--- /dev/null
+++ b/modules/sysconfignew/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"hidden",
+ "enabled":"true"
+}
diff --git a/modules/sysconfignew/module.inc.php b/modules/sysconfignew/module.inc.php
new file mode 100644
index 00000000..105ad6c7
--- /dev/null
+++ b/modules/sysconfignew/module.inc.php
@@ -0,0 +1,113 @@
+<?php
+
+class Page_SysConfigNew extends Page
+{
+ // private $tmpath = '/srv/openslx/www/';
+ private $tmpath = '/home/raul/tm-scripts/server';
+ private $tmconfigs;
+ private $tmmodules;
+
+ protected function doPreprocess(){
+ User::load();
+ if (!User::hasPermission('baseconfig_local')) {
+ Message::addError('no-permission');
+ Util::redirect('?do=Main');
+ }
+
+ $this->tmconfigs = $this->tmpath . '/configs';
+ $this->tmmodules = $this->tmpath . '/modules';
+ }
+
+
+ protected function doRender(){
+ $module = $_GET['module'];
+ if(isset($module)){
+ Render::addTemplate('module-editor',array(
+ "module" => $module
+ ));
+ }else{
+ if(is_dir($this->tmpath)){
+ $configs = array();
+ $modules = array();
+
+ foreach($this->listDirectory($this->tmconfigs) as $key => $value)
+ $configs[] = array(
+ "name" => $value
+ );
+
+ foreach($this->listDirectory($this->tmmodules) as $key => $value)
+ $modules[] = array(
+ "name" => $value
+ );
+
+ $data = array(
+ "configs" => $configs,
+ "modules" => $modules
+ );
+ Render::addTemplate('_pagenew',$data);
+ }else{
+ Message::addError('no-tm-scripts');
+ }
+ }
+ }
+
+ protected function doAjax(){
+ $request = $_GET['request'];
+ switch($request){
+ case "module-contents":
+ $path = $this->tmpath . '/modules/' . Request::get('module');
+ $data = $this->getDirContents($path);
+ $json = json_encode($data);
+ print_r($json);
+ break;
+ case "configs":
+ $this->tmconfigs = $this->tmpath . '/configs';
+ $this->tmmodules = $this->tmpath . '/modules';
+ $userModules = $this->listDirectory($this->tmconfigs . '/' . Request::get('config'));
+ $modules = array();
+ foreach($this->listDirectory($this->tmmodules) as $key => $value){
+ $chosen = (in_array($value, $userModules)) ? true : false;
+ $modules[] = array(
+ "name" => $value,
+ "chosen" => $chosen
+ );
+ }
+
+ foreach ($modules as $module) {
+ $class = ($module['chosen']) ? "select-item select-item-selected" : "select-item";
+ $ret .= "<button type='button' class='" . $class . "' onclick='select(this)' >";
+ $ret .= $module['name'];
+ $ret .= "</button>";
+ }
+
+ echo $ret;
+ break;
+ }
+
+ }
+
+ private function getDirContents($path){
+ $ret = array();
+ foreach ($this->listDirectory($path) as $key => $value) {
+ if(is_dir($path . "/" . $value)){
+ $ret["dir_" . $value] = $this->getDirContents($path . "/" . $value);
+ }else{
+ if(is_link($path . "/" . $value)){
+ $ret["link_" . $value] = readlink($path . "/" . $value);
+ }else{
+ if(mime_content_type($path . "/" . $value) == "text/plain"){
+ $ret["file_" . $value] = file_get_contents($path . "/" . $value);
+ }else{
+ $ret["lock_" . $value] = " oops";
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ private function listDirectory($path){
+ return array_diff(scandir($path), array('..', '.'));
+ }
+
+}
diff --git a/modules/sysconfignew/templates/_pagenew.html b/modules/sysconfignew/templates/_pagenew.html
new file mode 100644
index 00000000..98881ae3
--- /dev/null
+++ b/modules/sysconfignew/templates/_pagenew.html
@@ -0,0 +1,190 @@
+<div class="row">
+ <div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading" >
+ <div class="panel-title">{{lang_configurations}}</div>
+ </div>
+ <div class="panel-body">
+ {{lang_configsDescription}}
+ </div>
+ <table class="table table-striped">
+ <thead>
+ <th style="width: 70%">{{lang_configName}}</th>
+ <th></th>
+ <th></th>
+ </thead>
+ <tbody>
+ {{#configs}}
+ <tr>
+ <td>{{name}}</td>
+ <td>
+ <button type="button" class="btn btn-xs btn-primary" onclick="loadConfig('{{name}}')" data-toggle="modal" data-target="#edit-modal" >
+ <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
+ {{lang_edit}}
+ </button>
+ </td>
+ <td>
+ <button type="button" class="btn btn-xs btn-danger">
+ <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
+ {{lang_remove}}
+ </button>
+ </td>
+ </tr>
+ {{/configs}}
+ </tbody>
+ </table>
+ <div class="panel-footer">
+ <button id="new-config-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-config-modal" >
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
+ {{lang_newConfig}}
+ </button>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-6">
+ <div class="panel panel-default">
+ <div class="panel-heading" >
+ <div class="panel-title">{{lang_modules}}</div>
+ </div>
+ <div class="panel-body">
+ {{lang_modulesDescription}}
+ </div>
+ <table class="table table-striped">
+ <thead>
+ <th style="width: 70%">{{lang_configName}}</th>
+ <th></th>
+ <th></th>
+ </thead>
+ <tbody>
+ {{#modules}}
+ <tr>
+ <td>{{name}}</td>
+ <td>
+ <button type="button" class="btn btn-xs btn-primary" onclick="loadModule('{{name}}')" >
+ <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
+ {{lang_edit}}
+ </button>
+ </td>
+ <td>
+ <button type="button" class="btn btn-xs btn-danger">
+ <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
+ {{lang_remove}}
+ </button>
+ </td>
+ </tr>
+ {{/modules}}
+ </tbody>
+ </table>
+ <div class="panel-footer">
+ <button id="new-module-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-module-modal" >
+ <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
+ {{lang_newModule}}
+ </button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<!-- Generic modal, will have its content changed dynamically -->
+<div class="modal fade" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <!-- Header -->
+ <div class="modal-header" id="edit-modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="edit-modal-label">{{lang_compilingIpxe}}</h4>
+ </div>
+ <!-- Body -->
+ <div class="modal-body" id="edit-modal-body" style="overflow: auto;">
+ {{lang_loading}} <img src='fonts/loader.gif'/>
+
+ </div>
+ <!-- Footer -->
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
+ <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<!-- New config modal -->
+<form action="" method="POST">
+ <div class="modal fade" id="new-config-modal" tabindex="-1" role="dialog" aria-labelledby="new-config-modal-label" aria-hidden="true">
+ <form action="#" method="post">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <!-- Header -->
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="new-config-modal-label">{{lang_compilingIpxe}}</h4>
+ </div>
+ <!-- Body -->
+ <div class="modal-body" id="new-config-modal-body" style="overflow: auto;">
+ <div>
+ <label for="new-config-name">{{lang_name}}</label>
+ <input type="text" name="new-config-name" class="form-control">
+ </div>
+ <hr>
+ <div>
+ <label>{{lang_modules}}</label>
+ </div>
+ {{#modules}}
+ <button name="{{name}}" type='button' class='select-item' onclick='select(this)' >{{name}}</button>
+ {{/modules}}
+ </div>
+ <!-- Footer -->
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
+ <input type="submit" class="btn btn-primary" value="{{lang_create}}">
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+</form>
+<!-- New module modal -->
+<div class="modal fade" id="new-module-modal" tabindex="-1" role="dialog" aria-labelledby="new-module-modal-label" aria-hidden="true">
+ <form action="#" method="post">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <!-- Header -->
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="new-module-modal-label">{{lang_compilingIpxe}}</h4>
+ </div>
+ <!-- Body -->
+ <div class="modal-body" id="new-module-modal-body">
+ <textarea class="form-control" style="resize:none"></textarea>
+ </div>
+ <!-- Footer -->
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
+ <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+
+
+<script>
+ function loadConfig(config){
+ $.ajax({
+ method: "GET",
+ url: "?do=SysConfig",
+ data: { request:"configs", async: "True", config: config }
+ }).done(function( msg ) {
+ $("#edit-modal-body").html( msg );
+ $("#edit-modal-header").html( '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="edit-modal-label">' + config + '</h4>' );
+ });
+ }
+
+ function loadModule(module){
+ window.location = "?do=SysConfig&module=" + module;
+ }
+
+ function select(element){0
+ element.className = (element.className == 'select-item') ? 'select-item select-item-selected' : 'select-item';
+ }
+</script> \ No newline at end of file
diff --git a/modules/sysconfignew/templates/module-editor.html b/modules/sysconfignew/templates/module-editor.html
new file mode 100644
index 00000000..3ea28bf8
--- /dev/null
+++ b/modules/sysconfignew/templates/module-editor.html
@@ -0,0 +1,269 @@
+
+<div class="container">
+ <div class="row">
+ <a href="?do=Sysconfig" style="display:inline-block;margin-bottom: 10px;">{{lang_back}}</a>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{module}}
+ </div>
+ <div class="panel-body">
+ <div class="mod-nav" id="mod-nav">
+
+ </div>
+ <input class="form-control" disabled="disabled" id="editor-header">
+ <textarea class="editor-box" id="mod-editor" onkeyup="changeContent(this);"></textarea>
+ </div>
+ <div class="panel-footer">
+ <button id="new-item-button" type="button" class="btn btn-default" data-toggle="modal" data-target="#item-modal" onclick="cleanModal()" >
+ <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
+ {{lang_new}}
+ </button>
+ <button type="button" class="btn btn-default" onclick="save();">
+ <span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
+ {{lang_save}}
+ </button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<!-- New item modal -->
+<div class="modal fade" id="item-modal" tabindex="-1" role="dialog" aria-labelledby="item-modal-label" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <!-- Header -->
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="new-config-modal-label">{{lang_new}}</h4>
+ </div>
+ <!-- Body -->
+ <div class="modal-body" id="new-module-modal-body" style="overflow: auto;">
+ <div class="mod-nav" style="height: 250px">
+ <div class="item dir" onclick="clickDir(this)" data-target="#root" data-path="/"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="root-icon"></div> /</div>
+ <div class="folder" id="root">
+ <div id="dir-nav">
+ </div>
+ </div>
+ </div>
+ <div style="float:left">
+ <input class="form-control" disabled="disabled" id="dir-path" style="width: 250px;margin-left: 20px;" value="/">
+ <br>
+ <div class="btn-group-vertical" role="group" aria-label="..." style="width: 250px;margin-left: 20px;">
+ <button type="button" class="btn btn-default" onclick="switchFileInput('file')">Arquivo de Texto</button>
+ <button type="button" class="btn btn-default" onclick="switchFileInput('upload')">Upload de Arquivo</button>
+ <button type="button" class="btn btn-default" onclick="switchFileInput('folder')">Pasta</button>
+ <button type="button" class="btn btn-default" onclick="switchFileInput('link')">Link</button>
+ </div>
+ <br>
+ <br>
+ <div id="new-file-input" style="width: 250px;margin-left: 20px;">
+ <div class="form-group">
+ <label for="name">Nome do Arquivo</label>
+ <input type="name" class="form-control" id="new-file-data">
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- Footer -->
+ <div class="modal-footer" >
+ <button type="button" class="btn btn-primary" data-dismiss="modal">{{lang_cancel}}</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">
+
+// Global variables
+var original;
+var module;
+var current;
+var path;
+
+function cleanModal(){
+ $('#dir-path').val("/");
+}
+
+function clickDir(element){
+ var target = element.getAttribute("data-target");
+ target = target.replace(/\./g,"\\.");
+ $(target + "-icon").attr('class',(($(target).css('display') == 'none') ? 'glyphicon glyphicon-folder-open dir-icon' : 'glyphicon glyphicon-folder-close dir-icon' ));
+ $(target).css('display', ($(target).css('display') == 'none') ? 'block' : 'none' );
+ $('#dir-path').val(element.getAttribute("data-path"));
+}
+
+function getFile(obj,file){
+ var folder = file.split("/")[1];
+ for (var property in obj) {
+ if (obj.hasOwnProperty(property)) {
+ if(property.substring(0, 4) == "dir_"){
+ var pname = property.slice(4);
+ if(pname == folder){
+ var ret = getFile(obj[property],file.replace("/" + folder,""));
+ if(ret != "Invalid file")
+ return ret;
+ }
+ }
+ if(property.substring(0, 5) == "file_"){
+ if(property.slice(5) == file.replace("/",""))
+ return obj[property];
+ }
+ }
+ }
+ return 'Invalid file';
+}
+
+function changeFile(obj,file,data){
+ var folder = file.split("/")[1];
+ for (var property in obj) {
+ if (obj.hasOwnProperty(property)) {
+ if(property.substring(0, 4) == "dir_"){
+ var pname = property.slice(4);
+ if(pname == folder){
+ var ret = changeFile(obj[property],file.replace("/" + folder,""),data);
+ if(ret != "")
+ return ret;
+ }
+ }
+ if(property.substring(0, 5) == "file_"){
+ if(property.slice(5) == file.replace("/","")){
+ obj[property] = data;
+ }
+ }
+ }
+ }
+ return "";
+}
+
+function clickItem(element){
+ var id = element.getAttribute("id");
+ var target = id.split("/").pop();
+ document.getElementById('mod-editor').value = getFile(module,id);
+ document.getElementById('editor-header').value = id;
+ current = id;
+}
+
+function clickLock(element){
+ var id = element.getAttribute("id");
+ alert("{{lang_file}}: " + id + " {{lang_cannotOpen}}");
+}
+
+function clickLink(element){
+ var data = element.getAttribute("data-value");
+ var newLink = prompt("{{lang_changeLink}}:",data);
+ if(newLink){
+ element.setAttribute("data-value",newLink);
+ }
+}
+
+function changeContent(element){
+ changeFile(module,current,element.value);
+}
+
+function switchFileInput(type){
+ var html = "";
+ switch(type){
+ case "file":
+ html = "<div class='form-group'><label for='name'>Nome do Arquivo</label><input type='name' class='form-control' id='new-file-data'></div>";
+ break;
+ case 'upload':
+ html = "<div class='form-group'><label for='name'>Arquivo</label><input type='file' class='form-control' id='new-file-data'></div>";
+ break;
+ case 'folder':
+ html = "<div class='form-group'><label for='name'>Nome da Pasta</label><input type='name' class='form-control' id='new-file-data'></div>";
+ break;
+ case 'link':
+ html = "<div class='form-group'><label for='name'>Nome do Link</label><input type='name' class='form-control' id='new-file-data'></div>";
+ break;
+ }
+ document.getElementById('new-file-input').innerHTML = html;
+}
+
+function getContent(obj,path,dirOnly){
+ var folders = "";
+ var files = "";
+ for (var property in obj) {
+ if (obj.hasOwnProperty(property)) {
+ if(property.substring(0, 4) == "dir_"){
+ var pname = property.slice(4);
+ // Create file navigation tree
+ if(!dirOnly){
+ folders += '<div class="item dir" onclick="clickDir(this)" data-target="#' + pname + '" data-path="' + path + pname + '/' + '"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="' + pname + '-icon"></div> ' + pname + '</div>';
+ folders += '<div class="folder" id="' + pname + '">';
+ folders += getContent(obj[property],path + pname + "/",dirOnly);
+ folders += '</div>';
+ }
+ // Create directory chooser
+ else{
+ folders += '<div class="item dir" onclick="clickDir(this)" data-target="#' + pname + '-dc" data-path="' + path + pname + '/' + '"><div class="glyphicon glyphicon-folder-close dir-icon" aria-hidden="true" id="' + pname + '-dc' + '-icon"></div> ' + pname + '</div>';
+ folders += '<div class="folder" id="' + pname + '-dc' + '">';
+ folders += getContent(obj[property],path + pname + "/",dirOnly);
+ folders += '</div>';
+ }
+ }
+ if(!dirOnly){
+ if(property.substring(0, 5) == "file_"){
+ var pname = property.slice(5);
+ files += '<div class="item" id="' + path + pname + '" onclick="clickItem(this)">' + pname + '</div>';
+ }
+ if(property.substring(0, 5) == "link_"){
+ var pname = property.slice(5);
+ files += '<div class="item item-link" data-value="' + obj[property] + '" onclick="clickLink(this)">'
+ + '<span class="glyphicon glyphicon-link" aria-hidden="true"></span> ' + pname + '</div>';
+ }
+ if(property.substring(0, 5) == "lock_"){
+ var pname = property.slice(5);
+ files += '<div class="item item-lock" id="' + path + pname + '" onclick="clickLock(this)">'
+ + pname + '</div>';
+ }
+ }
+ }
+ }
+ return folders+ files;
+}
+
+function mountNav(dirOnly){
+ document.getElementById((dirOnly) ? 'dir-nav' : 'mod-nav').innerHTML = getContent(module,"/",dirOnly);
+}
+
+function init(){
+ $.ajax({
+ method: "GET",
+ url: "?do=SysConfig&async=true",
+ data: { request:"module-contents", module: "{{module}}" }
+ }).done(function( data ) {
+ if(data != ""){
+ module = JSON.parse(data);
+ original = JSON.parse(data);
+ mountNav(false);
+ mountNav(true);
+ }
+ });
+}
+
+function save(){
+ //send JSON to PHP
+ if(JSON.stringify(original) != JSON.stringify(module)){
+
+ }
+}
+
+window.onbeforeunload = function (e) {
+ if(JSON.stringify(original) != JSON.stringify(module)){
+ var message = "{{lang_leavingMessage}}",
+ e = e || window.event;
+
+ // For IE and Firefox
+ if (e) {
+ e.returnValue = message;
+ }
+
+ // For Safari
+ return message;
+ }
+ return;
+};
+
+init();
+</script> \ No newline at end of file
diff --git a/modules/syslog/config.json b/modules/syslog/config.json
new file mode 100644
index 00000000..d42dc3e3
--- /dev/null
+++ b/modules/syslog/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"status",
+ "enabled":"true"
+}
diff --git a/modules/syslog.inc.php b/modules/syslog/module.inc.php
index 43a9bd28..43a9bd28 100644
--- a/modules/syslog.inc.php
+++ b/modules/syslog/module.inc.php
diff --git a/modules/syslog/templates/page-syslog.html b/modules/syslog/templates/page-syslog.html
new file mode 100644
index 00000000..98e94291
--- /dev/null
+++ b/modules/syslog/templates/page-syslog.html
@@ -0,0 +1,58 @@
+<h1>{{lang_clientLog}}</h1>
+<form method="post" action="?do=SysLog">
+ <input type="hidden" name="token" value="{{token}}">
+ <div class="input-group">
+ <span class="input-group-addon">{{lang_filter}}</span>
+ <input id="filterstring" type="text" placeholder="id" value="{{filter}}" name="filter" data-role="tagsinput" />
+ <span class="input-group-addon">
+ <input type="checkbox" name="not" {{#not}}checked="checked"{{/not}}> {{lang_not}}
+ </span>
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="submit">{{lang_go}}</button>
+ </span>
+ </div>
+</form>
+{{{pagenav}}}
+<table class="table table-striped table-condensed">
+ <thead>
+ <th width="1"></th>
+ <th>{{lang_when}}</th>
+ <th>{{lang_client}}</th>
+ <th>{{lang_event}}</th>
+ <th width="1">{{lang_details}}</th>
+ </thead>
+ <tbody>
+ {{#list}}
+ <tr>
+ <td><span class="glyphicon {{icon}}" title="{{logtypeid}}" onclick="$('#filterstring').tagsinput('add', '{{logtypeid}}')"></span></td>
+ <td class="text-right" nowrap="nowrap">{{date}}</td>
+ <td>{{clientip}}</td>
+ <td>{{description}}</td>
+ <td>{{#extra}}
+ <a class="btn btn-default btn-xs pull-left" onclick="$('#details-body').html($('#extra-{{logid}}').html())" data-toggle="modal" data-target="#myModal">&raquo;</a>
+ <div class="hidden" id="extra-{{logid}}">{{extra}}</div>
+ {{/extra}}</td>
+ </tr>
+ {{/list}}
+ </tbody>
+</table>
+{{{pagenav}}}
+
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title" id="myModalLabel">{{lang_details}}</h4>
+ </div>
+ <div class="modal-body">
+ <pre id="details-body"></pre>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+
diff --git a/modules/systemstatus/config.json b/modules/systemstatus/config.json
new file mode 100644
index 00000000..d42dc3e3
--- /dev/null
+++ b/modules/systemstatus/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"status",
+ "enabled":"true"
+}
diff --git a/modules/systemstatus.inc.php b/modules/systemstatus/module.inc.php
index 105202ac..2a5382e1 100644
--- a/modules/systemstatus.inc.php
+++ b/modules/systemstatus/module.inc.php
@@ -31,7 +31,7 @@ class Page_SystemStatus extends Page
}
Render::addScriptTop('custom');
Render::addScriptBottom('circles.min');
- Render::addTemplate('systemstatus/_page', $data);
+ Render::addTemplate('_page', $data);
}
protected function doAjax()
@@ -124,7 +124,7 @@ class Page_SystemStatus extends Page
} else {
$data['notConfigured'] = true;
}
- echo Render::parse('systemstatus/diskstat', $data);
+ echo Render::parse('diskstat', $data);
}
protected function ajaxAddressList()
@@ -147,7 +147,7 @@ class Page_SystemStatus extends Page
$addr['primary'] = true;
}
array_multisort($sort, SORT_STRING, $task['data']['addresses']);
- echo Render::parse('systemstatus/addresses', array(
+ echo Render::parse('addresses', array(
'addresses' => $task['data']['addresses']
));
}
@@ -203,7 +203,7 @@ class Page_SystemStatus extends Page
$data['CpuTotal'] = $info['CpuTotal'];
$data['CpuIdle'] = $info['CpuIdle'];
}
- echo Render::parse('systemstatus/systeminfo', $data);
+ echo Render::parse('systeminfo', $data);
}
protected function ajaxSysPoll()
@@ -236,7 +236,7 @@ class Page_SystemStatus extends Page
}
// TODO: Dozentenmodul, tftp, ...
- echo Render::parse('systemstatus/services', $data);
+ echo Render::parse('services', $data);
}
protected function ajaxDmsdLog()
diff --git a/templates/systemstatus/_page.html b/modules/systemstatus/templates/_page.html
index 51aa5b55..51aa5b55 100644
--- a/templates/systemstatus/_page.html
+++ b/modules/systemstatus/templates/_page.html
diff --git a/templates/systemstatus/addresses.html b/modules/systemstatus/templates/addresses.html
index ce92c4d5..ce92c4d5 100644
--- a/templates/systemstatus/addresses.html
+++ b/modules/systemstatus/templates/addresses.html
diff --git a/templates/systemstatus/diskstat.html b/modules/systemstatus/templates/diskstat.html
index 528d9792..528d9792 100644
--- a/templates/systemstatus/diskstat.html
+++ b/modules/systemstatus/templates/diskstat.html
diff --git a/templates/systemstatus/services.html b/modules/systemstatus/templates/services.html
index 6c4f0b93..6c4f0b93 100644
--- a/templates/systemstatus/services.html
+++ b/modules/systemstatus/templates/services.html
diff --git a/templates/systemstatus/systeminfo.html b/modules/systemstatus/templates/systeminfo.html
index ed4a1532..ed4a1532 100644
--- a/templates/systemstatus/systeminfo.html
+++ b/modules/systemstatus/templates/systeminfo.html
diff --git a/modules/translation/config.json b/modules/translation/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/translation/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/translation.inc.php b/modules/translation/module.inc.php
index 5b8b452a..3548f727 100644
--- a/modules/translation.inc.php
+++ b/modules/translation/module.inc.php
@@ -44,7 +44,7 @@ class Page_Translation extends Page
switch ($this->page) {
case 'messages':
//renders the message edit page
- Render::addTemplate('translation/edit', array(
+ Render::addTemplate('edit', array(
'path' => 'messages',
'langs' => $langs,
'tags' => $this->loadMessageEditArray()
@@ -52,7 +52,7 @@ class Page_Translation extends Page
break;
case 'hardcoded':
//renders the hardcoded messages edit page
- Render::addTemplate('translation/edit', array(
+ Render::addTemplate('edit', array(
'path' => 'messages-hardcoded',
'langs' => $langs,
'tags' => $this->loadHardcodedStringEditArray()
@@ -60,20 +60,20 @@ class Page_Translation extends Page
break;
case 'settings':
//renders the settings related edit page
- Render::addTemplate('translation/edit', array(
- 'path' => 'settings/cat_setting',
+ Render::addTemplate('edit', array(
+ 'path' => 'cat_setting',
'langs' => $langs,
'tags' => $this->loadCategoriesArray()
));
- Render::addTemplate('translation/edit', array(
- 'path' => 'settings/setting',
+ Render::addTemplate('edit', array(
+ 'path' => 'setting',
'langs' => $langs,
'tags' => $this->loadSettingsArray()
));
break;
case 'config-module':
//renders the hardcoded messages edit page
- Render::addTemplate('translation/edit', array(
+ Render::addTemplate('edit', array(
'path' => 'config-module',
'langs' => $langs,
'tags' => $this->buildTranslationTable('config-module')
@@ -86,24 +86,131 @@ class Page_Translation extends Page
Util::redirect('?do=Translation');
}
//renders the tag edition page
- Render::addTemplate('translation/edit', array(
- 'path' => 'templates/' . $this->template,
+ Render::addTemplate('edit', array(
+ 'path' => 'modules/' . $this->template,
'langs' => $langs,
'tags' => $this->loadTemplateEditArray($this->template)
));
break;
case 'templates':
//renders the template selection page
- Render::addTemplate('translation/template-list', array(
+ Render::addTemplate('template-list', array(
'table' => $this->loadTemplatesList(),
));
break;
+ case 'modules':
+ Render::addTemplate('module-list', array(
+ 'table' => $this->loadModuleTable()
+ ));
+ break;
default:
//renders main page with selection of what part to edit
- Render::addTemplate('translation/_page');
+ Render::addTemplate('_page');
}
}
+ private function loadModuleTable(){
+ $table = array();
+
+ $modules = $this->loadModuleList();
+
+ foreach ($modules as $module) {
+ $msgs = $this->checkModuleTranslation($module);
+ $table[] = array(
+ 'module' => $module,
+ 'status' => $msgs
+ );
+ }
+
+ sort($table);
+ return $table;
+ }
+
+ private function loadModuleEdit(){
+ $table = array();
+ $tags = array_flip($this->loadModuleTags($this->module));
+ foreach ($this->langs as $lang) {
+ $tags = array_merge($tags, Dictionary::getArray($this->module,$lang['cc']));
+ }
+ foreach ($tags as $tag => $value) {
+ $langArray = array();
+ $class = '';
+ foreach ($this->langs as $lang) {
+ $translations = Dictionary::getArray($this->module,$lang['cc']);
+ $langArray[] = array(
+ 'lang' => $lang['cc'],
+ 'placeholder' => 'TAG - ' . $lang['name'],
+ 'translation' => $translations[$tag]
+ );
+ if(!in_array($tag, $this->loadModuleTags($this->module)))
+ $class = 'danger';
+ else if(!$translations[$tag])
+ $class = 'warning';
+ }
+ $table[] = array(
+ 'tag' => $tag,
+ 'class' => $class,
+ 'langs' => $langArray
+ );
+ }
+
+ return $table;
+ }
+
+ private function loadModuleList(){
+ // Return an array with the modules and the tags data
+ $list = array();
+ $list = array_diff(scandir('modules/'), array('..', '.'));
+ return $list;
+ }
+
+ private function loadModuleTags($module){
+ // Return an array with the module language tags
+ $path = "modules/" . $module . "templates/";
+ $files = array_diff(scandir($path), array('..', '.'));
+ $tags = array();
+ foreach ($files as $file) {
+ $content = file_get_contents($path . $file);
+ preg_match_all('/{{(lang_.*?)}}/s', $content, $matches);
+ if (isset($matches[1]) && is_array($matches[1])){
+ $tags = array_merge($tags,array_unique($matches[1]));
+ }
+ }
+ return array_unique($tags);
+ }
+
+ private function checkModuleTranslation($module){
+ $tags = $this->loadModuleTags($module);
+ $translation = array();
+ $msgs = '';
+ foreach ($this->langs as $key => $lang) {
+ $translation = Dictionary::getArray($module,$lang['cc']);
+ $matches = 0;
+ $unused = 0;
+ $expected = count($tags);
+ foreach ($translation as $key => $value) {
+ if(!in_array($key, $tags))
+ $unused ++;
+ else if(!empty($value))
+ $matches ++;
+
+ }
+
+ $diff = $expected - $matches;
+ $msg = "";
+ if ($diff > 0)
+ $msg .= $diff . " JSON tag(s) are missing";
+ if ($diff > 0 && $unused > 0)
+ $msg .= "<br>";
+ if ($unused > 0)
+ $msg .= $unused . " JSON tag(s) are not being used";
+ if(!empty($msg))
+ $msgs .= "<div><span class='badge'>{$lang['name']}:</span> $msg</div>";
+ }
+ if(empty($msgs))
+ $msgs = 'OK';
+ return $msgs;
+ }
/**
* Load the main table with all the website's templates and it's informations
* @return array with the templates' information
@@ -147,7 +254,7 @@ class Page_Translation extends Page
private function listTemplates()
{
$files = array();
- $dir = 'templates/';
+ $dir = 'modules/';
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
foreach ($objects as $name => $object) {
if (substr($name, -5) === '.html') {
@@ -198,7 +305,7 @@ class Page_Translation extends Page
$unusedCount = 0;
//loads the JSON tags and count the matches
- $json = Dictionary::getArray($path, $lang);
+ $json = Dictionary::getArray(substr($path, strlen("modules/")), $lang);
//return print_r($json) . "\nvs\n" . print_r($expectedTags);
foreach ($json as $key => $value) {
if (!in_array($key, $expectedTags)) {
@@ -229,11 +336,10 @@ class Page_Translation extends Page
*/
private function loadTemplateEditArray($path)
{
- $path = "templates/$path";
$tags = $this->loadTemplateTags($path);
if ($tags === false)
return false;
- return $this->buildTranslationTable($path, $tags);
+ return $this->buildTranslationTable("modules/" . $path, $tags);
}
/**
@@ -320,9 +426,9 @@ class Page_Translation extends Page
}
}
}
- // Finds every JSON tag withing the JSON language files
+ // Finds every JSON tag within the JSON language files
foreach ($langArray as $lang) {
- $jsonTags = Dictionary::getArray($path, $lang);
+ $jsonTags = Dictionary::getArray($path, $lang, true);
if (!is_array($jsonTags))
continue;
foreach ($jsonTags as $tag => $translation) {
diff --git a/templates/translation/_page.html b/modules/translation/templates/_page.html
index 37122d7e..52a4c94b 100644
--- a/templates/translation/_page.html
+++ b/modules/translation/templates/_page.html
@@ -5,6 +5,8 @@
<div class="panel-body">
<p>{{lang_adminInfo}}</p>
<ul class="nav nav-pills nav-stacked">
+ <!-- new modules page ??? -->
+ <li><a href="?do=Translation&amp;page=modules">{{lang_editModules}}</a></li>
<li><a href="?do=Translation&amp;page=templates">{{lang_editTemplates}}</a></li>
<li><a href="?do=Translation&amp;page=messages">{{lang_editMessages}}</a></li>
<li><a href="?do=Translation&amp;page=hardcoded">{{lang_editHardcoded}}</a></li>
diff --git a/templates/translation/edit.html b/modules/translation/templates/edit.html
index dc01deb6..dc01deb6 100644
--- a/templates/translation/edit.html
+++ b/modules/translation/templates/edit.html
diff --git a/modules/translation/templates/module-list.html b/modules/translation/templates/module-list.html
new file mode 100644
index 00000000..037a21bc
--- /dev/null
+++ b/modules/translation/templates/module-list.html
@@ -0,0 +1,32 @@
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_langAdministration}}
+ </div>
+ <div class="panel-body">
+ <p>{{lang_adminInfo}}</p>
+ </div>
+</div>
+<div class="panel panel-default">
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th width="350">{{lang_module}}</th>
+ <th>{{lang_status}}</th>
+ <tr>
+ </thead>
+ <tbody>
+ {{#table}}
+ <tr onclick="goTo('{{module}}');">
+ <td>{{module}}</td>
+ <td>{{{status}}}</td>
+ </tr>
+ {{/table}}
+ </tbody>
+ </table>
+</div>
+
+<script>
+function goTo(link){
+ window.location.href = "?do=Translation&page=module&module=" + link;
+}
+</script>
diff --git a/templates/translation/template-list.html b/modules/translation/templates/template-list.html
index 881fc5af..881fc5af 100644
--- a/templates/translation/template-list.html
+++ b/modules/translation/templates/template-list.html
diff --git a/modules/usermanagement/config.json b/modules/usermanagement/config.json
new file mode 100644
index 00000000..90787d94
--- /dev/null
+++ b/modules/usermanagement/config.json
@@ -0,0 +1,5 @@
+{
+ "category":"users",
+ "enabled":"true",
+ "permission":"0"
+}
diff --git a/modules/usermanagement/module.inc.php b/modules/usermanagement/module.inc.php
new file mode 100644
index 00000000..01b5f755
--- /dev/null
+++ b/modules/usermanagement/module.inc.php
@@ -0,0 +1,109 @@
+<?php
+
+class Page_Usermanagement extends Page
+{
+ private $page;
+ private $deb;
+
+ protected function doPreprocess()
+ {
+ User::load();
+
+ $p = Request::get('page');
+ if($p != false)
+ $this->page = $p;
+ else
+ $this->page = 1;
+
+ switch(Request::post('action')){
+ case "editAdmin":
+ $this->edit(Request::post('userid'),Request::post('username'),Request::post('phone'),Request::post('email'), 1);
+ break;
+ case "edit":
+ $this->edit(Request::post('userid'),Request::post('username'),Request::post('phone'),Request::post('email'), 4);
+ break;
+ case "create":
+ $this->create(Request::post('login'),Request::post('username'),Request::post('pass'),Request::post('phone'),Request::post('email'), 4);
+ break;
+ case "delete":
+ $this->delete(Request::post('userid'));
+ break;
+ }
+
+ if(isset($_POST['userid']))
+ $this->deb = $_POST['userid'];
+
+ if (!User::hasPermission('superadmin')) {
+ Message::addError('no-permission');
+ Util::redirect('?do=Main');
+ }
+
+ }
+
+ protected function doRender()
+ {
+ // load every user
+ $admin = array();
+ $users = array();
+ $res = Database::simpleQuery("SELECT userid, login, fullname, phone, email, permissions FROM user ORDER BY userid DESC");
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ if ($row['permissions'] == 1 )
+ $admin = array($row['userid'],$row['login'],$row['fullname'],$row['phone'],$row['email']);
+ else
+ $users[] = array(
+ 'id' => $row['userid'],
+ 'username' => $row['login'],
+ 'name' => $row['fullname'],
+ 'telephone' => $row['phone'],
+ 'email' => $row['email']
+ );
+ }
+
+ //$pag = new Paginate($users,$this->page);
+
+ Render::addTemplate('user-management', array(
+ 'admin_id' => $admin[0],
+ 'admin_username' => $admin[1],
+ 'admin_name' => $admin[2],
+ 'admin_telephone' => $admin[3],
+ 'admin_email' => $admin[4]
+ //'users' => $pag->getItems(),
+ //'pages' => $pag->getPagination()
+ ));
+ }
+
+ private function edit($userid, $newname, $newphone, $newemail, $newpermissions){
+ $data = array (
+ 'user' => $userid,
+ 'name' => $newname,
+ 'phone' => $newphone,
+ 'email' => $newemail,
+ 'permissions' => $newpermissions
+ );
+ Database::exec ( 'UPDATE user SET fullname = :name, phone = :phone, email = :email, permissions = :permissions WHERE userid = :user', $data );
+ Message::addSuccess('update-user');
+ }
+
+ private function create($login, $username, $password, $phone, $email){
+ $data = array (
+ 'login' => $login,
+ 'pass' => Crypto::hash6 ( $password ),
+ 'name' => $username,
+ 'phone' => $phone,
+ 'email' => $email
+ );
+ User::addUser($data);
+ }
+
+ private function delete($userid){
+ $data = array (
+ 'userid' => $userid
+ );
+ Database::exec ( 'DELETE FROM setting_partition WHERE user = :userid', $data );
+ Database::exec ( 'DELETE FROM setting_user WHERE user = :userid', $data );
+ Database::exec ( 'DELETE FROM setting_values WHERE user = :userid', $data );
+ Database::exec ( 'DELETE FROM user WHERE userid = :userid', $data );
+ Message::addSuccess('delete-user');
+ }
+
+}
diff --git a/modules/usermanagement/templates/user-management.html b/modules/usermanagement/templates/user-management.html
new file mode 100644
index 00000000..fc14355f
--- /dev/null
+++ b/modules/usermanagement/templates/user-management.html
@@ -0,0 +1,127 @@
+<div class="panel panel-primary">
+ <div class="panel-heading" style="background-image: none;" >
+ <div class="panel-title">{{lang_userAdmin}}</div>
+ </div>
+ <table class="table">
+ <tr>
+ <th style="text-align: center;">ID</th>
+ <th style="text-align: center;">{{lang_login}}</th>
+ <th style="text-align: center;">{{lang_username}}</th>
+ <th style="text-align: center;">{{lang_telephone}}</th>
+ <th style="text-align: center;">{{lang_email}}</th>
+ <th style="text-align: center;"></th>
+ </tr>
+ <tr>
+ <form method="post" action="">
+ <input type="hidden" name="action" value="editAdmin">
+ <input type="hidden" name="token" value="{{token}}">
+ <td><input class="form-control" name="userid" type="text" readonly="readonly" value="{{admin_id}}" size="3"></td>
+ <td><input class="form-control" type="text" disabled="disabled" value="{{admin_username}}"></td>
+ <td><input class="form-control" name="username" type="text" value="{{admin_name}}"></td>
+ <td><input class="form-control" name="phone" type="text" value="{{admin_telephone}}"></td>
+ <td><input class="form-control" name="email" type="text" value="{{admin_email}}"></td>
+ <td><input class="btn btn-primary" type="submit" value="{{lang_save}}"></td>
+ </form>
+ </tr>
+ </table>
+</div>
+
+<div class="panel panel-default" style="border-color:#333;">
+ <div class="panel-heading" style="border-color:#333;background-color:#333;background-image: none;color:#FFF;">
+ <div class="panel-title">{{lang_userPage}}</div>
+ </div>
+ <div class="panel-body">
+ <p>
+ {{lang_userInfo}}
+ </p>
+
+ </div>
+ <table class="table">
+ <tr>
+ <form method="post" action="?do=Usermanagement">
+ <input type="hidden" name="action" value="create">
+ <input type="hidden" name="token" value="{{token}}">
+ <td><input class="form-control" name="login" type="text" placeholder="{{lang_login}}"></td>
+ <td><input class="form-control" name="username" type="text" placeholder="{{lang_username}}"></td>
+ <td><input class="form-control" name="pass" type="password" placeholder="{{lang_password}}"></td>
+ <td><input class="form-control" name="phone" type="text" placeholder="{{lang_telephone}}"></td>
+ <td><input class="form-control" name="email" type="text" placeholder="{{lang_email}}"></td>
+ <td><input class="btn btn-primary" type="submit" value="{{lang_create}}"></td>
+ </form>
+ </tr>
+ <tr>
+ <th style="text-align: center;">ID</th>
+ <th style="text-align: center;">{{lang_login}}</th>
+ <th colspan="4">{{lang_operations}}</th>
+ </tr>
+ {{#users}}
+ <tr>
+ <td><input class="form-control" type="text" disabled="disabled" value="{{id}}" size="3"></td>
+ <td><input class="form-control" type="text" disabled="disabled" value="{{username}}"></td>
+ <td colspan="4">
+ <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#usr{{id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> {{lang_edit}}</button>
+ <form method="post" action="?do=Usermanagement" style="display:inline-block;">
+ <input type="hidden" name="action" value="delete">
+ <input type="hidden" name="userid" value="{{id}}">
+ <input type="hidden" name="token" value="{{token}}">
+ <button class="btn btn-danger" type="submit" onclick="return confirm('{{lang_cancelConfirm}}');"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {{lang_remove}}</a>
+ </form>
+ </td>
+ </tr>
+ {{/users}}
+ <tr>
+ <td colspan="6">
+ <ul class="pagination" style="margin:10px 0;">
+ {{#pages}}
+ <li class="{{class}}"><a href="?do=Usermanagement&page={{page}}">{{page}}</a></li>
+ {{/pages}}
+ </ul>
+ </td>
+ </tr>
+ </table>
+</div>
+{{#users}}
+<div class="modal fade" id="usr{{id}}" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header"><h4 class="modal-title">{{lang_editUser}}</h4></div>
+ <div class="modal-body">
+ <form method="post" action="">
+ <input type="hidden" name="action" value="edit">
+ <input type="hidden" name="token" value="{{token}}">
+ <div class="form-group">
+ <label for="userid">ID</label>
+ <input type="text" class="form-control" name="userid" readonly="readonly" name="userid" value="{{id}}">
+ </div>
+ <div class="form-group">
+ <label for="userid">Login</label>
+ <input type="text" class="form-control" name="login" disabled="disabled" placeholder="{{lang_login}}" value="{{username}}">
+ </div>
+ <div class="form-group">
+ <label for="userid">{{lang_username}}</label>
+ <input type="text" class="form-control" name="username" placeholder="{{lang_username}}" value="{{name}}">
+ </div>
+ <div class="form-group">
+ <label for="userid">{{lang_telephone}}</label>
+ <input type="text" class="form-control" name="phone" placeholder="{{lang_telephone}}" value="{{telephone}}">
+ </div>
+ <div class="form-group">
+ <label for="userid">{{lang_email}}</label>
+ <input type="text" class="form-control" name="email" placeholder="{{lang_email}}" value="{{email}}">
+ </div>
+ <div class="form-group">
+ <b>Permissões:</b>
+ <select name="permissions" class="form-control">
+ <option value="4">Normal</option>
+ </select>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <input class="btn btn-primary" type="submit" value="{{lang_save}}">
+ <a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+{{/users}} \ No newline at end of file
diff --git a/modules/vmstore/config.json b/modules/vmstore/config.json
new file mode 100644
index 00000000..93209f62
--- /dev/null
+++ b/modules/vmstore/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"settings",
+ "enabled":"true"
+}
diff --git a/modules/vmstore.inc.php b/modules/vmstore/module.inc.php
index afc5809d..81f92ee3 100644
--- a/modules/vmstore.inc.php
+++ b/modules/vmstore/module.inc.php
@@ -24,7 +24,7 @@ class Page_VmStore extends Page
{
$action = Request::post('action');
if ($action === 'setstore' && !Taskmanager::isFailed($this->mountTask)) {
- Render::addTemplate('vmstore/mount', array(
+ Render::addTemplate('mount', array(
'task' => $this->mountTask['id']
));
return;
diff --git a/templates/vmstore/mount.html b/modules/vmstore/templates/mount.html
index eabee81a..eabee81a 100644
--- a/templates/vmstore/mount.html
+++ b/modules/vmstore/templates/mount.html
diff --git a/modules/vmstore/templates/page-vmstore.html b/modules/vmstore/templates/page-vmstore.html
new file mode 100644
index 00000000..fe2c5225
--- /dev/null
+++ b/modules/vmstore/templates/page-vmstore.html
@@ -0,0 +1,111 @@
+<form role="form" method="post" action="?do=VmStore">
+ <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;">
+ <input type="password" name="password_fake" id="password_fake" value="" style="display:none;">
+ <input type="hidden" name="token" value="{{token}}">
+ <input type="hidden" name="action" value="setstore">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{lang_vmLocation}} <a class="btn btn-default" data-toggle="modal" data-target="#help-store"><span class="glyphicon glyphicon-question-sign"></span></a>
+ </div>
+ <div class="panel-body slx-md-width">
+ <p>{{lang_vmLocationChoose}}</p>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <input type="radio" name="storetype" value="internal" {{pre-internal}}> {{lang_intern}}
+ </div>
+ <div class="panel-body">
+ {{lang_noAdditionalInformation}}
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <input type="radio" name="storetype" value="nfs" {{pre-nfs}}> NFS
+ <a class="btn btn-default btn-sm" data-toggle="modal" data-target="#help-nfs"><span class="glyphicon glyphicon-question-sign"></span></a>
+ </div>
+ <div class="panel-body">
+ <label for="nfsaddr">NFS-Export</label>
+ <input type="text" class="form-control" name="nfsaddr" value="{{nfsaddr}}" placeholder="1.2.3.4:/export/bwlp" id="nfsaddr">
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <input type="radio" name="storetype" value="cifs" {{pre-cifs}}> CIFS
+ </div>
+ <div class="panel-body">
+ <label for="cifsaddr">UNC-Pfad</label>
+ <input type="text" class="form-control" name="cifsaddr" value="{{cifsaddr}}" placeholder="\\samba.server.example.com\bwlp" id="cifsaddr">
+ <br>
+ <label for="cifsuser">{{lang_readWrite}}</label>
+ <div class="input-group">
+ <span class="input-group-addon slx-ga">
+ {{lang_username}}
+ </span>
+ <input type="text" class="form-control" name="cifsuser" value="{{cifsuser}}" placeholder="{{lang_username}}" id="cifsuser">
+ <span class="input-group-addon">
+ {{lang_password}}
+ </span>
+ <input type="{{password_type}}" class="form-control" name="cifspasswd" value="{{cifspasswd}}" placeholder="{{lang_password}}">
+ </div>
+ <br>
+ <label for="cifsuserro">{{lang_readOnly}}</label>
+ <div class="input-group">
+ <span class="input-group-addon slx-ga">
+ {{lang_username}}
+ </span>
+ <input type="text" class="form-control" name="cifsuserro" value="{{cifsuserro}}" placeholder="{{lang_username}}" id="cifsuserro">
+ <span class="input-group-addon">
+ {{lang_password}}
+ </span>
+ <input type="{{password_type}}" class="form-control" name="cifspasswdro" value="{{cifspasswdro}}" placeholder="{{lang_password}}">
+ </div>
+ </div>
+ </div>
+ <button class="btn btn-primary" type="submit">{{lang_save}}</button>
+ </div>
+ </div>
+</form>
+
+<div class="modal fade" id="help-store" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">{{lang_vmLocation}}</div>
+ <div class="modal-body">
+ <p>
+ {{lang_vmLocationHelp1}}
+ </p>
+ <p>
+ {{lang_vmLocationHelp2}}
+ </p>
+ <p>
+ {{lang_vmLocationHelp3}}
+ </p>
+ </div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fade" id="help-nfs" tabindex="-1" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">NFS</div>
+ <div class="modal-body">
+ <p>
+ {{lang_nfsHelp1}}
+ </p>
+ <pre>
+/mnt/images 1.2.3.4(rw,no_root_squash,async)
+/mnt/images *(ro,async,nolock)
+ </pre>
+ <p>
+ {{lang_nfsHelp2}}
+ </p>
+ <pre>
+/mnt/images 1.2.3.4(rw,all_squash,anon_uid=1234,async)
+/mnt/images *(ro,async,nolock)
+ </pre>
+ </div>
+ <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
+ </div>
+ </div>
+</div>
diff --git a/modules/webinterface/config.json b/modules/webinterface/config.json
new file mode 100644
index 00000000..4e7fa5fb
--- /dev/null
+++ b/modules/webinterface/config.json
@@ -0,0 +1,4 @@
+{
+ "category":"content",
+ "enabled":"true"
+}
diff --git a/modules/webinterface.inc.php b/modules/webinterface/module.inc.php
index cecccacd..c301dec9 100644
--- a/modules/webinterface.inc.php
+++ b/modules/webinterface/module.inc.php
@@ -50,15 +50,15 @@ class Page_WebInterface extends Page
{
Render::setTitle(Dictionary::translate('lang_titleWebinterface'));
if (Request::get('show') === 'httpsupdate') {
- Render::addTemplate('webinterface/httpd-restart', array('taskid' => Session::get('https-id')));
+ Render::addTemplate('httpd-restart', array('taskid' => Session::get('https-id')));
}
- Render::addTemplate('webinterface/https', array('httpsEnabled' => file_exists('/etc/lighttpd/server.pem')));
+ Render::addTemplate('https', array('httpsEnabled' => file_exists('/etc/lighttpd/server.pem')));
$data = array();
if (Property::getPasswordFieldType() === 'text')
$data['selected_show'] = 'checked';
else
$data['selected_hide'] = 'checked';
- Render::addTemplate('webinterface/passwords', $data);
+ Render::addTemplate('passwords', $data);
}
private function setHttpsOff()
diff --git a/templates/webinterface/httpd-restart.html b/modules/webinterface/templates/httpd-restart.html
index cc84aafb..cc84aafb 100644
--- a/templates/webinterface/httpd-restart.html
+++ b/modules/webinterface/templates/httpd-restart.html
diff --git a/templates/webinterface/https.html b/modules/webinterface/templates/https.html
index c6161cd6..c6161cd6 100644
--- a/templates/webinterface/https.html
+++ b/modules/webinterface/templates/https.html
diff --git a/templates/webinterface/passwords.html b/modules/webinterface/templates/passwords.html
index f9fda016..f9fda016 100644
--- a/templates/webinterface/passwords.html
+++ b/modules/webinterface/templates/passwords.html
diff --git a/script/bootstrap-switch.js b/script/bootstrap-switch.js
new file mode 100644
index 00000000..49670481
--- /dev/null
+++ b/script/bootstrap-switch.js
@@ -0,0 +1,710 @@
+/* ========================================================================
+ * bootstrap-switch - v3.3.2
+ * http://www.bootstrap-switch.org
+ * ========================================================================
+ * Copyright 2012-2013 Mattia Larentis
+ *
+ * ========================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+(function() {
+ var __slice = [].slice;
+
+ (function($, window) {
+ "use strict";
+ var BootstrapSwitch;
+ BootstrapSwitch = (function() {
+ function BootstrapSwitch(element, options) {
+ if (options == null) {
+ options = {};
+ }
+ this.$element = $(element);
+ this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, {
+ state: this.$element.is(":checked"),
+ size: this.$element.data("size"),
+ animate: this.$element.data("animate"),
+ disabled: this.$element.is(":disabled"),
+ readonly: this.$element.is("[readonly]"),
+ indeterminate: this.$element.data("indeterminate"),
+ inverse: this.$element.data("inverse"),
+ radioAllOff: this.$element.data("radio-all-off"),
+ onColor: this.$element.data("on-color"),
+ offColor: this.$element.data("off-color"),
+ onText: this.$element.data("on-text"),
+ offText: this.$element.data("off-text"),
+ labelText: this.$element.data("label-text"),
+ handleWidth: this.$element.data("handle-width"),
+ labelWidth: this.$element.data("label-width"),
+ baseClass: this.$element.data("base-class"),
+ wrapperClass: this.$element.data("wrapper-class")
+ }, options);
+ this.$wrapper = $("<div>", {
+ "class": (function(_this) {
+ return function() {
+ var classes;
+ classes = ["" + _this.options.baseClass].concat(_this._getClasses(_this.options.wrapperClass));
+ classes.push(_this.options.state ? "" + _this.options.baseClass + "-on" : "" + _this.options.baseClass + "-off");
+ if (_this.options.size != null) {
+ classes.push("" + _this.options.baseClass + "-" + _this.options.size);
+ }
+ if (_this.options.disabled) {
+ classes.push("" + _this.options.baseClass + "-disabled");
+ }
+ if (_this.options.readonly) {
+ classes.push("" + _this.options.baseClass + "-readonly");
+ }
+ if (_this.options.indeterminate) {
+ classes.push("" + _this.options.baseClass + "-indeterminate");
+ }
+ if (_this.options.inverse) {
+ classes.push("" + _this.options.baseClass + "-inverse");
+ }
+ if (_this.$element.attr("id")) {
+ classes.push("" + _this.options.baseClass + "-id-" + (_this.$element.attr("id")));
+ }
+ return classes.join(" ");
+ };
+ })(this)()
+ });
+ this.$container = $("<div>", {
+ "class": "" + this.options.baseClass + "-container"
+ });
+ this.$on = $("<span>", {
+ html: this.options.onText,
+ "class": "" + this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
+ });
+ this.$off = $("<span>", {
+ html: this.options.offText,
+ "class": "" + this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
+ });
+ this.$label = $("<span>", {
+ html: this.options.labelText,
+ "class": "" + this.options.baseClass + "-label"
+ });
+ this.$element.on("init.bootstrapSwitch", (function(_this) {
+ return function() {
+ return _this.options.onInit.apply(element, arguments);
+ };
+ })(this));
+ this.$element.on("switchChange.bootstrapSwitch", (function(_this) {
+ return function() {
+ return _this.options.onSwitchChange.apply(element, arguments);
+ };
+ })(this));
+ this.$container = this.$element.wrap(this.$container).parent();
+ this.$wrapper = this.$container.wrap(this.$wrapper).parent();
+ this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off);
+ if (this.options.indeterminate) {
+ this.$element.prop("indeterminate", true);
+ }
+ this._init();
+ this._elementHandlers();
+ this._handleHandlers();
+ this._labelHandlers();
+ this._formHandler();
+ this._externalLabelHandler();
+ this.$element.trigger("init.bootstrapSwitch");
+ }
+
+ BootstrapSwitch.prototype._constructor = BootstrapSwitch;
+
+ BootstrapSwitch.prototype.state = function(value, skip) {
+ if (typeof value === "undefined") {
+ return this.options.state;
+ }
+ if (this.options.disabled || this.options.readonly) {
+ return this.$element;
+ }
+ if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) {
+ return this.$element;
+ }
+ if (this.options.indeterminate) {
+ this.indeterminate(false);
+ }
+ value = !!value;
+ this.$element.prop("checked", value).trigger("change.bootstrapSwitch", skip);
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.toggleState = function(skip) {
+ if (this.options.disabled || this.options.readonly) {
+ return this.$element;
+ }
+ if (this.options.indeterminate) {
+ this.indeterminate(false);
+ return this.state(true);
+ } else {
+ return this.$element.prop("checked", !this.options.state).trigger("change.bootstrapSwitch", skip);
+ }
+ };
+
+ BootstrapSwitch.prototype.size = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.size;
+ }
+ if (this.options.size != null) {
+ this.$wrapper.removeClass("" + this.options.baseClass + "-" + this.options.size);
+ }
+ if (value) {
+ this.$wrapper.addClass("" + this.options.baseClass + "-" + value);
+ }
+ this._width();
+ this._containerPosition();
+ this.options.size = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.animate = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.animate;
+ }
+ value = !!value;
+ if (value === this.options.animate) {
+ return this.$element;
+ }
+ return this.toggleAnimate();
+ };
+
+ BootstrapSwitch.prototype.toggleAnimate = function() {
+ this.options.animate = !this.options.animate;
+ this.$wrapper.toggleClass("" + this.options.baseClass + "-animate");
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.disabled = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.disabled;
+ }
+ value = !!value;
+ if (value === this.options.disabled) {
+ return this.$element;
+ }
+ return this.toggleDisabled();
+ };
+
+ BootstrapSwitch.prototype.toggleDisabled = function() {
+ this.options.disabled = !this.options.disabled;
+ this.$element.prop("disabled", this.options.disabled);
+ this.$wrapper.toggleClass("" + this.options.baseClass + "-disabled");
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.readonly = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.readonly;
+ }
+ value = !!value;
+ if (value === this.options.readonly) {
+ return this.$element;
+ }
+ return this.toggleReadonly();
+ };
+
+ BootstrapSwitch.prototype.toggleReadonly = function() {
+ this.options.readonly = !this.options.readonly;
+ this.$element.prop("readonly", this.options.readonly);
+ this.$wrapper.toggleClass("" + this.options.baseClass + "-readonly");
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.indeterminate = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.indeterminate;
+ }
+ value = !!value;
+ if (value === this.options.indeterminate) {
+ return this.$element;
+ }
+ return this.toggleIndeterminate();
+ };
+
+ BootstrapSwitch.prototype.toggleIndeterminate = function() {
+ this.options.indeterminate = !this.options.indeterminate;
+ this.$element.prop("indeterminate", this.options.indeterminate);
+ this.$wrapper.toggleClass("" + this.options.baseClass + "-indeterminate");
+ this._containerPosition();
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.inverse = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.inverse;
+ }
+ value = !!value;
+ if (value === this.options.inverse) {
+ return this.$element;
+ }
+ return this.toggleInverse();
+ };
+
+ BootstrapSwitch.prototype.toggleInverse = function() {
+ var $off, $on;
+ this.$wrapper.toggleClass("" + this.options.baseClass + "-inverse");
+ $on = this.$on.clone(true);
+ $off = this.$off.clone(true);
+ this.$on.replaceWith($off);
+ this.$off.replaceWith($on);
+ this.$on = $off;
+ this.$off = $on;
+ this.options.inverse = !this.options.inverse;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.onColor = function(value) {
+ var color;
+ color = this.options.onColor;
+ if (typeof value === "undefined") {
+ return color;
+ }
+ if (color != null) {
+ this.$on.removeClass("" + this.options.baseClass + "-" + color);
+ }
+ this.$on.addClass("" + this.options.baseClass + "-" + value);
+ this.options.onColor = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.offColor = function(value) {
+ var color;
+ color = this.options.offColor;
+ if (typeof value === "undefined") {
+ return color;
+ }
+ if (color != null) {
+ this.$off.removeClass("" + this.options.baseClass + "-" + color);
+ }
+ this.$off.addClass("" + this.options.baseClass + "-" + value);
+ this.options.offColor = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.onText = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.onText;
+ }
+ this.$on.html(value);
+ this._width();
+ this._containerPosition();
+ this.options.onText = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.offText = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.offText;
+ }
+ this.$off.html(value);
+ this._width();
+ this._containerPosition();
+ this.options.offText = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.labelText = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.labelText;
+ }
+ this.$label.html(value);
+ this._width();
+ this.options.labelText = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.handleWidth = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.handleWidth;
+ }
+ this.options.handleWidth = value;
+ this._width();
+ this._containerPosition();
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.labelWidth = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.labelWidth;
+ }
+ this.options.labelWidth = value;
+ this._width();
+ this._containerPosition();
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.baseClass = function(value) {
+ return this.options.baseClass;
+ };
+
+ BootstrapSwitch.prototype.wrapperClass = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.wrapperClass;
+ }
+ if (!value) {
+ value = $.fn.bootstrapSwitch.defaults.wrapperClass;
+ }
+ this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" "));
+ this.$wrapper.addClass(this._getClasses(value).join(" "));
+ this.options.wrapperClass = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.radioAllOff = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.radioAllOff;
+ }
+ value = !!value;
+ if (value === this.options.radioAllOff) {
+ return this.$element;
+ }
+ this.options.radioAllOff = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.onInit = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.onInit;
+ }
+ if (!value) {
+ value = $.fn.bootstrapSwitch.defaults.onInit;
+ }
+ this.options.onInit = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.onSwitchChange = function(value) {
+ if (typeof value === "undefined") {
+ return this.options.onSwitchChange;
+ }
+ if (!value) {
+ value = $.fn.bootstrapSwitch.defaults.onSwitchChange;
+ }
+ this.options.onSwitchChange = value;
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype.destroy = function() {
+ var $form;
+ $form = this.$element.closest("form");
+ if ($form.length) {
+ $form.off("reset.bootstrapSwitch").removeData("bootstrap-switch");
+ }
+ this.$container.children().not(this.$element).remove();
+ this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch");
+ return this.$element;
+ };
+
+ BootstrapSwitch.prototype._width = function() {
+ var $handles, handleWidth;
+ $handles = this.$on.add(this.$off);
+ $handles.add(this.$label).css("width", "");
+ handleWidth = this.options.handleWidth === "auto" ? Math.max(this.$on.width(), this.$off.width()) : this.options.handleWidth;
+ $handles.width(handleWidth);
+ this.$label.width((function(_this) {
+ return function(index, width) {
+ if (_this.options.labelWidth !== "auto") {
+ return _this.options.labelWidth;
+ }
+ if (width < handleWidth) {
+ return handleWidth;
+ } else {
+ return width;
+ }
+ };
+ })(this));
+ this._handleWidth = this.$on.outerWidth();
+ this._labelWidth = this.$label.outerWidth();
+ this.$container.width((this._handleWidth * 2) + this._labelWidth);
+ return this.$wrapper.width(this._handleWidth + this._labelWidth);
+ };
+
+ BootstrapSwitch.prototype._containerPosition = function(state, callback) {
+ if (state == null) {
+ state = this.options.state;
+ }
+ this.$container.css("margin-left", (function(_this) {
+ return function() {
+ var values;
+ values = [0, "-" + _this._handleWidth + "px"];
+ if (_this.options.indeterminate) {
+ return "-" + (_this._handleWidth / 2) + "px";
+ }
+ if (state) {
+ if (_this.options.inverse) {
+ return values[1];
+ } else {
+ return values[0];
+ }
+ } else {
+ if (_this.options.inverse) {
+ return values[0];
+ } else {
+ return values[1];
+ }
+ }
+ };
+ })(this));
+ if (!callback) {
+ return;
+ }
+ return setTimeout(function() {
+ return callback();
+ }, 50);
+ };
+
+ BootstrapSwitch.prototype._init = function() {
+ var init, initInterval;
+ init = (function(_this) {
+ return function() {
+ _this._width();
+ return _this._containerPosition(null, function() {
+ if (_this.options.animate) {
+ return _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+ }
+ });
+ };
+ })(this);
+ if (this.$wrapper.is(":visible")) {
+ return init();
+ }
+ return initInterval = window.setInterval((function(_this) {
+ return function() {
+ if (_this.$wrapper.is(":visible")) {
+ init();
+ return window.clearInterval(initInterval);
+ }
+ };
+ })(this), 50);
+ };
+
+ BootstrapSwitch.prototype._elementHandlers = function() {
+ return this.$element.on({
+ "change.bootstrapSwitch": (function(_this) {
+ return function(e, skip) {
+ var state;
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ state = _this.$element.is(":checked");
+ _this._containerPosition(state);
+ if (state === _this.options.state) {
+ return;
+ }
+ _this.options.state = state;
+ _this.$wrapper.toggleClass("" + _this.options.baseClass + "-off").toggleClass("" + _this.options.baseClass + "-on");
+ if (!skip) {
+ if (_this.$element.is(":radio")) {
+ $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
+ }
+ return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
+ }
+ };
+ })(this),
+ "focus.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ e.preventDefault();
+ return _this.$wrapper.addClass("" + _this.options.baseClass + "-focused");
+ };
+ })(this),
+ "blur.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ e.preventDefault();
+ return _this.$wrapper.removeClass("" + _this.options.baseClass + "-focused");
+ };
+ })(this),
+ "keydown.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ if (!e.which || _this.options.disabled || _this.options.readonly) {
+ return;
+ }
+ switch (e.which) {
+ case 37:
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ return _this.state(false);
+ case 39:
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ return _this.state(true);
+ }
+ };
+ })(this)
+ });
+ };
+
+ BootstrapSwitch.prototype._handleHandlers = function() {
+ this.$on.on("click.bootstrapSwitch", (function(_this) {
+ return function(event) {
+ event.preventDefault();
+ event.stopPropagation();
+ _this.state(false);
+ return _this.$element.trigger("focus.bootstrapSwitch");
+ };
+ })(this));
+ return this.$off.on("click.bootstrapSwitch", (function(_this) {
+ return function(event) {
+ event.preventDefault();
+ event.stopPropagation();
+ _this.state(true);
+ return _this.$element.trigger("focus.bootstrapSwitch");
+ };
+ })(this));
+ };
+
+ BootstrapSwitch.prototype._labelHandlers = function() {
+ return this.$label.on({
+ "mousedown.bootstrapSwitch touchstart.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ if (_this._dragStart || _this.options.disabled || _this.options.readonly) {
+ return;
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ _this._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(_this.$container.css("margin-left"), 10);
+ if (_this.options.animate) {
+ _this.$wrapper.removeClass("" + _this.options.baseClass + "-animate");
+ }
+ return _this.$element.trigger("focus.bootstrapSwitch");
+ };
+ })(this),
+ "mousemove.bootstrapSwitch touchmove.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ var difference;
+ if (_this._dragStart == null) {
+ return;
+ }
+ e.preventDefault();
+ difference = (e.pageX || e.originalEvent.touches[0].pageX) - _this._dragStart;
+ if (difference < -_this._handleWidth || difference > 0) {
+ return;
+ }
+ _this._dragEnd = difference;
+ return _this.$container.css("margin-left", "" + _this._dragEnd + "px");
+ };
+ })(this),
+ "mouseup.bootstrapSwitch touchend.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ var state;
+ if (!_this._dragStart) {
+ return;
+ }
+ e.preventDefault();
+ if (_this.options.animate) {
+ _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+ }
+ if (_this._dragEnd) {
+ state = _this._dragEnd > -(_this._handleWidth / 2);
+ _this._dragEnd = false;
+ _this.state(_this.options.inverse ? !state : state);
+ } else {
+ _this.state(!_this.options.state);
+ }
+ return _this._dragStart = false;
+ };
+ })(this),
+ "mouseleave.bootstrapSwitch": (function(_this) {
+ return function(e) {
+ return _this.$label.trigger("mouseup.bootstrapSwitch");
+ };
+ })(this)
+ });
+ };
+
+ BootstrapSwitch.prototype._externalLabelHandler = function() {
+ var $externalLabel;
+ $externalLabel = this.$element.closest("label");
+ return $externalLabel.on("click", (function(_this) {
+ return function(event) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ if (event.target === $externalLabel[0]) {
+ return _this.toggleState();
+ }
+ };
+ })(this));
+ };
+
+ BootstrapSwitch.prototype._formHandler = function() {
+ var $form;
+ $form = this.$element.closest("form");
+ if ($form.data("bootstrap-switch")) {
+ return;
+ }
+ return $form.on("reset.bootstrapSwitch", function() {
+ return window.setTimeout(function() {
+ return $form.find("input").filter(function() {
+ return $(this).data("bootstrap-switch");
+ }).each(function() {
+ return $(this).bootstrapSwitch("state", this.checked);
+ });
+ }, 1);
+ }).data("bootstrap-switch", true);
+ };
+
+ BootstrapSwitch.prototype._getClasses = function(classes) {
+ var c, cls, _i, _len;
+ if (!$.isArray(classes)) {
+ return ["" + this.options.baseClass + "-" + classes];
+ }
+ cls = [];
+ for (_i = 0, _len = classes.length; _i < _len; _i++) {
+ c = classes[_i];
+ cls.push("" + this.options.baseClass + "-" + c);
+ }
+ return cls;
+ };
+
+ return BootstrapSwitch;
+
+ })();
+ $.fn.bootstrapSwitch = function() {
+ var args, option, ret;
+ option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ ret = this;
+ this.each(function() {
+ var $this, data;
+ $this = $(this);
+ data = $this.data("bootstrap-switch");
+ if (!data) {
+ $this.data("bootstrap-switch", data = new BootstrapSwitch(this, option));
+ }
+ if (typeof option === "string") {
+ return ret = data[option].apply(data, args);
+ }
+ });
+ return ret;
+ };
+ $.fn.bootstrapSwitch.Constructor = BootstrapSwitch;
+ return $.fn.bootstrapSwitch.defaults = {
+ state: true,
+ size: null,
+ animate: true,
+ disabled: false,
+ readonly: false,
+ indeterminate: false,
+ inverse: false,
+ radioAllOff: false,
+ onColor: "primary",
+ offColor: "default",
+ onText: "ON",
+ offText: "OFF",
+ labelText: "&nbsp;",
+ handleWidth: "auto",
+ labelWidth: "auto",
+ baseClass: "bootstrap-switch",
+ wrapperClass: "wrapper",
+ onInit: function() {},
+ onSwitchChange: function() {}
+ };
+ })(window.jQuery, window);
+
+}).call(this);
diff --git a/style/bootstrap-switch.css b/style/bootstrap-switch.css
new file mode 100644
index 00000000..cea4acb8
--- /dev/null
+++ b/style/bootstrap-switch.css
@@ -0,0 +1,196 @@
+/* ========================================================================
+ * bootstrap-switch - v3.3.2
+ * http://www.bootstrap-switch.org
+ * ========================================================================
+ * Copyright 2012-2013 Mattia Larentis
+ *
+ * ========================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================================
+ */
+
+.bootstrap-switch {
+ display: inline-block;
+ direction: ltr;
+ cursor: pointer;
+ border-radius: 4px;
+ border: 1px solid;
+ border-color: #cccccc;
+ position: relative;
+ text-align: left;
+ overflow: hidden;
+ line-height: 8px;
+ z-index: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ vertical-align: middle;
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.bootstrap-switch .bootstrap-switch-container {
+ display: inline-block;
+ top: 0;
+ border-radius: 4px;
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+}
+.bootstrap-switch .bootstrap-switch-handle-on,
+.bootstrap-switch .bootstrap-switch-handle-off,
+.bootstrap-switch .bootstrap-switch-label {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ cursor: pointer;
+ display: inline-block !important;
+ height: 100%;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 20px;
+}
+.bootstrap-switch .bootstrap-switch-handle-on,
+.bootstrap-switch .bootstrap-switch-handle-off {
+ text-align: center;
+ z-index: 1;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
+ color: #fff;
+ background: #428bca;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
+ color: #fff;
+ background: #5bc0de;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
+ color: #fff;
+ background: #5cb85c;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
+ background: #f0ad4e;
+ color: #fff;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
+ color: #fff;
+ background: #d9534f;
+}
+.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
+.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
+ color: #000;
+ background: #eeeeee;
+}
+.bootstrap-switch .bootstrap-switch-label {
+ text-align: center;
+ margin-top: -1px;
+ margin-bottom: -1px;
+ z-index: 100;
+ color: #333333;
+ background: #ffffff;
+}
+.bootstrap-switch .bootstrap-switch-handle-on {
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.bootstrap-switch .bootstrap-switch-handle-off {
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.bootstrap-switch input[type='radio'],
+.bootstrap-switch input[type='checkbox'] {
+ position: absolute !important;
+ top: 0;
+ left: 0;
+ opacity: 0;
+ filter: alpha(opacity=0);
+ z-index: -1;
+}
+.bootstrap-switch input[type='radio'].form-control,
+.bootstrap-switch input[type='checkbox'].form-control {
+ height: auto;
+}
+.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+}
+.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+}
+.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
+ padding: 6px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+}
+.bootstrap-switch.bootstrap-switch-disabled,
+.bootstrap-switch.bootstrap-switch-readonly,
+.bootstrap-switch.bootstrap-switch-indeterminate {
+ cursor: default !important;
+}
+.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
+.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
+.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
+.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
+.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ cursor: default !important;
+}
+.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
+ -webkit-transition: margin-left 0.5s;
+ transition: margin-left 0.5s;
+}
+.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
+.bootstrap-switch.bootstrap-switch-focused {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
+.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
+ border-bottom-right-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
+.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
diff --git a/style/categories.json b/style/categories.json
new file mode 100644
index 00000000..97b76eac
--- /dev/null
+++ b/style/categories.json
@@ -0,0 +1,7 @@
+{
+ "cities":"tower",
+ "content":"th",
+ "settings":"cog",
+ "status":"tasks",
+ "users":"user"
+} \ No newline at end of file
diff --git a/style/default.css b/style/default.css
index ebbe3618..72f82823 100644
--- a/style/default.css
+++ b/style/default.css
@@ -176,6 +176,10 @@ body {
padding: 5px;
}
+.slx-bold {
+ font-weight: bold;
+}
+
.slx-fade {
opacity: 0.5;
}
@@ -241,4 +245,190 @@ input[readonly] {
border-top-right-radius: 0px;
margin: 0px;
padding: 19px;
-} \ No newline at end of file
+}
+
+
+
+/*
+ * Base structure
+ */
+
+
+
+/*
+ * Global add-ons
+ */
+
+.sub-header {
+ padding-bottom: 10px;
+ border-bottom: 1px solid #eee;
+}
+
+/*
+ * Top navigation
+ * Hide default border to remove 1px line.
+ */
+.navbar-fixed-top {
+ border: 0;
+}
+
+/*
+ * Sidebar
+ */
+
+/* Hide for mobile, show later */
+.sidebar {
+ display: none;
+}
+@media (min-width: 768px) {
+ .sidebar {
+ position: fixed;
+ top: 51px;
+ bottom: 0;
+ left: 0;
+ z-index: 1000;
+ display: block;
+ padding: 20px;
+ padding-top: 8px;
+ overflow-x: hidden;
+ overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
+ background-color: #373d47;
+ }
+}
+
+/* Sidebar navigation */
+.nav-sidebar {
+ margin-right: -21px; /* 20px padding + 1px border */
+ margin-left: -20px;
+}
+.nav-sidebar > li > a {
+ padding: 7px;
+ padding-right: 20px;
+ padding-left: 20px;
+ color: #CCCCCC;
+}
+.nav-sidebar > .active > a,
+.nav-sidebar > .active > a:hover,
+.nav-sidebar > .active > a:focus {
+ color: #FFFFFF;
+ background-color: #24272d;
+}
+.nav-sidebar > li > a:hover,
+.nav-sidebar > li > a:focus {
+ background-color: #2C323D;
+}
+
+
+/*
+ *
+ * Dashboard custom
+ *
+ * Main content
+ */
+
+.main {
+ padding: 20px;
+}
+@media (min-width: 768px) {
+ .main {
+ padding-right: 40px;
+ padding-left: 40px;
+ }
+}
+.main .page-header {
+ margin-top: 0;
+}
+
+
+/*
+ * Placeholder dashboard ideas
+ */
+
+.placeholders {
+ margin-bottom: 30px;
+ text-align: center;
+}
+.placeholders h4 {
+ margin-bottom: 0;
+}
+.placeholder {
+ margin-bottom: 20px;
+}
+.placeholder img {
+ display: inline-block;
+ border-radius: 50%;
+}
+
+.dash-header {
+ padding-top: 5px;
+ padding-left: 10px;
+ padding-bottom: 5px;
+ font-size: 17px;
+ margin-right: -21px;
+ margin-left: -20px;
+ color: #FFFFFF;
+}
+
+/*
+ * Sysconfig Module Editor
+ */
+
+.mod-nav{
+ width: 250px;
+ float: left;
+ margin-right: 4px;
+ border-right: solid 1px #DDD;
+ padding: 4px;
+ height: 545px;
+ overflow: auto;
+}
+
+.item {
+ padding: 4px;
+ margin: 3px 0;
+ border-radius: 3px;
+}
+
+.item:HOVER {
+ background-color: #EEE;
+ cursor: pointer;
+}
+
+.item-link {
+ color: #5893C6;
+}
+
+.item-lock {
+ color: #939393;
+}
+
+.dir-icon {
+ color: #2E6DA4;
+}
+
+.folder {
+ padding-left: 16px;
+ display: none;
+ border-left: dashed 1px #CCC;
+}
+
+#editor-header{
+ display: block;
+ float: none;
+ width: 875px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.mod-editor{
+ display: block;
+ float: none;
+ resize: none;
+ width: 875px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+
+textarea.form-control .editor-box{
+ height: 520px;
+}
diff --git a/templates/baseconfig/_page.html b/templates/baseconfig/_page.html
deleted file mode 100644
index 9bea7206..00000000
--- a/templates/baseconfig/_page.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<h1>{{lang_basicConfiguration}}</h1>
-<p>{{lang_clientRelatedConfig}}</p>
-<form action="?do=BaseConfig" method="post">
- <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;">
- <input type="password" name="password_fake" id="password_fake" value="" style="display:none;">
- {{#categories}}
- <div class="panel panel-default">
- <div class="panel-heading">{{category_name}}</div>
- <div class="list-group">
- {{#settings}}
- <div class="list-group-item">
- <div class="row">
- <div class="col-md-5">
- {{setting}}
- <div class="slx-default">{{defaultvalue}}</div>
- </div>
- <div class="col-md-5">
- {{{item}}}
- </div>
- <div class="col-md-2">
- <a class="btn btn-default" data-toggle="modal" data-target="#help-{{setting}}"><span class="glyphicon glyphicon-question-sign"></span></a>
- </div>
- </div>
- </div>
- <div class="modal fade" id="help-{{setting}}" tabindex="-1" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">{{setting}}</div>
- <div class="modal-body">{{{description}}}</div>
- <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
- </div>
- </div>
- </div>
- {{/settings}}
- </div>
- </div>
- {{/categories}}
- <input type="hidden" name="token" value="{{token}}">
- <button class="btn btn-lg btn-primary" type="submit">{{lang_save}}</button>
- <button class="btn btn-lg btn-primary" type="reset">{{lang_reset}}</button>
- <a class="btn btn-lg btn-primary" href="api.php?do=getconfig">Download</a>
-</form>
diff --git a/templates/messagebox-error.html b/templates/messagebox-error.html
deleted file mode 100644
index 63f59a96..00000000
--- a/templates/messagebox-error.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="alert alert-danger">{{{message}}}</div>
diff --git a/templates/messagebox-info.html b/templates/messagebox-info.html
deleted file mode 100644
index 7136298c..00000000
--- a/templates/messagebox-info.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="alert alert-info">{{{message}}}</div>
diff --git a/templates/messagebox-success.html b/templates/messagebox-success.html
deleted file mode 100644
index 3fa263ef..00000000
--- a/templates/messagebox-success.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="alert alert-success">{{{message}}}</div>
diff --git a/templates/messagebox-warning.html b/templates/messagebox-warning.html
deleted file mode 100644
index 48a95b4d..00000000
--- a/templates/messagebox-warning.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="alert alert-warning">{{{message}}}</div>
diff --git a/templates/page-main-guest.html b/templates/page-main-guest.html
deleted file mode 100644
index 8f3051d5..00000000
--- a/templates/page-main-guest.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<div class="jumbotron">
- <h1>{{lang_welcome}}</h1>
- <p>{{lang_introGuest}}</p>
- {{#register}}
- <ul class="list-group">
- <li class="list-group-item list-group-item-info">
- {{lang_noExistingAccount}}
- <a href="?do=AddUser" class="btn btn-primary btn-lg">{{lang_register}} &raquo;</a>
- </li>
- </ul>
- {{/register}}
- <p><a href="?do=Session&amp;action=login" class="btn btn-primary btn-lg">{{lang_login}} &raquo;</a></p>
-</div>
diff --git a/templates/serversetup/ipxe.html b/templates/serversetup/ipxe.html
deleted file mode 100644
index 4539624b..00000000
--- a/templates/serversetup/ipxe.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<form method="post" action="?do=ServerSetup">
- <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="display:none;">
- <input type="password" name="password_fake" id="password_fake" value="" style="display:none;">
- <input type="hidden" name="action" value="ipxe">
- <input type="hidden" name="token" value="{{token}}">
- <div class="panel panel-default">
- <div class="panel-heading">
- {{lang_bootMenu}}
- </div>
- <div class="panel-body">
- <p>
- {{lang_bootInfo}}
- </p>
- <br>
-
- <div class="form-group">
- <strong>{{lang_bootBehavior}}</strong>
- <div><label class="radio-inline"><input type="radio" name="defaultentry" value="net" {{active-net}}> bwLehrpool</label></div>
- <div><label class="radio-inline"><input type="radio" name="defaultentry" value="hdd" {{active-hdd}}> {{lang_localHDD}}</label></div>
- <div><label class="radio-inline"><input type="radio" name="defaultentry" value="custom" {{active-custom}}> {{lang_customEntry}} (&quot;custom&quot;)</label></div>
- </div>
-
- <div class="form-group">
- <strong>{{lang_menuDisplayTime}}</strong>
- <div class="input-group form-narrow">
- <input type="text" class="form-control" name="timeout" value="{{timeout}}" pattern="\d+">
- <span class="input-group-addon">{{lang_seconds}}</span>
- </div>
- </div>
-
- <div class="form-group">
- <strong>{{lang_masterPassword}}</strong>
- <div class="form-narrow">
- <input type="{{password_type}}" class="form-control" name="masterpassword" value="{{masterpasswordclear}}">
- </div>
- <i>{{lang_masterPasswordHelp}}</i>
- </div>
-
- <div class="form-group">
- <strong>{{lang_menuCustom}}</strong> <a class="btn btn-default btn-xs" data-toggle="modal" data-target="#help-custom"><span class="glyphicon glyphicon-question-sign"></span></a>
- <textarea class="form-control" name="custom" rows="8">{{custom}}</textarea>
- </div>
- </div>
-
- <div class="panel-footer">
- <button class="btn btn-primary" name="action" value="ipxe">{{lang_bootMenuCreate}}</button>
- </div>
- </div>
-</form>
-
-<div class="modal fade" id="help-custom" tabindex="-1" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">{{lang_menuCustom}}</div>
- <div class="modal-body">
- {{lang_menuCustomHint1}}
- <br>{{lang_example}}:
- <pre>LABEL custom
- MENU LABEL ^My Boot Entry
- KERNEL http://1.2.3.4/kernel
- INITRD http://1.2.3.4/initramfs-stage31
- APPEND custom=option
- IPAPPEND 3</pre>
- {{lang_menuCustomHint2}} LABEL <strong>custom</strong>
- {{lang_menuCustomHint3}}
- </div>
- <div class="modal-footer"><a class="btn btn-primary" data-dismiss="modal">{{lang_close}}</a></div>
- </div>
- </div>
-</div>
diff --git a/templates/sysconfig/ad_ldap-homedir.html b/templates/sysconfig/ad_ldap-homedir.html
deleted file mode 100644
index c6250175..00000000
--- a/templates/sysconfig/ad_ldap-homedir.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<div class="slx-bold">
- {{lang_homedirHandling}}
-</div>
-<div><i>{{lang_handlingNotes}}</i></div>
-
-<!-- 'shareRemapMode', 'shareRemapCreate', 'shareDocuments', 'shareDownloads', 'shareDesktop', 'shareMedia', 'shareOther' -->
-
-<form method="post" class="form-horizontal" action="?do=SysConfig&amp;action=addmodule&amp;step={{next}}">
- <input type="hidden" name="token" value="{{token}}">
- <input type="hidden" name="edit" value="{{edit}}">
- <input name="title" value="{{title}}" type="hidden">
- <input name="server" value="{{server}}" type="hidden">
- <input name="searchbase" value="{{searchbase}}" type="hidden">
- <input name="binddn" value="{{binddn}}" type="hidden">
- <input name="bindpw" value="{{bindpw}}" type="hidden">
- <input name="home" value="{{home}}" type="hidden">
- <input name="homeattr" value="{{homeattr}}" type="hidden">
- {{#ssl}}
- <input name="ssl" value="on" type="hidden">
- <input type="hidden" name="certificate" value="{{certificate}}">
- {{/ssl}}
- <input name="fingerprint" value="{{fingerprint}}" type="hidden">
-
- <div class="form-group row">
- <label for="inputshareRemapMode" class="control-label col-xs-4">{{lang_shareRemapMode}}</label>
- <div class="col-xs-8">
- <select class="form-control" id="inputshareRemapMode" name="shareRemapMode">
- <option value="0" {{shareRemapMode_0}}>{{lang_mapModeNone}}</option>
- <option value="1" {{shareRemapMode_1}}>{{lang_mapModeNative}}</option>
- <option value="3" {{shareRemapMode_3}}>{{lang_mapModeVmware}}</option>
- <option value="2" {{shareRemapMode_2}}>{{lang_mapModeNativeFallback}}</option>
- </select>
- </div>
- </div>
- <div class="form-group row">
- <label for="inputshareHomeDrive" class="control-label col-xs-4">{{lang_shareHomeDrive}}</label>
- <div class="col-xs-8">
- <select class="form-control" id="inputshareHomeDrive" name="shareHomeDrive">
- {{#drives}}
- <option {{selected}}>{{drive}}</option>
- {{/drives}}
- </select>
- </div>
- </div>
- <hr>
- <div class="slx-bold">{{lang_folderRedirection}}</div>
- <div><i>{{lang_redirectionWarning}}</i></div>
- <div>
- <label class="control-label"><input type="checkbox" name="shareDocuments" {{shareDocuments_c}}> {{lang_shareDocuments}}</label>
- </div>
- <div>
- <label class="control-label"><input type="checkbox" name="shareDownloads" {{shareDownloads_c}}> {{lang_shareDownloads}}</label>
- </div>
- <div>
- <label class="control-label"><input type="checkbox" name="shareDesktop" {{shareDesktop_c}}> {{lang_shareDesktop}}</label>
- </div>
- <div>
- <label class="control-label"><input type="checkbox" name="shareMedia" {{shareMedia_c}}> {{lang_shareMedia}}</label>
- </div>
- <div>
- <label class="control-label"><input type="checkbox" name="shareOther" {{shareOther_c}}> {{lang_shareOther}}</label>
- </div>
- <div class="row">
- <div class="col-xs-2"></div>
- <div class="col-xs-10">
- <label class="control-label"><input type="checkbox" name="shareRemapCreate" {{shareRemapCreate_c}}> {{lang_shareMapCreate}}</label>
- </div>
- </div>
- <!--hr>
- <div class="slx-bold">{{lang_additionalFolders}}</div>
- <div><i>{{lang_addFoldersInfo}}</i></div>
-
- <br>
- <div><i>{{lang_driveLetterNote}}</i></div-->
- <div class="pull-right">
- <button type="submit" class="btn btn-primary">{{lang_next}} &raquo;</button>
- </div>
- <div class="clearfix"></div>
-</form> \ No newline at end of file