bsw/jbe@5: local warning_text = _"Some JavaScript based functions (voting in particular) will not work.\nFor this beta, please use a current version of Firefox, Safari, Opera(?), Konqueror or another (more) standard compliant browser.\nAlternative access without JavaScript will be available soon." bsw/jbe@5: bsw/jbe@5: ui.script{ static = "js/browser_warning.js" } bsw/jbe@5: ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" } bsw/jbe@5: bsw/jbe@5: ui.tag{ bsw/jbe@5: tag = "noscript", bsw/jbe@5: content = function() bsw/jbe@5: slot.put(_"JavaScript is disabled or not available." .. " " .. encode.html_newlines(warning_text)) bsw/jbe@5: end bsw/jbe@5: } bsw/jbe@5: bsw/jbe@0: slot.put_into("title", encode.html(config.app_title)) bsw/jbe@0: bsw/jbe@0: ui.tag{ bsw/jbe@0: tag = 'p', bsw@3: content = _'You need to be logged in, to use this system.' bsw/jbe@0: } bsw/jbe@0: bsw/jbe@0: ui.form{ bsw/jbe@0: attr = { class = "login" }, bsw/jbe@0: module = 'index', bsw/jbe@0: action = 'login', bsw/jbe@0: routing = { bsw/jbe@0: ok = { bsw/jbe@0: mode = 'redirect', bsw/jbe@0: module = 'index', bsw/jbe@0: view = 'index' bsw/jbe@0: }, bsw/jbe@0: error = { bsw/jbe@0: mode = 'forward', bsw/jbe@0: module = 'index', bsw/jbe@0: view = 'login', bsw/jbe@0: } bsw/jbe@0: }, bsw/jbe@0: content = function() bsw/jbe@0: ui.field.text{ bsw/jbe@0: attr = { id = "username_field" }, bsw/jbe@5: label = _'login name', bsw/jbe@0: html_name = 'login', bsw/jbe@0: value = '' bsw/jbe@0: } bsw/jbe@0: ui.script{ script = 'document.getElementById("username_field").focus();' } bsw/jbe@0: ui.field.password{ bsw/jbe@0: label = _'Password', bsw/jbe@0: html_name = 'password', bsw/jbe@0: value = '' bsw/jbe@0: } bsw/jbe@0: ui.submit{ bsw/jbe@0: text = _'Login' bsw/jbe@0: } bsw/jbe@0: end bsw/jbe@0: }