From 34d322e0c0e7f76cf32fd36c3bc90a3fecb75c79 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Tue, 26 Nov 2024 21:14:32 -0500 Subject: [PATCH] cleanup form --- docs/login.php | 26 +++++--------------------- docs/register.php | 33 +++++++-------------------------- libs/form.php | 27 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 47 deletions(-) create mode 100644 libs/form.php diff --git a/docs/login.php b/docs/login.php index 32e8882..3fbd63e 100644 --- a/docs/login.php +++ b/docs/login.php @@ -1,5 +1,6 @@ + form("Log in", $form_message, array( + array('key' => 'Username', 'type' => 'text', 'name' => 'user', 'default' => ''), + array('key' => 'Password', 'type' => 'password', 'name' => 'pass', 'default' => '') + )); -
-

- Join -

- - - - - Username - - - - Password - - - -
- - \ No newline at end of file diff --git a/docs/register.php b/docs/register.php index 60e2e90..1268edd 100644 --- a/docs/register.php +++ b/docs/register.php @@ -1,5 +1,6 @@ 'Username', 'type' => 'text', 'name' => 'user', 'default' => ''), + array('key' => 'Password', 'type' => 'password', 'name' => 'pass', 'default' => ''), + array('key' => 'Password (again)', 'type' => 'password', 'name' => 'pass2', 'default' => '') + )); - // TODO: form builder. this is lazy for testing purposes -?> - -
-

- Join -

- - - - - Username - - - - Password - - - - Password (again) - - - -
- - \ No newline at end of file diff --git a/libs/form.php b/libs/form.php new file mode 100644 index 0000000..610ce0c --- /dev/null +++ b/libs/form.php @@ -0,0 +1,27 @@ + +
+

+ +

+ + + + + + + + + < + class='form-input' + type="" + name="" + value="" + > + + +
+ \ No newline at end of file