aboutsummaryrefslogtreecommitdiff
path: root/scripts/forms.php
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2019-03-16 12:21:48 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2019-03-16 12:21:48 +0000
commit0d0724cee8dcf713f9ebcfe4d4d30db5f9b7a8fc (patch)
tree4f6193e69c2515ccf671830b0388d1a79dfefd20 /scripts/forms.php
parentb1c64dee7d66c85bfc314d024a44ad8a57d9ac55 (diff)
downloadpmwiki.svn-0d0724cee8dcf713f9ebcfe4d4d30db5f9b7a8fc.tar.bz2
Add input "tel" type. Fix classnames of new input types.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@3444 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'scripts/forms.php')
-rw-r--r--scripts/forms.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/forms.php b/scripts/forms.php
index ec2893d9..ebf358ad 100644
--- a/scripts/forms.php
+++ b/scripts/forms.php
@@ -1,5 +1,5 @@
<?php if (!defined('PmWiki')) exit();
-/* Copyright 2005-2018 Patrick R. Michaud (pmichaud@pobox.com)
+/* Copyright 2005-2019 Patrick R. Michaud (pmichaud@pobox.com)
This file is part of PmWiki; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License, or
@@ -17,12 +17,14 @@ SDV($InputAttrs, array('name', 'value', 'id', 'class', 'rows', 'cols',
# Set up formatting for text, submit, hidden, radio, etc. types
foreach(array('text', 'submit', 'hidden', 'password', 'reset', 'file',
- 'image', 'email', 'url', 'number', 'search', 'date', 'button') as $t)
+ 'image', 'email', 'url', 'tel', 'number', 'search', 'date', 'button') as $t)
SDV($InputTags[$t][':html'], "<input type='$t' \$InputFormArgs />");
-SDV($InputTags['text']['class'], 'inputbox');
-SDV($InputTags['password']['class'], 'inputbox');
-SDV($InputTags['submit']['class'], 'inputbutton');
-SDV($InputTags['reset']['class'], 'inputbutton');
+
+foreach(array('text', 'email', 'url', 'tel', 'number', 'search', 'date') as $t)
+ SDV($InputTags[$t]['class'], "inputbox");
+
+foreach(array('submit', 'button', 'reset') as $t)
+ SDV($InputTags[$t]['class'], "inputbutton");
foreach(array('radio', 'checkbox') as $t)
SDVA($InputTags[$t], array(