liquid_feedback_frontend
changeset 369:5a0d5369b21d
Login at startpage when no public_access
author | bsw |
---|---|
date | Thu Mar 01 12:25:46 2012 +0100 (2012-03-01) |
parents | da65510b5d05 |
children | d89ca4142dc5 |
files | app/main/index/index.lua app/main/index/login.lua locale/translations.de.lua |
line diff
1.1 --- a/app/main/index/index.lua Thu Mar 01 12:22:41 2012 +0100 1.2 +++ b/app/main/index/index.lua Thu Mar 01 12:25:46 2012 +0100 1.3 @@ -73,5 +73,41 @@ 1.4 1.5 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." } 1.6 1.7 + ui.form{ 1.8 + attr = { class = "login" }, 1.9 + module = 'index', 1.10 + action = 'login', 1.11 + routing = { 1.12 + ok = { 1.13 + mode = 'redirect', 1.14 + module = param.get("redirect_module") or "index", 1.15 + view = param.get("redirect_view") or "index", 1.16 + id = param.get("redirect_id"), 1.17 + }, 1.18 + error = { 1.19 + mode = 'forward', 1.20 + module = 'index', 1.21 + view = 'login', 1.22 + } 1.23 + }, 1.24 + content = function() 1.25 + ui.field.text{ 1.26 + attr = { id = "username_field" }, 1.27 + label = _'login name', 1.28 + html_name = 'login', 1.29 + value = '' 1.30 + } 1.31 + ui.script{ script = 'document.getElementById("username_field").focus();' } 1.32 + ui.field.password{ 1.33 + label = _'Password', 1.34 + html_name = 'password', 1.35 + value = '' 1.36 + } 1.37 + ui.submit{ 1.38 + text = _'Login' 1.39 + } 1.40 + end 1.41 +} 1.42 + 1.43 end 1.44
2.1 --- a/app/main/index/login.lua Thu Mar 01 12:22:41 2012 +0100 2.2 +++ b/app/main/index/login.lua Thu Mar 01 12:25:46 2012 +0100 2.3 @@ -54,10 +54,14 @@ 2.4 } 2.5 end 2.6 2.7 -ui.tag{ 2.8 - tag = 'p', 2.9 - content = _'You need to be logged in, to use all features of this system.' 2.10 -} 2.11 +if config.public_access then 2.12 + ui.tag{ 2.13 + tag = 'p', 2.14 + content = _'You need to be logged in, to use all features of this system.' 2.15 + } 2.16 +else 2.17 + ui.tag{ tag = "p", content = _"Closed user group, please login to participate." } 2.18 +end 2.19 2.20 ui.form{ 2.21 attr = { class = "login" },
3.1 --- a/locale/translations.de.lua Thu Mar 01 12:22:41 2012 +0100 3.2 +++ b/locale/translations.de.lua Thu Mar 01 12:25:46 2012 +0100 3.3 @@ -110,7 +110,7 @@ 3.4 ["Choose member"] = "Mitglied auswählen"; 3.5 ["Click for details"] = "Klicke für Details"; 3.6 ["Closed"] = "geschlossen"; 3.7 -["Closed user group, please login to participate."] = "Geschlossene Benutzergruppe, bitte melde dich an, um teilzunehmen."; 3.8 +["Closed user group, please login to participate."] = "Geschlossene Benutzergruppe: Bitte melde dich an um teilzunehmen."; 3.9 ["Collective opinion of supporters"] = "Meinungsbild der Unterstützer"; 3.10 ["Commit suggestion"] = "Anregung speichern"; 3.11 ["Compare"] = "Vergleichen";