Fix initial title with forms templates

pull/1/head
yflory 3 years ago
parent 212b3d4884
commit a93a9f14d3

@ -23,6 +23,12 @@ define([
var $title; var $title;
exp.setToolbar = function (toolbar) { exp.setToolbar = function (toolbar) {
$title = toolbar && (toolbar.title || toolbar.pageTitle); $title = toolbar && (toolbar.title || toolbar.pageTitle);
if ($title && exp.defaultTitle) {
var md = metadataMgr.getMetadata();
$title.find('input').prop('placeholder', md.defaultTitle);
$title.find('span.cp-toolbar-title-value').text(md.title || md.defaultTitle);
$title.find('input').val(md.title || md.defaultTitle);
}
}; };
exp.getTitle = function () { return exp.title; }; exp.getTitle = function () { return exp.title; };

Loading…
Cancel
Save