View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005679 | mantisbt | custom fields | public | 2005-05-31 07:29 | 2008-07-24 16:50 |
Reporter | polzin | Assigned To | vboctor | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 1.0.0a2 | ||||
Summary | 0005679: Make long string custom fields use textarea instead of input | ||||
Description | For long string custom field "textarea" is more appropriate than "input". | ||||
Tags | No tags attached. | ||||
Attached Files | 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'] . '"'; | ||||