From: Michal Vaner Date: Sun, 31 Aug 2008 18:50:33 +0000 (+0200) Subject: ID textbox is limited by ID type X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d1db063d5f74737ed6b7197078c67533a5bf88a5;p=pciids.git ID textbox is limited by ID type The maxlen property of ID textbox in add item page is set by the type of the expected ID. --- diff --git a/PciIds/Html/Changes.pm b/PciIds/Html/Changes.pm index 5747354..7154b01 100644 --- a/PciIds/Html/Changes.pm +++ b/PciIds/Html/Changes.pm @@ -18,7 +18,7 @@ sub genNewItemForm( $$$$$$ ) { genCustomHead( $req, $args, $address, "$prettyAddr - add new item", [ $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); print "
$error
\n" if( defined $error ); print "
hostname().$req->uri().buildExcept( 'action', $args ).'?action=newitem' : '' )."'>\n"; - genFormEx( [ [ 'input', 'Id:', 'text', 'id', 'maxlength="50"' ], + genFormEx( [ [ 'input', 'Id:', 'text', 'id', 'maxlength="'.$address->subIdSize().'"' ], [ 'input', 'Name:', 'text', 'name', 'maxlength="200"' ], [ 'input', 'Note*:', 'text', 'note', 'maxlength="1024"' ], [ 'textarea', 'Discussion*:', undef, 'discussion', 'rows="5" cols="50"' ],