Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cwp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
cwp
cwp
Commits
4d83481e
Commit
4d83481e
authored
Mar 16, 2017
by
Robbie Averill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX Remove double (required) label, add translations to the text
parent
749dca73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
code/extensions/CwpCommentingExtension.php
code/extensions/CwpCommentingExtension.php
+6
-12
No files found.
code/extensions/CwpCommentingExtension.php
View file @
4d83481e
...
...
@@ -9,23 +9,17 @@ class CwpCommentingExtension extends Extension {
public
function
alterCommentForm
(
Form
$form
)
{
$fields
=
$form
->
Fields
();
// Set field names and descriptions
if
(
$nameField
=
$fields
->
dataFieldByName
(
'Name'
))
{
$nameField
->
setTitle
(
'Name'
)
->
setDescription
(
'(required)'
);
}
if
(
$emailField
=
$fields
->
dataFieldByName
(
'Email'
))
{
if
(
$emailField
=
$fields
->
dataFieldByName
(
'Email'
))
{
$emailField
->
setTitle
(
'Email'
)
->
setDescription
(
'will not be published (required)'
);
->
setTitle
(
_t
(
'CwpCommentingExtension.EMAIL_TITLE'
,
'Email'
)
)
->
setDescription
(
_t
(
'CwpCommentingExtension.WILL_NOT_BE_PUBLISHED'
,
'Will not be published.'
)
);
}
if
(
$urlField
=
$fields
->
dataFieldByName
(
'URL'
))
{
if
(
$urlField
=
$fields
->
dataFieldByName
(
'URL'
))
{
$urlField
->
setTitle
(
'Your website (optional)'
)
->
setAttribute
(
'placeholder'
,
'http://'
);
->
setTitle
(
_t
(
'CwpCommentingExtension.WEBSITE_TITLE'
,
'Your website (optional)'
)
)
->
setAttribute
(
'placeholder'
,
'http://'
);
}
}
}
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