aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www/Home.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/http/www/Home.java')
-rw-r--r--src/main/java/com/juick/http/www/Home.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/com/juick/http/www/Home.java b/src/main/java/com/juick/http/www/Home.java
index 3688b58e..b8047190 100644
--- a/src/main/java/com/juick/http/www/Home.java
+++ b/src/main/java/com/juick/http/www/Home.java
@@ -19,6 +19,7 @@ package com.juick.http.www;
import com.juick.server.AdsQueries;
import com.juick.server.MessagesQueries;
+import org.rythmengine.Rythm;
import org.springframework.jdbc.core.JdbcTemplate;
import java.io.IOException;
@@ -119,17 +120,9 @@ public class Home {
out.println("<!--noindex-->");
}
+
if (visitor != null) {
- out.println("<form action=\"/post\" method=\"post\" enctype=\"multipart/form-data\" onsubmit=\"return onsubmitNewMessage()\">");
- out.println("<section id=\"newmessage\">");
- out.println(" <textarea name=\"body\" placeholder=\"Новое сообщение...\" onclick=\"$('#newmessage>div').css('display','block');$('#newmessage textarea').css('min-height','70px');\" onkeypress=\"postformListener(this.form,event)\"></textarea>");
- out.println(" <div>");
- out.println(" <input type=\"text\" class=\"img\" name=\"img\" placeholder=\"Ссылка на изображение (JPG/PNG, до 10Мб)\"/> или <a href=\"#\" onclick=\"return attachMessagePhoto(this)\">загрузить</a><br/>");
- out.println(" <input type=\"text\" class=\"tags\" name=\"tags\" placeholder=\"Теги (через пробел)\"/><br/>");
- out.println(" <input type=\"submit\" class=\"subm\" value=\"Отправить\"/>");
- out.println(" </div>");
- out.println("</section>");
- out.println("</form>");
+ out.println(Rythm.render("parts/post_form.html"));
}
if (mids.size() > 0) {