From: irgendsontyp Date: Sat, 16 Jun 2018 15:57:37 +0000 (+0200) Subject: Fix cloning an entry in UIs where you select a type and save the clone manually X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28d97e3fabe288515335b7ff73b75cbce9ed3c37;p=thirdparty%2Ftvheadend.git Fix cloning an entry in UIs where you select a type and save the clone manually --- diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 2d7a2e9a9..673a18b50 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -1373,12 +1373,15 @@ tvheadend.idnode_create = function(conf, onlyDefault, cloneValues) var r = store.getAt(s.selectedIndex); if (r) { var d = r.json.props; + if (d) { d = tvheadend.idnode_filter_fields(d, conf.select.list || null); pclass = r.get(conf.select.valueField); win.setTitle(String.format(_('Add {0}'), s.lastSelectionText)); panel.remove(s); tvheadend.idnode_editor_form(uilevel, d, r.json, panel, { create: true, showpwd: true, forms: conf.forms }); + if (cloneValues) + panel.getForm().setValues(cloneValues); abuttons.save.setVisible(true); abuttons.apply.setVisible(true); win.setOriginSize(true);