View Issue Details

IDProjectCategoryView StatusLast Update
0005679mantisbtcustom fieldspublic2008-07-24 16:50
Reporterpolzin Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.0a2 
Summary0005679: Make long string custom fields use textarea instead of input
Description

For long string custom field "textarea" is more appropriate than "input".
I try to attach a patch.

TagsNo tags attached.

Relationships

duplicate of 0006626 closeddaryn Support "Memo" custom field type 

Activities

2005-05-31 07:29

 

custom_field_api.patch (1,253 bytes)   
Index: custom_field_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/custom_field_api.php,v
retrieving revision 1.52
diff -u -r1.52 custom_field_api.php
--- custom_field_api.php	24 May 2005 18:04:28 -0000	1.52
+++ custom_field_api.php	31 May 2005 11:28:15 -0000
@@ -6,7 +6,7 @@
 	# See the README and LICENSE files for details
 
 	# --------------------------------------------------------
-	# $Id$
+	# $Id: custom_field_api.php,v 1.8 2005/05/31 11:21:41 tobias Exp $
 	# --------------------------------------------------------
 
 	$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
@@ -1193,6 +1193,15 @@
 		case CUSTOM_FIELD_TYPE_FLOAT:
 		case CUSTOM_FIELD_TYPE_EMAIL:
 		case CUSTOM_FIELD_TYPE_STRING:
+			if ( $p_field_def['length_max'] > 100 ) {				 
+				echo '<textarea cols="80" rows="' . 
+					( 1 + ( $p_field_def['length_max'] - 40 ) / 80 ) .
+					'" name="custom_field_' . $t_id . '" wrap="virtual">';
+				echo $t_custom_field_value;
+				echo '</textarea>';
+				break;
+			}
+			  
 			echo '<input type="text" name="custom_field_' . $t_id . '" size="80"';
 			if( 0 < $p_field_def['length_max'] ) {
 				echo ' maxlength="' . $p_field_def['length_max'] . '"';
custom_field_api.patch (1,253 bytes)   
gwagenknecht

gwagenknecht

2005-08-25 09:57

reporter   ~0011289

dup of 0004705

Issue History

Date Modified Username Field Change
2005-05-31 07:29 polzin New Issue
2005-05-31 07:29 polzin File Added: custom_field_api.patch
2005-08-25 09:57 gwagenknecht Note Added: 0011289
2008-07-15 04:32 vboctor Relationship added duplicate of 0006626
2008-07-15 04:32 vboctor Status @0@ => resolved
2008-07-15 04:32 vboctor Resolution @0@ => duplicate
2008-07-15 04:32 vboctor Assigned To => vboctor
2008-07-24 16:50 vboctor Status @0@ => closed