-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
area/frontendestimation/1hEstimated time: 60 minutesEstimated time: 60 minuteskind/taskTask that is part of some featureTask that is part of some feature
Milestone
Description
On the src/main/webapp/WEB-INF/views/series/info.html
page we should add another form to add a comment. It should have a single textarea and a submit button. Here is an example that can be helpful:
mystamps/src/main/webapp/WEB-INF/views/series/add.html
Lines 522 to 532 in 366f099
<div class="form-group js-comment collapse in" th:classappend="|${#fields.hasErrors('comment') ? 'has-error' : ''} ${addSeriesForm.comment != null ? 'js-has-data' : ''}|" sec:authorize="hasAuthority('ADD_COMMENTS_TO_SERIES')"> | |
<label for="comment" class="control-label col-sm-3" th:text="#{t_comment}"> | |
Comment | |
</label> | |
<div class="col-sm-5"> | |
<textarea id="comment" class="form-control" cols="22" rows="3" th:field="*{comment}"></textarea> | |
<!--/*/ | |
<span id="comment.errors" class="help-block" th:if="${#fields.hasErrors('comment')}" th:each="error : ${#fields.errors('comment')}" th:text="${error}"></span> | |
/*/--> | |
</div> | |
</div> |
When we submit a form, it should send a PATCH request to API /series/{id}
with
[
{ "op": "add", "path": "/comment", "value": "<user data>" }
]
and reload a page on success. It should show an error when server returns an error. Note that there can be 2 type of errors -- general (for a whole form) and validation error (for a particular field).
Part of #785
Metadata
Metadata
Assignees
Labels
area/frontendestimation/1hEstimated time: 60 minutesEstimated time: 60 minuteskind/taskTask that is part of some featureTask that is part of some feature