Refs #8267 - pass template_url in call to foreman

Also passes the ?static parameter on correctly.

@witlessbird @dustints could you comment and/or test?

See also: https://github.com/theforeman/foreman/pull/1902