diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/controllers/NewMessage.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java index 4de4f5e9..7875f52b 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java +++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java @@ -105,30 +105,27 @@ public class NewMessage { templates.pageNavigation(out, visitor, null); out.println("<section id=\"content\" class=\"pagetext\">"); - if (messagesService.isReadonly()) { - out.println("<p>Временно недоступно</p>"); + + out.println("<form action=\"/post2\" method=\"post\" id=\"postmsg\" enctype=\"multipart/form-data\">"); + out.println("<p style=\"text-align: left\"><b>Место: <span id=\"location\"></span></b> <span id=\"locationclear\">— <a href=\"#\" onclick=\"clearLocation()\">Отменить</a></span></p>"); + out.println("<p style=\"text-align: left\"><b>Фото:</b> <span id=\"attachmentfile\"><input type=\"file\" name=\"attach\"/> <i>(JPG, PNG, до 10Мб)</i></span></p>"); + + String body = request.getParameter("body"); + if (body == null) { + body = StringUtils.EMPTY; } else { - out.println("<form action=\"/post2\" method=\"post\" id=\"postmsg\" enctype=\"multipart/form-data\">"); - out.println("<p style=\"text-align: left\"><b>Место: <span id=\"location\"></span></b> <span id=\"locationclear\">— <a href=\"#\" onclick=\"clearLocation()\">Отменить</a></span></p>"); - out.println("<p style=\"text-align: left\"><b>Фото:</b> <span id=\"attachmentfile\"><input type=\"file\" name=\"attach\"/> <i>(JPG, PNG, до 10Мб)</i></span></p>"); - - String body = request.getParameter("body"); - if (body == null) { - body = StringUtils.EMPTY; - } else { - if (body.length() > 4096) { - body = body.substring(0, 4096); - } - body = StringEscapeUtils.escapeHtml4(body); + if (body.length() > 4096) { + body = body.substring(0, 4096); } - out.println("<p><textarea name=\"body\" class=\"newmessage\" rows=\"7\" cols=\"10\">" + body + "</textarea><br/>"); - - out.println("<input type=\"hidden\" name=\"place_id\"/>" + "" + "<input type=\"submit\" class=\"subm\" value=\" Отправить \"/></p>"); - out.println("</form>"); - out.println("<div id=\"geomap\"></div>"); - out.println("<p style=\"text-align: left\"><b>Теги:</b></p>"); - printUserTags(out, visitor); + body = StringEscapeUtils.escapeHtml4(body); } + out.println("<p><textarea name=\"body\" class=\"newmessage\" rows=\"7\" cols=\"10\">" + body + "</textarea><br/>"); + + out.println("<input type=\"hidden\" name=\"place_id\"/>" + "" + "<input type=\"submit\" class=\"subm\" value=\" Отправить \"/></p>"); + out.println("</form>"); + out.println("<div id=\"geomap\"></div>"); + out.println("<p style=\"text-align: left\"><b>Теги:</b></p>"); + printUserTags(out, visitor); out.println("</section>"); templates.pageFooter(request, out, visitor, false); |