Set the slug based on the file name

This commit is contained in:
2016-11-02 14:07:02 +01:00
parent ff94cc57a3
commit 3fc08bcafd
3 changed files with 9 additions and 2 deletions

View File

@@ -40,10 +40,11 @@
}
/***** Attachment handling ******/
var attrs = ['for', 'id', 'name', 'data-field-name'];
var attrs = ['for', 'id', 'name', 'data-field-name', 'data-field-slug'];
function resetAttributeNames(section) {
var tags = section.find('input, select, label, div, a');
var idx = section.index();
tags.each(function () {
var $this = $(this);