]> 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)
committerperexg <perex@perex.cz>
Sun, 17 Jun 2018 08:19:55 +0000 (10:19 +0200)
src/webui/static/app/idnode.js

index 2d7a2e9a9864b916ed6e01ff774b8cce05168ddb..673a18b50a5ee853fbfdcc52a4649075584e7453 100644 (file)
@@ -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);