2022-01-02 21:52:53 +03:00
|
|
|
{php if(!isset($GLOBALS["textAreaCtr"])) $GLOBALS["textAreaCtr"] = 10;}
|
2022-05-08 13:06:26 +03:00
|
|
|
{var $textAreaId = ($post ?? NULL) === NULL ? (++$GLOBALS["textAreaCtr"]) : $post->getId()}
|
2021-11-28 14:39:42 +03:00
|
|
|
|
|
|
|
<div id="write" style="padding: 5px 0;" onfocusin="expand_wall_textarea({$textAreaId});">
|
2021-10-12 14:16:39 +03:00
|
|
|
<form action="{$route}" method="post" enctype="multipart/form-data" style="margin:0;">
|
2021-11-28 14:39:42 +03:00
|
|
|
<textarea id="wall-post-input{$textAreaId}" placeholder="{_write}" name="text" style="width: 100%;resize: none;" class="small-textarea"></textarea>
|
2021-10-12 14:16:39 +03:00
|
|
|
<div>
|
|
|
|
<!-- padding to fix <br/> bug -->
|
|
|
|
</div>
|
2021-11-28 14:39:42 +03:00
|
|
|
<div id="post-buttons{$textAreaId}" style="display: none;">
|
2021-10-12 14:16:39 +03:00
|
|
|
<div class="post-upload">
|
2021-12-13 20:15:01 +03:00
|
|
|
{_attachment}: <span>(unknown)</span>
|
2021-10-12 14:16:39 +03:00
|
|
|
</div>
|
2022-10-11 19:04:43 +03:00
|
|
|
<div class="post-has-poll">
|
|
|
|
{_poll}
|
2023-07-05 14:54:58 +03:00
|
|
|
</div>
|
|
|
|
<div class="post-has-note">
|
|
|
|
|
2022-10-11 19:04:43 +03:00
|
|
|
</div>
|
2021-10-12 14:16:39 +03:00
|
|
|
<div n:if="$postOpts ?? true" class="post-opts">
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $anonEnabled = OPENVK_ROOT_CONF['openvk']['preferences']['wall']['anonymousPosting']['enable']}
|
2021-10-13 21:47:42 +03:00
|
|
|
{if !is_null($thisUser) && !is_null($club ?? NULL) && $owner < 0}
|
2021-10-13 21:31:41 +03:00
|
|
|
{if $club->canBeModifiedBy($thisUser)}
|
|
|
|
<script>
|
|
|
|
function onWallAsGroupClick(el) {
|
2021-11-15 22:45:48 +03:00
|
|
|
document.querySelector("#forceSignOpt").style.display = el.checked ? "block" : "none";
|
|
|
|
|
|
|
|
{if $anonEnabled}
|
|
|
|
document.querySelector("#octoberAnonOpt").style.display = el.checked ? "none" : "block";
|
|
|
|
{/if}
|
2021-10-13 21:31:41 +03:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<label>
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="checkbox" name="as_group" onchange="onWallAsGroupClick(this)" /> {_post_as_group}
|
2021-10-13 21:31:41 +03:00
|
|
|
</label>
|
|
|
|
<label id="forceSignOpt" style="display: none;">
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="checkbox" name="force_sign" /> {_add_signature}
|
2021-10-13 21:31:41 +03:00
|
|
|
</label>
|
|
|
|
{/if}
|
2021-10-12 14:16:39 +03:00
|
|
|
{/if}
|
|
|
|
|
2021-11-15 22:45:48 +03:00
|
|
|
<label n:if="$anonEnabled" id="octoberAnonOpt">
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="checkbox" name="anon" /> {_as_anonymous}
|
2021-11-15 22:45:48 +03:00
|
|
|
</label>
|
|
|
|
|
2021-10-12 14:16:39 +03:00
|
|
|
<label>
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="checkbox" name="nsfw" /> {_contains_nsfw}
|
2021-10-12 14:16:39 +03:00
|
|
|
</label>
|
|
|
|
</div>
|
2022-10-11 21:08:21 +03:00
|
|
|
|
2021-12-04 22:46:26 +03:00
|
|
|
<div n:if="!($postOpts ?? true) && !is_null($thisUser) && !is_null($club ?? NULL) && $club->canBeModifiedBy($thisUser)" class="post-opts">
|
|
|
|
<label>
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="checkbox" name="as_group" /> {_comment_as_group}
|
2021-12-04 22:46:26 +03:00
|
|
|
</label>
|
|
|
|
</div>
|
2021-10-13 22:51:28 +03:00
|
|
|
<input type="file" class="postFileSel" id="postFilePic" name="_pic_attachment" accept="image/*" style="display:none;" />
|
2023-05-27 09:31:20 +03:00
|
|
|
<input n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" type="file" class="postFileSel" id="postFileVid" name="_vid_attachment" accept="video/*" style="display:none;" />
|
2022-10-11 19:04:43 +03:00
|
|
|
<input type="hidden" name="poll" value="none" />
|
2023-07-05 14:54:58 +03:00
|
|
|
<input type="hidden" id="note" name="note" value="none" />
|
2021-10-12 14:16:39 +03:00
|
|
|
<input type="hidden" name="type" value="1" />
|
|
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
|
|
<br/>
|
2022-03-24 15:29:00 +03:00
|
|
|
<input type="submit" value="{_write}" class="button" />
|
2021-10-13 20:48:36 +03:00
|
|
|
<div style="float: right; display: flex; flex-direction: column;">
|
2022-05-26 17:42:27 +03:00
|
|
|
<a href="javascript:toggleMenu({$textAreaId});">
|
2021-12-13 19:22:04 +03:00
|
|
|
{_attach}
|
2021-10-12 14:16:39 +03:00
|
|
|
</a>
|
2021-10-13 20:48:36 +03:00
|
|
|
|
|
|
|
<div id="wallAttachmentMenu" class="hidden">
|
2022-05-26 17:42:27 +03:00
|
|
|
<a class="header" href="javascript:toggleMenu({$textAreaId});">
|
|
|
|
{_attach}
|
|
|
|
</a>
|
2021-12-02 15:01:48 +03:00
|
|
|
<a href="javascript:void(document.querySelector('#post-buttons{$textAreaId} input[name=_pic_attachment]').click());">
|
2021-10-13 20:48:36 +03:00
|
|
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
|
2022-05-26 17:42:27 +03:00
|
|
|
{_photo}
|
2021-10-13 20:48:36 +03:00
|
|
|
</a>
|
2023-05-27 09:31:20 +03:00
|
|
|
<a n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" href="javascript:void(document.querySelector('#post-buttons{$textAreaId} input[name=_vid_attachment]').click());">
|
2021-10-13 22:51:28 +03:00
|
|
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
|
2022-05-26 17:42:27 +03:00
|
|
|
{_video}
|
2021-10-13 22:51:28 +03:00
|
|
|
</a>
|
2023-07-05 14:54:58 +03:00
|
|
|
<a n:if="$notes ?? false" href="javascript:attachNote({$textAreaId})">
|
|
|
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-srt.png" />
|
|
|
|
{_note}
|
|
|
|
</a>
|
2021-12-02 15:01:48 +03:00
|
|
|
<a n:if="$graffiti ?? false" href="javascript:initGraffiti({$textAreaId});">
|
2021-10-13 20:50:16 +03:00
|
|
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/actions/draw-brush.png" />
|
2022-05-26 17:42:27 +03:00
|
|
|
{_graffiti}
|
2021-10-13 20:50:16 +03:00
|
|
|
</a>
|
2022-10-11 19:04:43 +03:00
|
|
|
<a n:if="$polls ?? false" href="javascript:initPoll({$textAreaId})">
|
|
|
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/actions/office-chart-bar-stacked.png" />
|
|
|
|
{_poll}
|
|
|
|
</a>
|
2021-10-13 20:48:36 +03:00
|
|
|
</div>
|
2021-10-12 14:16:39 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-10-13 23:15:39 +03:00
|
|
|
|
2021-12-02 15:01:48 +03:00
|
|
|
<script>
|
2021-12-02 15:37:16 +03:00
|
|
|
$(document).ready(() => {
|
|
|
|
u("#post-buttons{$textAreaId} .postFileSel").on("change", function() {
|
|
|
|
handleUpload.bind(this, {$textAreaId})();
|
|
|
|
});
|
|
|
|
|
|
|
|
setupWallPostInputHandlers({$textAreaId});
|
|
|
|
});
|
2021-12-02 15:01:48 +03:00
|
|
|
</script>
|
|
|
|
|
2021-11-28 17:28:17 +03:00
|
|
|
{if $graffiti}
|
|
|
|
{script "js/node_modules/react/dist/react-with-addons.min.js"}
|
|
|
|
{script "js/node_modules/react-dom/dist/react-dom.min.js"}
|
|
|
|
{script "js/vnd_literallycanvas.js"}
|
|
|
|
{css "js/node_modules/literallycanvas/lib/css/literallycanvas.css"}
|
|
|
|
{/if}
|