|
@@ -72,275 +72,7 @@
|
72
|
72
|
<form action="index.php" method="post" {if {$new}=='photo'}enctype="multipart/form-data"{/if} name="frmAdd" id="autosave" class="newpost">
|
73
|
73
|
<fieldset>
|
74
|
74
|
{if {$postId}}<input type="hidden" name="id_post" id="id_post" value="{postId}" />{/if}
|
75
|
|
- {if {$type}=='post'}
|
76
|
|
- <div>
|
77
|
|
- <label for="title" style="display:block;">Title <span class="option">(optional)</span></label>
|
78
|
|
- <br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
79
|
|
- </div>
|
80
|
|
- <div>
|
81
|
|
- <label for="description" style="display:block;">Body</label>
|
82
|
|
- <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
83
|
|
- </div>
|
84
|
|
-
|
85
|
|
- <input type="hidden" name="url" id="url" value="" />
|
86
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
87
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
88
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
89
|
|
-
|
90
|
|
- <script>
|
91
|
|
- $("#autosave").validate({
|
92
|
|
- rules: {
|
93
|
|
- description: "required"
|
94
|
|
- },
|
95
|
|
- errorElement: "span",
|
96
|
|
- errorClass: "validate_span",
|
97
|
|
- errorPlacement: function(label, element) {
|
98
|
|
- label.prependTo(element.prev())
|
99
|
|
- }
|
100
|
|
- });
|
101
|
|
- </script>
|
102
|
|
- {elseif {$type}=='photo'}
|
103
|
|
- <div id="photo_upload">
|
104
|
|
- <label for="description">Photo</label>
|
105
|
|
- <br /><input type="file" name="photo" id="photo" accept="image/gif,image/jpeg,image/jpg,image/png"/>
|
106
|
|
- <div style="font-size:11px; color:#666; margin-top:5px;">
|
107
|
|
- Supports JPEG, GIF and PNG. <strong>Max size is 10 MB.</strong>
|
108
|
|
- </div>
|
109
|
|
- <div style="font-size:11px; color:#666; margin-top:5px;">
|
110
|
|
- <a href="#" class="linkFrm">Use a URL instead</a>
|
111
|
|
- </div>
|
112
|
|
- </div>
|
113
|
|
-
|
114
|
|
- <div id="photo_url">
|
115
|
|
- <label for="description">Photo URL</label>
|
116
|
|
- <br /><input class="input-text" type="text" name="url" id="url" size="80" value="{editUrl}" />
|
117
|
|
- <div style="font-size:11px; color:#666; margin-top:5px;">
|
118
|
|
- <a href="#" class="linkFrm">Use a upload form instead</a>
|
119
|
|
- </div>
|
120
|
|
- </div>
|
121
|
|
-
|
122
|
|
- <div>
|
123
|
|
- <label for="description" style="display:block;">Caption <span class="option">(optional)</span></label>
|
124
|
|
- <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
125
|
|
- </div>
|
126
|
|
-
|
127
|
|
- <input type="hidden" name="title" id="title" value="" />
|
128
|
|
- <input type="hidden" name="MAX_FILE_SIZE" value="10485760" />
|
129
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
130
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
131
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
132
|
|
-
|
133
|
|
- <script>
|
134
|
|
- $('#photo_url').css('display','none');
|
135
|
|
- $("#autosave").validate({
|
136
|
|
- rules: {
|
137
|
|
- photo: {
|
138
|
|
- required: function() {
|
139
|
|
- return ($('#photo_upload').css('display')!= 'none') ? true : false;
|
140
|
|
- },
|
141
|
|
- accept: "(jpe?g|gif|png)"
|
142
|
|
- },
|
143
|
|
- url: {
|
144
|
|
- required: function() {
|
145
|
|
- return ($('#photo_url').css('display')!= 'none') ? true : false;
|
146
|
|
- },
|
147
|
|
- url: true
|
148
|
|
- }
|
149
|
|
- },
|
150
|
|
- errorElement: "span",
|
151
|
|
- errorClass: "validate_span",
|
152
|
|
- errorPlacement: function(label, element) {
|
153
|
|
- label.prependTo(element.prev())
|
154
|
|
- }
|
155
|
|
- });
|
156
|
|
-
|
157
|
|
- $("#photo_upload a.linkFrm").click( function() {
|
158
|
|
- $('#photo_upload').css('display','none');
|
159
|
|
- $('#photo_url').css('display','block');
|
160
|
|
- $('#photo').val('');
|
161
|
|
- return false;
|
162
|
|
- }
|
163
|
|
- );
|
164
|
|
-
|
165
|
|
- $("#photo_url a.linkFrm").click( function() {
|
166
|
|
- $('#photo_url').css('display','none');
|
167
|
|
- $('#photo_upload').css('display','block');
|
168
|
|
- $('#url').val('');
|
169
|
|
- return false;
|
170
|
|
- }
|
171
|
|
- );
|
172
|
|
- </script>
|
173
|
|
- {elseif {$type}=='quote'}
|
174
|
|
- <div>
|
175
|
|
- <label for="description">Quote</label>
|
176
|
|
- <br /><textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
177
|
|
- </div>
|
178
|
|
- <div>
|
179
|
|
- <label for="title">Source <span class="option">(optional)</span></label>
|
180
|
|
- <br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
181
|
|
- </div>
|
182
|
|
-
|
183
|
|
- <input type="hidden" name="url" id="url" value="" />
|
184
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
185
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
186
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
187
|
|
-
|
188
|
|
- <script>
|
189
|
|
- $("#autosave").validate({
|
190
|
|
- rules: {
|
191
|
|
- description: "required"
|
192
|
|
- },
|
193
|
|
- errorElement: "span",
|
194
|
|
- errorClass: "validate_span",
|
195
|
|
- errorPlacement: function(label, element) {
|
196
|
|
- label.prependTo(element.prev())
|
197
|
|
- }
|
198
|
|
- });
|
199
|
|
- </script>
|
200
|
|
- {elseif {$type}=='url'}
|
201
|
|
- <div>
|
202
|
|
- <label for="title">Name <span class="option">(optional)</span></label>
|
203
|
|
- <br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
204
|
|
- </div>
|
205
|
|
- <div>
|
206
|
|
- <label for="url">URL</label>
|
207
|
|
- <br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
208
|
|
- </div>
|
209
|
|
- <div>
|
210
|
|
- <div id="add_link_description" style="margin-top:5px;">
|
211
|
|
- <a class="linkFrm" href="#" onclick="document.getElementById('link_description').style.display = ''; document.getElementById('add_link_description').style.display = 'none'; return false;" style="font-size:11px;">Add a description</a><br /><br />
|
212
|
|
- </div>
|
213
|
|
- <div id="link_description" style="display:none;">
|
214
|
|
- <label for="description">Description</label><br />
|
215
|
|
- <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
216
|
|
- </div>
|
217
|
|
- </div>
|
218
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
219
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
220
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
221
|
|
-
|
222
|
|
- <script>
|
223
|
|
- $("#autosave").validate({
|
224
|
|
- rules: {
|
225
|
|
- url: {
|
226
|
|
- required: true,
|
227
|
|
- url: true
|
228
|
|
- }
|
229
|
|
- },
|
230
|
|
- errorElement: "span",
|
231
|
|
- errorClass: "validate_span",
|
232
|
|
- errorPlacement: function(label, element) {
|
233
|
|
- label.prependTo(element.prev())
|
234
|
|
- }
|
235
|
|
- });
|
236
|
|
- </script>
|
237
|
|
- {elseif {$type}=='conversation'}
|
238
|
|
- <div>
|
239
|
|
- <label for="title">Title <span class="option">(optional)</span></label><br />
|
240
|
|
- <input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
241
|
|
- </div>
|
242
|
|
-
|
243
|
|
- <div>
|
244
|
|
- <label for="description">Conversation</label>
|
245
|
|
- <div style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
|
246
|
|
- <span style="font-weight: bold;">Example</span><br>
|
247
|
|
- <span style="font-style: italic;">
|
248
|
|
- Geek: Wow an open source tumblelog CMS!!.<br>
|
249
|
|
- Normal: Tumble... what??<br>
|
250
|
|
- Geek: Read the wikipedia!!
|
251
|
|
- </span>
|
252
|
|
- </div>
|
253
|
|
- <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
254
|
|
- </div>
|
255
|
|
-
|
256
|
|
- <input type="hidden" name="url" id="url" value="" />
|
257
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
258
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
259
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
260
|
|
-
|
261
|
|
- <script>
|
262
|
|
- $("#autosave").validate({
|
263
|
|
- rules: {
|
264
|
|
- description: "required"
|
265
|
|
- },
|
266
|
|
- errorElement: "span",
|
267
|
|
- errorClass: "validate_span",
|
268
|
|
- errorPlacement: function(label, element) {
|
269
|
|
- label.prependTo(element.parent().children("label"))
|
270
|
|
- }
|
271
|
|
- });
|
272
|
|
- </script>
|
273
|
|
- {elseif {$type}=='video'}
|
274
|
|
- <div>
|
275
|
|
- <label for="url">Video URL</label>
|
276
|
|
- <br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
277
|
|
- <div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
278
|
|
- This is the URL from the video sites YouTube, Vimeo, Yahoo, Daily Motion <br />
|
279
|
|
- or even an Slide Share Presentation.<br />
|
280
|
|
- <span style="font-size: 10px; font-weight: normal;">(ie. http://youtube.com/watch?v=HcBFLN9cli0)</span>
|
281
|
|
- </div>
|
282
|
|
- </div>
|
283
|
|
- <div>
|
284
|
|
- <label for="description">Caption <span class="option">(optional)</span></label><br />
|
285
|
|
- <textarea rows="12" cols="84" name="description" id="description" tabindex="2">{editBody}</textarea>
|
286
|
|
- </div>
|
287
|
|
-
|
288
|
|
- <input type="hidden" name="title" id="title" value="" />
|
289
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
290
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
291
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
292
|
|
-
|
293
|
|
- <script>
|
294
|
|
- $("#autosave").validate({
|
295
|
|
- rules: {
|
296
|
|
- url: {
|
297
|
|
- required: true,
|
298
|
|
- url: true
|
299
|
|
- }
|
300
|
|
- },
|
301
|
|
- errorElement: "span",
|
302
|
|
- errorClass: "validate_span",
|
303
|
|
- errorPlacement: function(label, element) {
|
304
|
|
- label.prependTo(element.prev())
|
305
|
|
- }
|
306
|
|
- });
|
307
|
|
- </script>
|
308
|
|
- {elseif {$type}=='mp3'}
|
309
|
|
- <div>
|
310
|
|
- <label for="url">MP3 URL</label>
|
311
|
|
- <br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
312
|
|
- <div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
313
|
|
- This is the MP3 file URL or a GoEar URL or an Odeo URL.<br>
|
314
|
|
- <span style="font-size: 10px; font-weight: normal;">(ie. http://www.goear.com/listen.php?v=c0a2c85)</span>
|
315
|
|
- </div>
|
316
|
|
- </div>
|
317
|
|
- <div>
|
318
|
|
- <label for="description">Caption <span class="option">(optional)</span></label><br />
|
319
|
|
- <textarea rows="12" cols="84" name="description" id="description" tabindex="2">{editBody}</textarea>
|
320
|
|
- </div>
|
321
|
|
-
|
322
|
|
- <input type="hidden" name="title" id="title" value="" />
|
323
|
|
- <input type="hidden" name="type" id="type" value="{type}" />
|
324
|
|
- <input type="hidden" name="date" id="date" value="{date}" />
|
325
|
|
- <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
326
|
|
-
|
327
|
|
- <script>
|
328
|
|
- $("#autosave").validate({
|
329
|
|
- rules: {
|
330
|
|
- url: {
|
331
|
|
- required: true,
|
332
|
|
- url: true
|
333
|
|
- }
|
334
|
|
- },
|
335
|
|
- errorElement: "span",
|
336
|
|
- errorClass: "validate_span",
|
337
|
|
- errorPlacement: function(label, element) {
|
338
|
|
- label.prependTo(element.prev())
|
339
|
|
- }
|
340
|
|
- });
|
341
|
|
- </script>
|
342
|
|
- {/if}
|
343
|
|
-
|
|
75
|
+ {form}
|
344
|
76
|
<p>
|
345
|
77
|
<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
|
346
|
78
|
{__("Some HTML allowed")}:<br />
|