mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
ENHANCEMENT Blog widgets now respect updateCMSFields - related to r99929
This commit is contained in:
parent
e45daff36e
commit
3198619d0b
@ -29,7 +29,7 @@ class ArchiveWidget extends Widget {
|
||||
static $description = 'Show a list of months or years in which there are blog posts, and provide links to them.';
|
||||
|
||||
function getCMSFields() {
|
||||
return new FieldSet(
|
||||
$fields = new FieldSet(
|
||||
new OptionsetField(
|
||||
'DisplayMode',
|
||||
_t('ArchiveWidget.DispBY', 'Display by'),
|
||||
@ -39,6 +39,10 @@ class ArchiveWidget extends Widget {
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function Dates() {
|
||||
|
@ -40,11 +40,15 @@ class RSSWidget extends Widget {
|
||||
}
|
||||
|
||||
function getCMSFields() {
|
||||
return new FieldSet(
|
||||
$fields = new FieldSet(
|
||||
new TextField("RSSTitle", _t('RSSWidget.CT', "Custom title for the feed")),
|
||||
new TextField("RssUrl", _t('RSSWidget.URL', "URL of the other page's RSS feed. Please make sure this URL points to an RSS feed.")),
|
||||
new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))
|
||||
);
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
function Title() {
|
||||
return ($this->RSSTitle) ? $this->RSSTitle : 'RSS Feed';
|
||||
|
@ -27,11 +27,15 @@ class TagCloudWidget extends Widget {
|
||||
static $popularities = array( 'not-popular', 'not-very-popular', 'somewhat-popular', 'popular', 'very-popular', 'ultra-popular' );
|
||||
|
||||
function getCMSFields() {
|
||||
return new FieldSet(
|
||||
$fields = new FieldSet(
|
||||
new TextField("Title", _t("TagCloudWidget.TILE", "Title")),
|
||||
new TextField("Limit", _t("TagCloudWidget.LIMIT", "Limit number of tags")),
|
||||
new OptionsetField("Sortby",_t("TagCloudWidget.SORTBY","Sort by"),array("alphabet"=>_t("TagCloudWidget.SBAL", "alphabet"),"frequency"=>_t("TagCloudWidget.SBFREQ", "frequency")))
|
||||
);
|
||||
|
||||
$this->extend('updateCMSFields', $fields);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function Title() {
|
||||
|
Loading…
Reference in New Issue
Block a user