@@ -86,26 +86,14 function hideFieldset(el) { | |||
|
86 | 86 | var fileFieldCount = 1; |
|
87 | 87 | |
|
88 | 88 | function addFileField() { |
|
89 |
|
|
|
90 |
|
|
|
91 | var f = document.createElement("input"); | |
|
92 | f.type = "file"; | |
|
93 | f.name = "attachments[" + fileFieldCount + "][file]"; | |
|
94 | f.size = 30; | |
|
95 | var d = document.createElement("input"); | |
|
96 | d.type = "text"; | |
|
97 | d.name = "attachments[" + fileFieldCount + "][description]"; | |
|
98 | d.size = 60; | |
|
99 | var dLabel = new Element('label'); | |
|
100 | dLabel.addClassName('inline'); | |
|
101 | // Pulls the languge value used for Optional Description | |
|
102 | dLabel.update($('attachment_description_label_content').innerHTML) | |
|
103 | p = document.getElementById("attachments_fields"); | |
|
104 | p.appendChild(document.createElement("br")); | |
|
105 | p.appendChild(f); | |
|
106 | p.appendChild(dLabel); | |
|
107 | dLabel.appendChild(d); | |
|
108 | ||
|
89 | if (fileFieldCount >= 10) return false | |
|
90 | fileFieldCount++; | |
|
91 | var fields = $('attachments_fields'); | |
|
92 | var s = document.createElement("span"); | |
|
93 | s.update(fields.down('span').innerHTML); | |
|
94 | s.down('input.file').name = "attachments[" + fileFieldCount + "][file]"; | |
|
95 | s.down('input.description').name = "attachments[" + fileFieldCount + "][description]"; | |
|
96 | fields.appendChild(s); | |
|
109 | 97 | } |
|
110 | 98 | |
|
111 | 99 | function showTab(name) { |
General Comments 0
You need to be logged in to leave comments.
Login now