Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Postmill
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Postmill
Postmill
Commits
854f9f75
Commit
854f9f75
authored
May 22, 2018
by
Emma
😻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show post/save instead of 'submit' on comment form
parent
1f66aed5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
10 deletions
+16
-10
CommentType.php
src/Form/CommentType.php
+5
-1
CommentData.php
src/Form/Model/CommentData.php
+10
-0
messages.de.yml
translations/messages.de.yml
+0
-1
messages.el.yml
translations/messages.el.yml
+0
-1
messages.en.yml
translations/messages.en.yml
+1
-1
messages.eo.yml
translations/messages.eo.yml
+0
-1
messages.es.yml
translations/messages.es.yml
+0
-1
messages.fi.yml
translations/messages.fi.yml
+0
-1
messages.fr.yml
translations/messages.fr.yml
+0
-1
messages.nb.yml
translations/messages.nb.yml
+0
-1
messages.pt_BR.yml
translations/messages.pt_BR.yml
+0
-1
No files found.
src/Form/CommentType.php
View file @
854f9f75
...
...
@@ -48,7 +48,11 @@ final class CommentType extends AbstractType {
$this
->
addUserFlagOption
(
$builder
,
$options
[
'forum'
]);
$builder
->
add
(
'submit'
,
SubmitType
::
class
);
$editing
=
$builder
->
getData
()
&&
$builder
->
getData
()
->
getEntityId
();
$builder
->
add
(
'submit'
,
SubmitType
::
class
,
[
'label'
=>
$editing
?
'action.save'
:
'action.post'
,
]);
}
/**
...
...
src/Form/Model/CommentData.php
View file @
854f9f75
...
...
@@ -13,6 +13,11 @@ use Symfony\Component\Validator\Constraints as Assert;
* @NotForumBanned(forumPath="submission.forum", errorPath="body")
*/
class
CommentData
{
/**
* @var int|null
*/
private
$entityId
;
/**
* @var Submission
*/
...
...
@@ -34,6 +39,7 @@ class CommentData {
public
static
function
createFromComment
(
Comment
$comment
)
:
self
{
$self
=
new
self
(
$comment
->
getSubmission
());
$self
->
entityId
=
$comment
->
getId
();
$self
->
submission
=
$comment
->
getSubmission
();
$self
->
body
=
$comment
->
getBody
();
$self
->
userFlag
=
$comment
->
getUserFlag
();
...
...
@@ -69,6 +75,10 @@ class CommentData {
}
}
public
function
getEntityId
()
:
?
int
{
return
$this
->
entityId
;
}
public
function
getBody
()
:
?
string
{
return
$this
->
body
;
}
...
...
translations/messages.de.yml
View file @
854f9f75
...
...
@@ -53,7 +53,6 @@ comments:
comment_form
:
comment
:
Kommentar
submit
:
Einreichen
edit_title
:
Kommentar bearbeiten
create_title
:
Kommentar einreichen
...
...
translations/messages.el.yml
View file @
854f9f75
...
...
@@ -69,7 +69,6 @@ comments:
comment_form
:
comment
:
Σχόλιο
submit
:
Στειλε το
edit_title
:
Διόρθωση σχολίου
create_title
:
Γράφω σχόλιο
...
...
translations/messages.en.yml
View file @
854f9f75
...
...
@@ -26,6 +26,7 @@ action:
create
:
Create
compare
:
Compare
add
:
Add
post
:
Post
save
:
Save
add_moderator
:
...
...
@@ -76,7 +77,6 @@ comments:
comment_form
:
comment
:
Comment
submit
:
Submit
edit_title
:
Editing comment
create_title
:
Posting a comment
...
...
translations/messages.eo.yml
View file @
854f9f75
...
...
@@ -54,7 +54,6 @@ comments:
comment_form
:
comment
:
Komento
submit
:
Afiŝi
edit_title
:
Redaktas komenton
create_title
:
Skribas komenton
...
...
translations/messages.es.yml
View file @
854f9f75
...
...
@@ -74,7 +74,6 @@ comments:
comment_form
:
comment
:
Comentar
submit
:
Publicar
edit_title
:
Editando comentario
create_title
:
Publicando un comentario
...
...
translations/messages.fi.yml
View file @
854f9f75
...
...
@@ -54,7 +54,6 @@ comments:
comment_form
:
comment
:
Kommentoi
submit
:
Lisää
edit_title
:
Muokataan kommenttia
create_title
:
Lisätään kommentti
...
...
translations/messages.fr.yml
View file @
854f9f75
...
...
@@ -65,7 +65,6 @@ comments:
comment_form
:
comment
:
Commentaire
submit
:
Envoyer
edit_title
:
Modifier commentaire
create_title
:
Publier un commentaire
...
...
translations/messages.nb.yml
View file @
854f9f75
...
...
@@ -53,7 +53,6 @@ comments:
comment_form
:
comment
:
Kommentar
submit
:
Send
edit_title
:
Redigerer en kommentar
create_title
:
Poster en kommentar
...
...
translations/messages.pt_BR.yml
View file @
854f9f75
...
...
@@ -67,7 +67,6 @@ comments:
comment_form
:
comment
:
Comentar
submit
:
Enviar
edit_title
:
Alterando comentário
create_title
:
Enviando comentário
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment