luci-base: form.js: fix GridSection not using user-input name when add

Signed-off-by: Richard Yu <yurichard3839@gmail.com>
This commit is contained in:
Richard Yu 2019-11-04 00:19:33 +08:00
parent 6c7b1e156d
commit fa15370f0e
No known key found for this signature in database
GPG key ID: D16286AFD4E1FFF3

View file

@ -1390,9 +1390,9 @@ var CBIGridSection = CBITableSection.extend({
CBIAbstractSection.prototype.tab.call(this, name, title, description);
},
handleAdd: function(ev) {
handleAdd: function(ev, name) {
var config_name = this.uciconfig || this.map.config,
section_id = this.map.data.add(config_name, this.sectiontype);
section_id = this.map.data.add(config_name, this.sectiontype, name);
this.addedSection = section_id;
return this.renderMoreOptionsModal(section_id);