Gossamer Forum
Home : Products : Links 2.0 : Customization :

Category (Can not left blank) and Password Mod

Quote Reply
Category (Can not left blank) and Password Mod
Hi all,

I have some problem, then user modify his own resourse. Password Mod from Phoenix has installed.

The problem is:
Then user wants to modify his own resource he has got error - Category (Can not left blank).
In modify.html Category is shown and Password Mods works well.

This is my Code in site_html_templates.pl
...........
sub site_html_modify_form {
# --------------------------------------------------------
# This routine determines how the modify form page will look like.

my %rec = @_;
my $category = &build_select_field ("Category", "$rec{'Category'}");


# Show_Language MOD. Denis Campbell 2000 -------------

if ($rec{'Language'} =~/russian/i) { $rchecked = qq| checked |; }

if ($rec{'Language'} =~/deutsch/i) { $dchecked = qq| checked |; }

if ($rec{'Language'} =~/english/i) { $echecked = qq| checked |; }

#End Show_Language MOD ----------------------------------

&html_print_headers;
print &load_template ('modify.html', {
category => $category,
Language => $language,
rchecked => $rchecked,
dchecked => $dchecked,
echecked => $echecked,
%rec,
%globals
});
}

sub site_html_modify_first {
#---------------------------------------------------------
# displays the form for users to enter the ID number and
# Password for the Link they wish to modify

&html_print_headers;
print &load_template ('modify_first.html', {
%globals
});
}

sub site_html_modify_success {
# --------------------------------------------------------
# This routine determines how the modify success page will look like.

&html_print_headers;
print &load_template ('modify_success.html', {
%in,
Language => $language,
%globals
});
}

sub site_html_modify_failure {
# --------------------------------------------------------
# This routine determines how the modify failure page will look like.

my $errormsg = shift;
$in{'Category'} = &build_select_field ("Category", $in{'Category'});
# Show_Language MOD. Denis Campbell 2000 -------------
if ($in{'Language'} =~/russian/i) { $rchecked = qq| checked |; }

if ($in{'Language'} =~/deutsch/i) { $dchecked = qq| checked |; }

if ($in{'Language'} =~/english/i) { $echecked = qq| checked |; }

#End Show_Language MOD ----------------------------------

&html_print_headers;
print &load_template ('modify_error.html', {
error => $errormsg,
category => $category,
Language => $language,
rchecked => $rchecked,
dchecked => $dchecked,
echecked => $echecked,
%in,
%globals
});
}


Has anybody the solution?

Thanks in advance

Quote Reply
Re: Category (Can not left blank) and Password Mod In reply to
You are using the wrong case setting for Category.

Look at the following codes you've posted:

Code:

category => $category,


Now, look at your error message:

Code:

Category (Can not left blank)


You need to EITHER of the following steps:

1) Change <%Category%> in your template files to <%category%> OR

2) Change category => $category, to Category => $category.

Regards,

Eliot Lee


Quote Reply
Re: Category (Can not left blank) and Password Mod In reply to
Glad to see, that you are helping people again, Eliot.

Thank you and shame on me. I missed that simple change.
Shame, shame, shame.....
I thougt about this, but changed the Code the wrong way.

Thank you Eliot, you are the great as always.

Ankom