diff --git a/frappe/core/doctype/user/user.js b/frappe/core/doctype/user/user.js
index 3f98d63cdf..101e0a2636 100644
--- a/frappe/core/doctype/user/user.js
+++ b/frappe/core/doctype/user/user.js
@@ -107,7 +107,6 @@ frappe.ModuleEditor = Class.extend({
make: function() {
var me = this;
this.frm.doc.__onload.all_modules.forEach(function(m) {
- // TODO: add checkbox
$(repl('
', {module: m})).appendTo(me.wrapper);
diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js
index 9d066f14ba..085bbcb817 100644
--- a/frappe/public/js/frappe/form/grid.js
+++ b/frappe/public/js/frappe/form/grid.js
@@ -214,6 +214,13 @@ frappe.ui.form.Grid = Class.extend({
$(this).find(".row-index").html(i + 1);
me.frm.doc[me.df.fieldname].push(doc);
});
+
+ // re-order grid-rows by name
+ me.grid_rows = [];
+ me.frm.doc[me.df.fieldname].forEach(function(d) {
+ me.grid_rows.push(me.grid_rows_by_docname[d.name]);
+ });
+
me.frm.dirty();
}
});
@@ -583,6 +590,7 @@ frappe.ui.form.GridRow = Class.extend({
this.row_index.html(this.doc ? this.doc.idx : " ");
}
+ // TODO: remove grid templates
if(this.grid.template && false) {
// rendered via template
this.row_data && this.row_data.empty();