Fixed issue #8189: JS error .dialog is not a function in template editor