From f78d46c65420e7b1ea6f22b73ce427902ce2810c Mon Sep 17 00:00:00 2001 From: canyonknight Date: Wed, 23 May 2012 13:53:33 -0400 Subject: acctfuncs.inc.php: Move XHTML to account_edit_form.php template XHTML should be eliminated from lib/ as much as possible. This pulls the XHTML out of a function that simply echoes the code, and moves it into a more reasonable template file in account_edit_form.php Signed-off-by: canyonknight Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 124 +-------------------------------- web/template/account_edit_form.php | 138 +++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 123 deletions(-) create mode 100644 web/template/account_edit_form.php diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index da10f320..034bc480 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -46,129 +46,7 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", global $SUPPORTED_LANGS; - print "
\n"; - print "
"; - print "\n"; - if ($UID) { - print "\n"; - } - print "
"; - print "\n"; - print "\n"; - - print ""; - print ""; - print ""; - print "\n"; - - # Only TUs or Devs can promote/demote/suspend a user - if ($UTYPE == "Trusted User" || $UTYPE == "Developer") { - print ""; - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print "\n"; - } - - print ""; - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print ""; - print "\n"; - - print ""; - print ""; - print ""; - print "\n"; - - print "\n"; - print ""; - print ""; - print ""; - print "\n"; - - print "
 
".__("Username").": (".__("required").")
".__("Account Type").":
".__("Account Suspended").":"; - } else { - print " />"; - } - print "
".__("Email Address").": (".__("required").")
".__("Password").":"; - if ($A != "UpdateAccount") { - print " (".__("required").")"; - } - print "
".__("Re-type password").":"; - if ($A != "UpdateAccount") { - print " (".__("required").")"; - } - print "
".__("Real Name").":
".__("IRC Nick").":
".__("PGP Key Fingerprint").":
".__("Language").":
 
 "; - - if ($A == "UpdateAccount") { - print "   "; - } else { - print "   "; - } - print ""; - print "
\n"; - print "
\n"; + include("account_edit_form.php"); return; } # function display_account_form() diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php new file mode 100644 index 00000000..32379a70 --- /dev/null +++ b/web/template/account_edit_form.php @@ -0,0 +1,138 @@ +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
: ()
: + +
: + + + +
: ()
: + + +
: + + +
: + +
: + +
: + +
: + +
 
  + + " />   + + " />   + + " /> +
+
-- cgit v1.2.3-24-g4f1b