mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Added ability for comment authors to leave a URL as a separate form field
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68326 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ca4a4a9c2f
commit
709e352bbc
@ -9,7 +9,8 @@ class PageComment extends DataObject {
|
||||
"Name" => "Varchar(200)",
|
||||
"Comment" => "Text",
|
||||
"IsSpam" => "Boolean",
|
||||
"NeedsModeration" => "Boolean"
|
||||
"NeedsModeration" => "Boolean",
|
||||
"CommenterURL" => "Varchar(255)"
|
||||
);
|
||||
|
||||
static $has_one = array(
|
||||
|
@ -122,6 +122,8 @@ class PageCommentInterface extends RequestHandler {
|
||||
$fields->push(new TextField("Name", _t('PageCommentInterface.YOURNAME', 'Your name')));
|
||||
}
|
||||
|
||||
// optional commenter URL
|
||||
$fields->push(new TextField("CommenterURL", _t('PageCommentInterface.COMMENTERURL', "Your website URL")));
|
||||
|
||||
if(MathSpamProtection::isEnabled()){
|
||||
$fields->push(new TextField("Math", sprintf(_t('PageCommentInterface.SPAMQUESTION', "Spam protection question: %s"), MathSpamProtection::getMathQuestion())));
|
||||
|
@ -6,7 +6,12 @@
|
||||
<% end_if %>
|
||||
</p>
|
||||
<p class="info">
|
||||
<span><% _t('PBY','Posted by') %> $Name.XML, $Created.Nice ($Created.Ago)</span>
|
||||
<% if CommenterURL %>
|
||||
<span><% _t('PBY','Posted by') %> <a href="$CommenterURL">$Name.XML</a>, $Created.Nice ($Created.Ago)</span>
|
||||
<% else %>
|
||||
<span><% _t('PBY','Posted by') %> $Name.XML, $Created.Nice ($Created.Ago)</span>
|
||||
<% end_if %>
|
||||
|
||||
<br />
|
||||
<ul class="actionLinks">
|
||||
<% if ApproveLink %>
|
||||
|
Loading…
Reference in New Issue
Block a user