mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-27 14:54:34 +02:00
* Better form submit format
* Allow comments in menu.json
This commit is contained in:
parent
d1b0663b5d
commit
4c4b0de54c
7 changed files with 118 additions and 80 deletions
|
@ -71,9 +71,15 @@ MatrixModule.prototype.mciReady = function(mciMap) {
|
|||
vc.on('submit', function onSubmit(form) {
|
||||
console.log(form);
|
||||
|
||||
if(0 === form.id && 1 === form.viewId) {
|
||||
// :TODO: fix me. Need to finalize form data. Current is kinda... meh.
|
||||
self.client.gotoMenuModule('goodbye');
|
||||
var viewModuleMap = {
|
||||
'0' : 'login',
|
||||
'1' : 'new',
|
||||
'2' : 'logoff',
|
||||
};
|
||||
|
||||
if(0 === form.id && 1 === form.submitId) {
|
||||
console.log(viewModuleMap[form.values[1]]);
|
||||
self.client.gotoMenuModule(viewModuleMap[form.values[1]]);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue