Skip to content

Commit

Permalink
Fix to make target link configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Mar 4, 2025
1 parent a10e597 commit 5a064e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pro-tip-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ sub alert_pro_tip
$alert_body1 = "<b>$alert_body1</b>";
$alert_body2 = "<b>$alert_body2</b>";
}
my $target_link = $virtualmin_shop_link_cat;
$target_link = $opts->{'target_link'} if ($opts->{'target_link'});
my $form = $ptitle .
&ui_form_start("@{[&get_webprefix_safe()]}/$module_name/set_seen_pro_tip.cgi", "post") .
$alert_body1 .
Expand All @@ -164,7 +166,7 @@ sub alert_pro_tip
($return_url ? &ui_hidden("return_url", $return_url) : "") .
&ui_form_end([
$hide_button_text2 ? [ undef, $hide_button_text2, undef, undef,
"onclick=\"window.open('$virtualmin_shop_link_cat','_blank');event.preventDefault();event.stopPropagation();\"",
"onclick=\"window.open('$target_link','_blank');event.preventDefault();event.stopPropagation();\"",
$hide_button_icon2, $btncls ] : undef,
$hide_button_text3 ? [ 'remind', $hide_button_text3, undef, undef, undef, $hide_button_icon3 ] : undef,
$hide_button_text ? [ undef, $hide_button_text, undef, undef, undef, $hide_button_icon ] : undef ], undef, 1);
Expand Down

0 comments on commit 5a064e8

Please sign in to comment.