put file name in title if title field is empty
This commit is contained in:
parent
13da77de0a
commit
08880e3b91
1 changed files with 5 additions and 1 deletions
|
@ -144,7 +144,11 @@
|
|||
|
||||
<metal:upload define-macro="input_fileupload">
|
||||
<input type="file" name="field"
|
||||
tal:attributes="name name;" />
|
||||
tal:attributes="name name;"
|
||||
onchange="if (this.form.title.value == '') {
|
||||
var value = this.value.split('\\');
|
||||
this.form.title.value = value[value.length-1];
|
||||
}" />
|
||||
</metal:upload>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue