\n"; $i = 0; @table = ( ); @hiddens = ( ); foreach $c (@cats, { }, { }) { push(@table, [ &ui_textbox("desc_$i", $c->{'desc'}, 50, 0, undef, "style='width:100%'") ]); push(@hiddens, [ "id_$i", $c->{'id'} ]); $i++; } print &ui_form_columns_table( "save_linkcats.cgi", [ [ undef, $text{'save'} ] ], 0, undef, \@hiddens, [ $text{'newlinks_catname'} ], undef, \@table, undef, 1); if ($in{'refresh'}) { # Update left frame after changing custom links if (defined(&theme_post_save_domain)) { &theme_post_save_domain($d, 'modify'); } } &ui_print_footer("", $text{'index_return'}); sub shorten_category { local ($desc, $max) = @_; $max ||= 12; if (length($desc) > $max) { return substr($desc, 0, $max-2)."..."; } return $desc; }