[evolvis-commits] r17423: there’s no need for using an ID, name is enough and may not be unique

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Jul 14 18:24:15 CEST 2011


Author: mirabilos
Date: 2011-07-14 18:24:15 +0200 (Thu, 14 Jul 2011)
New Revision: 17423

Modified:
   trunk/gforge_base/evolvisforge/gforge/common/include/datepick.php
Log:
there’s no need for using an ID, name is enough and may not be unique


Modified: trunk/gforge_base/evolvisforge/gforge/common/include/datepick.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/include/datepick.php	2011-07-14 15:31:12 UTC (rev 17422)
+++ trunk/gforge_base/evolvisforge/gforge/common/include/datepick.php	2011-07-14 16:24:15 UTC (rev 17423)
@@ -24,9 +24,9 @@
  * API documentation:
  *
  * datepick_prepare(); // before emitting the Theme header
- * datepick_emit('fieldid'[, 'value', usetime?, 'type', attrs()]);
+ * datepick_emit('fieldname'[, 'value', usetime?, 'type', attrs()]);
  * // type: default (prefs), locdef (locale), or a specific one
- * $timet = datepick_parse(getStringFromRequest('fieldid'));
+ * $timet = datepick_parse(getStringFromRequest('fieldname'));
  * $value = datepick_format($timet[, usetime?, 'type']);
  * // these two convert back and forth between time_t and string
  */
@@ -79,7 +79,7 @@
 $datepick_used = array();
 
 /* emit a datepick input field */
-function datepick_emit($fieldid, $fieldvalue='', $usetime=false,
+function datepick_emit($fieldname, $fieldvalue='', $usetime=false,
     $type='default', $attrs=array()) {
 	/* 'default' locale: look at user prefs, fallback to 'locdef' */
 	/* 'locdef' locale: look at gettext, fallback to 'american' */
@@ -88,7 +88,7 @@
 	$attrs['class'] = trim(util_ifsetor($attrs['class'], "") . ' ' .
 	    ($usetime ? 'datetime_' : 'date_') . $type);
 
-	echo '<input type="text" id="' . $fieldid . '" name="' . $fieldid .
+	echo '<input type="text" name="' . $fieldname .
 	    '" value="' . $fieldvalue . '" ';
 	foreach ($attrs as $k => $v) {
 		echo $k . '="' . $v . '" ';



More information about the evolvis-commits mailing list