From 10ff256e1bfb6cb6c674fa7977fa99896c098756 Mon Sep 17 00:00:00 2001 From: kink Date: Wed, 31 Mar 2004 11:46:28 +0000 Subject: [PATCH] Add form functions for password, submit and reset. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6978 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/forms.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/functions/forms.php b/functions/forms.php index 850d58b8..bf540d1d 100644 --- a/functions/forms.php +++ b/functions/forms.php @@ -16,12 +16,20 @@ * Helper function to create form fields, not to be called directly, * only by other functions below. */ -function addInputField($type, $name, $value, $attributes = '') { - return '\n"; } +/** + * Password input field + */ +function addPwField($name) { + return addInputField('password', $name); +} + /** * Form checkbox @@ -93,6 +101,20 @@ function addSelect($name, $values, $default = null, $usekeys = false) return $ret; } +/** + * Form submission button + * Note the switched value/name parameters! + */ +function addSubmit($value, $name = null) { + return addInputField('submit', $name, $value); +} +/** + * Form reset button, $value = caption + */ +function addReset($value) { + return addInputField('reset', null, $value); +} + /** * Textarea form element. */ -- 2.25.1