Thanks for your suggestions, but i've got no idea how to modify those subroutines to work :(
I've just done this hack which is working, but obviously it isn't using the Link def file - which would be nicer as the menu selection list would then be automatically updated when the database (and def file) is added to.
If anyone has time could they post how to do this the correct way? Getting the info from the Links def file?
Thanks.
sub site_html_add_failure {
# --------------------------------------------------------
# This routine determines how the add failure page will look like.
#
my ($tags, $dynamic) = @_;
my $template = defined $dynamic ? $dynamic->param('t') : undef;
(ref $tags eq 'HASH') or croak "HTML_TEMPLATES: Argument '$tags' must be hash reference";
my %LIST = (
'' => 'Select One...',
'Business' => 'Business',
'Non-profit' => 'Non-profit',
'Personal' => 'Personal',
'Club/Org' => 'Club/Org',
'Government' => 'Government'
);
my ($linktypelist, $key, $output);
$output = "<SELECT NAME='Link_Type'>";
while (my ($key, $value) = each %LIST) {
if ($tags->{'Link_Type'} eq "$key"){ $output .="<option value='$key' SELECTED>$LIST{$key}\n";}
else { $output .="<option value='$key'>$LIST{$key}\n";}
}
$output .= "</select>";
defined $dynamic and &load_user ($dynamic, $tags);
my $output = &load_template ('add_error.html', {
Link_Type_List => $output,
%$tags,
%GLOBALS
}, undef, $template);
defined $dynamic and &clean_output($dynamic, \$output);
print $output;
}
I've just done this hack which is working, but obviously it isn't using the Link def file - which would be nicer as the menu selection list would then be automatically updated when the database (and def file) is added to.
If anyone has time could they post how to do this the correct way? Getting the info from the Links def file?
Thanks.
sub site_html_add_failure {
# --------------------------------------------------------
# This routine determines how the add failure page will look like.
#
my ($tags, $dynamic) = @_;
my $template = defined $dynamic ? $dynamic->param('t') : undef;
(ref $tags eq 'HASH') or croak "HTML_TEMPLATES: Argument '$tags' must be hash reference";
my %LIST = (
'' => 'Select One...',
'Business' => 'Business',
'Non-profit' => 'Non-profit',
'Personal' => 'Personal',
'Club/Org' => 'Club/Org',
'Government' => 'Government'
);
my ($linktypelist, $key, $output);
$output = "<SELECT NAME='Link_Type'>";
while (my ($key, $value) = each %LIST) {
if ($tags->{'Link_Type'} eq "$key"){ $output .="<option value='$key' SELECTED>$LIST{$key}\n";}
else { $output .="<option value='$key'>$LIST{$key}\n";}
}
$output .= "</select>";
defined $dynamic and &load_user ($dynamic, $tags);
my $output = &load_template ('add_error.html', {
Link_Type_List => $output,
%$tags,
%GLOBALS
}, undef, $template);
defined $dynamic and &clean_output($dynamic, \$output);
print $output;
}