Created
November 24, 2011 13:42
-
-
Save freewind/1391377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ebb | |
package snippet | |
import net.liftweb.http._ | |
import net.liftweb.util._ | |
import org.squeryl._ | |
import PrimitiveTypeMode._ | |
import net.liftweb.util.Helpers._ | |
import java.util._ | |
import java.text._ | |
class InstallSnippet { | |
private object db_type extends RequestVar("db_type") | |
private object db_server extends RequestVar("db_server") | |
private object db_username extends RequestVar("db_username") | |
private object db_passwd extends RequestVar("db_passwd") | |
private object db_dbname extends RequestVar("db_dbname") | |
private object db_prefix extends RequestVar("db_prefix") | |
private object admin_username extends RequestVar("admin_username") | |
private object admin_email extends RequestVar("admin_email") | |
private object admin_passwd1 extends RequestVar("admin_passwd1") | |
private object admin_passwd2 extends RequestVar("admin_passwd2") | |
def render: CssSel = { | |
"@db_type" #> SHtml.text(db_type.is, (s) => db_type(s)) & | |
"@db_server" #> SHtml.text(db_server.is, (s) => db_type(s)) & | |
":submit" #> SHtml.submit("Install", process _) | |
} | |
def process { | |
if (db_type.is == "ok") { | |
// process | |
S.redirectTo("/installSuccess") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment