]> BookStack Code Mirror - bookstack/blobdiff - resources/views/comments/comment-reply.blade.php
#47 - Fixes the issues with the test case.
[bookstack] / resources / views / comments / comment-reply.blade.php
index d5ceb55c66317978ef69e8b0375f7b6a72b6ec33..02535341c00b17c5160191f4a59cb017829a6d8c 100644 (file)
@@ -1,10 +1,12 @@
-<!-- TODO :: needs to be merged with add.blade.php -->
-<form novalidate>
-        <div simple-markdown-input smd-model="comment.newComment" smd-get-content="getCommentHTML" smd-clear="clearInput">
-            <textarea name="markdown" rows="3"
-                      @if($errors->has('markdown')) class="neg" @endif>@if(isset($model) ||
-                      old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
-        </div>
-        <input type="hidden" ng-model="pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
-        <button type="submit" class="button pos" ng-click="vm.saveComment()">Save</button>
-</form>
\ No newline at end of file
+<div class="comment-editor" ng-controller="CommentReplyController as vm" ng-cloak>
+    <form novalidate>
+        <textarea name="markdown" rows="3" ng-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}"></textarea>
+        <input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
+        <button type="button" ng-if="::(isReply || isEdit)" class="button muted" ng-click="closeBox()">{{ trans('entities.comment_cancel') }}</button>
+        <button type="submit" class="button pos" ng-click="vm.saveComment()">{{ trans('entities.comment_save') }}</button>
+    </form>
+</div>
+
+@if($errors->has('markdown'))
+    <div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
+@endif
\ No newline at end of file