Call load_template from the template engine
This commit is contained in:
parent
c76c471caf
commit
46facc9987
@ -194,27 +194,27 @@ sub message_box {
|
|||||||
# Build the list of buttons...
|
# Build the list of buttons...
|
||||||
my $buttonlist = "";
|
my $buttonlist = "";
|
||||||
foreach my $button (@{$args -> {"buttons"}}) {
|
foreach my $button (@{$args -> {"buttons"}}) {
|
||||||
$buttonlist .= $self -> load_template("messagebox/button.tem",
|
$buttonlist .= $self -> {"template"} -> load_template("messagebox/button.tem",
|
||||||
{ "%(colour)s" => $button -> {"colour"},
|
{ "%(colour)s" => $button -> {"colour"},
|
||||||
"%(href)s" => $button -> {"href"},
|
"%(href)s" => $button -> {"href"},
|
||||||
"%(message)s" => $button -> {"message"}
|
"%(message)s" => $button -> {"message"}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Shove into the bar
|
# Shove into the bar
|
||||||
$buttonbar = $self -> load_template("messagebox/buttonbar.tem",
|
$buttonbar = $self -> {"template"} -> load_template("messagebox/buttonbar.tem",
|
||||||
{ "%(buttons)s" => $buttonlist });
|
{ "%(buttons)s" => $buttonlist });
|
||||||
}
|
}
|
||||||
|
|
||||||
return $self -> load_template("messagebox/box.tem",
|
return $self -> {"template"} -> load_template("messagebox/box.tem",
|
||||||
{ "%(title)s" => $args -> {"title"},
|
{ "%(title)s" => $args -> {"title"},
|
||||||
"%(icon)s" => $args -> {"type"},
|
"%(icon)s" => $args -> {"type"} // "important",
|
||||||
"%(summary)s" => $args -> {"summary"},
|
"%(summary)s" => $args -> {"summary"},
|
||||||
"%(longdesc)s" => $args -> {"message"},
|
"%(message)s" => $args -> {"message"},
|
||||||
"%(additional)s" => $args -> {"additional"},
|
"%(additional)s" => $args -> {"additional"},
|
||||||
"%(buttons)s" => $args -> {"buttonbar"},
|
"%(class)s" => $args -> {"class"},
|
||||||
"%(class)s" => $args -> {"class"},
|
"%(buttons)s" => $buttonbar,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user