-1 Removal
+1 Addition

Created by:phpboost

1 # IF C_ADD_MEDIA # 1 # IF C_ADD_MEDIA #
2 <script> 2 <script>
3 <!-- 3 <!--
4 function check_form() 4 function check_form()
5 { 5 {
6 if (document.getElementById('name').value == "") 6 if (document.getElementById('name').value == "")
7 { 7 {
8 alert ("{L_REQUIRE_NAME}"); 8 alert ("{L_REQUIRE_NAME}");
9 return false; 9 return false;
10 } 10 }
11 if (document.getElementById('u_media').value == "" || document.getElementById('u_media').value == "http://") 11 if (document.getElementById('u_media').value == "" || document.getElementById('u_media').value == "http://")
12 { 12 {
13 alert ("{L_REQUIRE_URL}"); 13 alert ("{L_REQUIRE_URL}");
14 return false; 14 return false;
15 } 15 }
16 return true; 16 return true;
17 } 17 }
18 18
19 function in_array(needle, haystack) 19 function in_array(needle, haystack)
20 { 20 {
21 for (var i=0; i < haystack.length; i++) 21 for (var i=0; i < haystack.length; i++)
22 if (haystack[i] == needle) 22 if (haystack[i] == needle)
23 return true; 23 return true;
24 24
25 return false; 25 return false;
26 } 26 }
27 27
28 function hide_width_height() 28 function hide_width_height()
29 { 29 {
30 var id_music = new Array({JS_ID_MUSIC}); 30 var id_music = new Array({JS_ID_MUSIC});
31 31
32 if (id_music.length > 0) 32 if (id_music.length > 0)
33 if (in_array(jQuery('#idcat').val(), id_music)) 33 if (in_array(jQuery('#idcat').val(), id_music))
34 { 34 {
35 jQuery('#width_dl').hide(); 35 jQuery('#width_dl').hide();
36 jQuery('#height_dl').hide(); 36 jQuery('#height_dl').hide();
37 } 37 }
38 else 38 else
39 { 39 {
40 jQuery('#width_dl').show(); 40 jQuery('#width_dl').show();
41 jQuery('#height_dl').show(); 41 jQuery('#height_dl').show();
42 } 42 }
43 } 43 }
44 44
45 jQuery(document).ready(function() { 45 jQuery(document).ready(function() {
46 # IF C_MUSIC # 46 # IF C_MUSIC #
47 jQuery('#width_dl').hide(); 47 jQuery('#width_dl').hide();
48 jQuery('#height_dl').hide(); 48 jQuery('#height_dl').hide();
49 # ENDIF # 49 # ENDIF #
50 jQuery('#idcat').change(function() { 50 jQuery('#idcat').change(function() {
51 hide_width_height(); 51 hide_width_height();
52 }); 52 });
53 }); 53 });
54 --> 54 -->
55 </script> 55 </script>
56 56
57 <section id="module-media-action"> 57 <section id="module-media-action">
58 <header> 58 <header>
59 <h1>{L_PAGE_TITLE}</h1> 59 <h1>{L_PAGE_TITLE}</h1>
60 </header> 60 </header>
61 <div class="content"> 61 <div class="content">
62 <form action="media_action.php" method="post" onsubmit="return check_form();" class="fieldset-content"> 62 <form action="media_action.php" method="post" onsubmit="return check_form();" class="fieldset-content">
63 <p class="center">{L_REQUIRE}</p> 63 <p class="center">{L_REQUIRE}</p>
64 <fieldset> 64 <fieldset>
65 <legend>{L_PAGE_TITLE}</legend> 65 <legend>{L_PAGE_TITLE}</legend>
66 <div class="form-element"> 66 <div class="form-element">
67 <label for="name">* {L_TITLE}</label> 67 <label for="name">* {L_TITLE}</label>
68 <div class="form-field"><input type="text" maxlength="100" class="field-large" id="name" name="name" value="{NAME}" /></div> 68 <div class="form-field"><input type="text" maxlength="100" class="field-large" id="name" name="name" value="{NAME}" /></div>
69 </div> 69 </div>
70 # IF C_CATEGORIES # 70 # IF C_CATEGORIES #
71 <div class="form-element"> 71 <div class="form-element">
72 <label for="category">${LangLoader::get_message('form.category', 'common')}</label> 72 <label for="category">${LangLoader::get_message('form.category', 'common')}</label>
73 <div class="form-field"> 73 <div class="form-field">
74 <select name="idcat" id="idcat"> 74 <select name="idcat" id="idcat">
75 {CATEGORIES} 75 {CATEGORIES}
76 </select> 76 </select>
77 </div> 77 </div>
78 </div> 78 </div>
79 # ENDIF # 79 # ENDIF #
80 <div class="form-element" id="width_dl"> 80 <div class="form-element" id="width_dl">
81 <label for="width">{L_WIDTH}</label> 81 <label for="width">{L_WIDTH}</label>
82 <div class="form-field"><input type="number" min="10" max="5000" maxlength="4" id="width" name="width" value="{WIDTH}" /></div> 82 <div class="form-field"><input type="number" min="10" max="5000" maxlength="4" id="width" name="width" value="{WIDTH}" /></div>
83 </div> 83 </div>
84 <div class="form-element" id="height_dl"> 84 <div class="form-element" id="height_dl">
85 <label for="height">{L_HEIGHT}</label> 85 <label for="height">{L_HEIGHT}</label>
86 <div class="form-field"><input type="number" min="10" max="5000" id="height" name="height" value="{HEIGHT}" /></div> 86 <div class="form-field"><input type="number" min="10" max="5000" id="height" name="height" value="{HEIGHT}" /></div>
87 </div> 87 </div>
88 <div class="form-element"> 88 <div class="form-element">
89 <label for="u_media">* {L_U_MEDIA}</label> 89 <label for="u_media">* {L_U_MEDIA}</label>
90 <div class="form-field"> 90 <div class="form-field">
91 <input type="text" maxlength="255" class="field-large" id="u_media" name="u_media" value="{U_MEDIA}" /> 91 <input type="text" maxlength="255" class="field-large" id="u_media" name="u_media" value="{U_MEDIA}" />
92 # IF C_AUTH_UPLOAD # 92 # IF C_AUTH_UPLOAD #
93 <a title="${LangLoader::get_message('files_management', 'main')}" href="" class="fa fa-cloud-upload fa-2x" onclick="window.open('{PATH_TO_ROOT}/user/upload.php?popup=1&amp;fd=u_media&amp;parse=true&amp;no_path=true', '', 'height=500,width=720,resizable=yes,scrollbars=yes');return false;"></a> 93 <a title="${LangLoader::get_message('files_management', 'main')}" href="" class="fa fa-cloud-upload fa-2x" onclick="window.open('{PATH_TO_ROOT}/user/upload.php?popup=1&amp;fd=u_media&amp;parse=true&amp;no_path=true', '', 'height=500,width=720,resizable=yes,scrollbars=yes');return false;"></a>
94 # ENDIF # 94 # ENDIF #
95 </div> 95 </div>
96 </div> 96 </div>
97 <div class="form-element"> 97 <div class="form-element">
98 <label for="poster">{L_POSTER}</label> 98 <label for="poster">{L_POSTER}</label>
99 <div class="form-field# IF C_AUTH_UPLOAD # form-field-upload-file# ENDIF #"> 99 <div class="form-field# IF C_AUTH_UPLOAD # form-field-upload-file# ENDIF #">
100 <input type="text" maxlength="255" class="field-large" id="poster" name="poster" value="{POSTER}" /> 100 <input type="text" maxlength="255" class="field-large" id="poster" name="poster" value="{POSTER}" />
101 # IF C_AUTH_UPLOAD # 101 # IF C_AUTH_UPLOAD #
102 <a title="${LangLoader::get_message('files_management', 'main')}" href="" class="fa fa-cloud-upload fa-2x" onclick="window.open('{PATH_TO_ROOT}/user/upload.php?popup=1&amp;fd=poster&amp;parse=true&amp;no_path=true', '', 'height=500,width=720,resizable=yes,scrollbars=yes');return false;"></a> 102 <a title="${LangLoader::get_message('files_management', 'main')}" href="" class="fa fa-cloud-upload fa-2x" onclick="window.open('{PATH_TO_ROOT}/user/upload.php?popup=1&amp;fd=poster&amp;parse=true&amp;no_path=true', '', 'height=500,width=720,resizable=yes,scrollbars=yes');return false;"></a>
103 # ENDIF # 103 # ENDIF #
104 </div> 104 </div>
105 </div> 105 </div>
106 <div class="form-element-textarea"> 106 <div class="form-element-textarea">
107 <label for="contents" id="preview_content">{L_CONTENTS}</label> 107 <label for="contents" id="preview_content">{L_CONTENTS}</label>
108 {KERNEL_EDITOR} 108 {KERNEL_EDITOR}
109 <div class="form-field-textarea"> 109 <div class="form-field-textarea">
110 <textarea rows="10" cols="90" id="contents" name="contents">{DESCRIPTION}</textarea> 110 <textarea rows="10" cols="90" id="contents" name="contents">{DESCRIPTION}</textarea>
111 </div> 111 </div>
112 </div> 112 </div>
113 # IF C_APROB # 113 # IF C_APROB #
114 <div class="form-element"> 114 <div class="form-element">
115 <label>{L_APPROVED}</label> 115 <label>{L_APPROVED}</label>
116 <div class="form-field"> 116 <div class="form-field">
117 <input type="checkbox" name="approved" id="approved"{APPROVED} /> 117 <input type="checkbox" name="approved" id="approved"{APPROVED} />
118 </div> 118 </div>
119 </div> 119 </div>
120 # ENDIF # 120 # ENDIF #
121 </fieldset> 121 </fieldset>
122 # IF C_CONTRIBUTION # 122 # IF C_CONTRIBUTION #
123 <fieldset> 123 <fieldset>
124 <legend>{L_CONTRIBUTION_LEGEND}</legend> 124 <legend>{L_CONTRIBUTION_LEGEND}</legend>
125 <div class="notice">{L_NOTICE_CONTRIBUTION}</div> 125 <div class="message-helper notice">{L_NOTICE_CONTRIBUTION}</div>
126 <div class="form-element-textarea"> 126 <div class="form-element-textarea">
127 <label>{L_CONTRIBUTION_COUNTERPART} <p class="field-description">{L_CONTRIBUTION_COUNTERPART_EXPLAIN}</p></label> 127 <label>{L_CONTRIBUTION_COUNTERPART} <p class="field-description">{L_CONTRIBUTION_COUNTERPART_EXPLAIN}</p></label>
128 {CONTRIBUTION_COUNTERPART_EDITOR} 128 {CONTRIBUTION_COUNTERPART_EDITOR}
129 <div class="form-field-textarea"> 129 <div class="form-field-textarea">
130 <textarea rows="20" cols="40" id="counterpart" name="counterpart">{CONTRIBUTION_COUNTERPART}</textarea> 130 <textarea rows="20" cols="40" id="counterpart" name="counterpart">{CONTRIBUTION_COUNTERPART}</textarea>
131 </div> 131 </div>
132 </div> 132 </div>
133 </fieldset> 133 </fieldset>
134 # ENDIF # 134 # ENDIF #
135 135
136 <fieldset class="fieldset-submit"> 136 <fieldset class="fieldset-submit">
137 <legend>{L_SUBMIT}</legend> 137 <legend>{L_SUBMIT}</legend>
138 <input type="hidden" name="idedit" value="{IDEDIT}" /> 138 <input type="hidden" name="idedit" value="{IDEDIT}" />
139 <input type="hidden" name="contrib" value="{C_CONTRIBUTION}" /> 139 <input type="hidden" name="contrib" value="{C_CONTRIBUTION}" />
140 <input type="hidden" name="token" value="{TOKEN}" /> 140 <input type="hidden" name="token" value="{TOKEN}" />
141 <button type="submit" name="submit" value="true" class="submit">{L_SUBMIT}</button> 141 <button type="submit" name="submit" value="true" class="submit">{L_SUBMIT}</button>
142 <button type="button" onclick="XMLHttpRequest_preview(); return false;">{L_PREVIEW}</button> 142 <button type="button" onclick="XMLHttpRequest_preview(); return false;">{L_PREVIEW}</button>
143 <button type="reset" value="true">{L_RESET}</button> 143 <button type="reset" value="true">{L_RESET}</button>
144 </fieldset> 144 </fieldset>
145 </form> 145 </form>
146 </div> 146 </div>
147 <footer></footer> 147 <footer></footer>
148 </section> 148 </section>
149 # ENDIF #149 # ENDIF #
Editor
Original Text
Changed Text
Recommended videos