]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix cloning an entry in UIs where you select a type and save the clone manually
authorirgendsontyp <htcmaxx@gmail.com>
Sat, 16 Jun 2018 15:57:37 +0000 (17:57 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 2 Jul 2018 13:19:30 +0000 (15:19 +0200)
src/webui/static/app/idnode.js

index 7d4843d2f4c1573980a0562d296386ac93de4b40..6d73d6aca300aea46d82d6c650b7539c1a88268e 100644 (file)
@@ -1349,12 +1349,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 });
+                        if (cloneValues)
+                            panel.getForm().setValues(cloneValues);
                         abuttons.save.setVisible(true);
                         abuttons.apply.setVisible(true);
                         win.setOriginSize(true);