templates: Replace templates.render with require calls.

This removes an unnecessary layer of indirection and allows webpack to
catch filename mistakes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-07-09 12:24:00 -07:00
committed by Tim Abbott
parent 706f13b671
commit db0b33842c
56 changed files with 340 additions and 207 deletions

View File

@@ -1,3 +1,5 @@
var render_admin_tab = require('../templates/admin_tab.hbs');
var admin = (function () {
var exports = {};
@@ -86,7 +88,7 @@ exports.build_page = function () {
options.realm_night_logo_url = options.realm_logo_url;
}
var rendered_admin_tab = templates.render('admin_tab', options);
var rendered_admin_tab = render_admin_tab(options);
$("#settings_content .organization-box").html(rendered_admin_tab);
$("#settings_content .alert").removeClass("show");