make default, delete and note supplied via a options parameter
authorTony Cook <tony@develop-help.com>
Thu, 20 Mar 2014 23:43:08 +0000 (10:43 +1100)
committerTony Cook <tony@develop-help.com>
Sat, 9 May 2015 04:06:42 +0000 (14:06 +1000)
site/templates/admin/file_edit.tmpl

index 065ef27bfa63e5a5a078aaac4e994032ee74d623..4b75c2b8f9166117cc66075c9cbc99e2b27ee39e 100644 (file)
 <:    .if m.type eq 'image' :>
 <:       .set def = file.meta_by_name(m.display_name).value :>
 <:    .end if :>
-<:    .set tmpobj = {} :>
-<:%   tmpobj.set(name, def) :>
 <:    .if m.ro :>
-<:      .call "inlinefieldro", name: name, field: m.field, object: tmpobj :>
+<:      .call "inlinefieldro", name: name, field: m.field,
+               options: { default: def } :>
 <:    .else :>
-<:      .call "inlinefield", name: name, field: m.field, delete: 1, object: tmpobj :>
+<:      .call "inlinefield", name: name, field: m.field, 
+                options: { delete: 1, default: def } :>
 <:    .end if :>
 <:  .end for :>
 </fieldset>