|
@@ -1,35 +1,76 @@
|
1
|
|
-
|
2
|
|
- <div>
|
3
|
|
- <label for="url">MP3 URL</label>
|
4
|
|
- <br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
5
|
|
- <div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
6
|
|
- This is the MP3 file URL or a GoEar URL or an Odeo URL.<br>
|
7
|
|
- <span style="font-size: 10px; font-weight: normal;">(ie. http://www.goear.com/listen.php?v=c0a2c85)</span>
|
8
|
|
- </div>
|
9
|
|
- </div>
|
10
|
|
- <div>
|
11
|
|
- <label for="description">Caption <span class="option">(optional)</span></label><br />
|
12
|
|
- <textarea rows="12" cols="84" name="description" id="description" tabindex="2">{editBody}</textarea>
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+ <div id="mp3_upload">
|
|
4
|
+ <label for="description">MP3</label>
|
|
5
|
+ <br /><input type="file" name="mp3" id="mp3" enctype="multipart/form-data"/>
|
|
6
|
+ <div style="font-size:11px; color:#666; margin-top:5px;">
|
|
7
|
+ Supports MP3. <strong>Max size is 10 MB.</strong>
|
|
8
|
+ </div>
|
|
9
|
+ <div style="font-size:11px; color:#666; margin-top:5px;">
|
|
10
|
+ <a href="#" class="linkFrm">Use a URL instead</a>
|
13
|
11
|
</div>
|
|
12
|
+ </div>
|
|
13
|
+
|
|
14
|
+ <div id="mp3_url">
|
|
15
|
+ <label for="description">MP3 URL</label>
|
|
16
|
+ <br /><input class="input-text" type="text" name="url" id="url" value="{editUrl}" style="width:400px"/>
|
|
17
|
+ <div style="font-size:11px; color:#666; margin-top:5px;">
|
|
18
|
+ <a href="#" class="linkFrm">Use a upload form instead</a>
|
|
19
|
+ </div>
|
|
20
|
+ </div>
|
|
21
|
+
|
|
22
|
+ <div>
|
|
23
|
+ <label for="description" style="display:block;">Caption <span class="option">(optional)</span></label>
|
|
24
|
+ <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
25
|
+ </div>
|
|
26
|
+
|
|
27
|
+ <input type="hidden" name="title" id="title" value="" />
|
|
28
|
+ <input type="hidden" name="MAX_FILE_SIZE" value="10485760" />
|
|
29
|
+ <input type="hidden" name="type" id="type" value="{type}" />
|
|
30
|
+ <input type="hidden" name="date" id="date" value="{date}" />
|
|
31
|
+ <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
32
|
+
|
14
|
33
|
|
15
|
|
- <input type="hidden" name="title" id="title" value="" />
|
16
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
17
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
18
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
19
|
34
|
|
20
|
35
|
|
21
|
36
|
<script>
|
|
37
|
+ $('#mp3_url').css('display','none');
|
22
|
38
|
$("#autosave").validate({
|
23
|
39
|
rules: {
|
24
|
|
- url: {
|
25
|
|
- required: true,
|
|
40
|
+ mp3: {
|
|
41
|
+ required: function() {
|
|
42
|
+ return ($('#mp3_upload').css('display')!= 'none') ? true : false;
|
|
43
|
+ },
|
|
44
|
+ accept: "(mp3)"
|
|
45
|
+ },
|
|
46
|
+ url: {
|
|
47
|
+ required: function() {
|
|
48
|
+ return ($('#mp3_url').css('display')!= 'none') ? true : false;
|
|
49
|
+ },
|
26
|
50
|
url: true
|
27
|
51
|
}
|
28
|
52
|
},
|
29
|
53
|
errorElement: "span",
|
30
|
|
- errorClass: "validate_span",
|
31
|
|
- errorPlacement: function(label, element) {
|
|
54
|
+ errorClass: "validate_span",
|
|
55
|
+ errorPlacement: function(label, element) {
|
32
|
56
|
label.prependTo(element.prev())
|
33
|
|
- }
|
|
57
|
+ }
|
34
|
58
|
});
|
35
|
|
- </script>
|
|
59
|
+
|
|
60
|
+ $("#mp3_upload a.linkFrm").click( function() {
|
|
61
|
+ $('#mp3_upload').css('display','none');
|
|
62
|
+ $('#mp3_url').css('display','block');
|
|
63
|
+ $('#mp3').val('');
|
|
64
|
+ return false;
|
|
65
|
+ }
|
|
66
|
+ );
|
|
67
|
+
|
|
68
|
+ $("#mp3_url a.linkFrm").click( function() {
|
|
69
|
+ $('#mp3_url').css('display','none');
|
|
70
|
+ $('#mp3_upload').css('display','block');
|
|
71
|
+ $('#url').val('');
|
|
72
|
+ return false;
|
|
73
|
+ }
|
|
74
|
+ );
|
|
75
|
+
|
|
76
|
+ </script>
|