mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Change text of reviewed content button
Added description to review notes
This commit is contained in:
parent
c50fa30a27
commit
b7acdffff2
@ -26,7 +26,7 @@ class ContentReviewCMSExtension extends LeftAndMainExtension
|
|||||||
public function reviewed($data, Form $form)
|
public function reviewed($data, Form $form)
|
||||||
{
|
{
|
||||||
if (!isset($data["ID"])) {
|
if (!isset($data["ID"])) {
|
||||||
throw new SS_HTTPResponse_Exception('No record ID', 404);
|
throw new SS_HTTPResponse_Exception("No record ID", 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = (int) $data["ID"];
|
$id = (int) $data["ID"];
|
||||||
@ -40,12 +40,14 @@ class ContentReviewCMSExtension extends LeftAndMainExtension
|
|||||||
return Security::permissionFailure($this->owner);
|
return Security::permissionFailure($this->owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = new FieldList();
|
$reviewNotes = TextareaField::create("ReviewNotes", _t("ContentReview.REVIEWNOTES", "Review notes"));
|
||||||
|
$reviewNotes->setDescription(_t("ContentReview.REVIEWNOTESDESCRIPTION ", "Add comments for the content of this page."));
|
||||||
|
$fields = new FieldList();
|
||||||
$fields->push(HiddenField::create("ID", "ID", $id));
|
$fields->push(HiddenField::create("ID", "ID", $id));
|
||||||
$fields->push(TextareaField::create("ReviewNotes", "Review notes"));
|
$fields->push($reviewNotes);
|
||||||
|
|
||||||
$actions = new FieldList(
|
$actions = new FieldList(
|
||||||
FormAction::create("save_review", "Save")
|
FormAction::create("save_review", _t("ContentReview.SAVE", "Save"))
|
||||||
);
|
);
|
||||||
|
|
||||||
$form = CMSForm::create($this->owner, "EditForm", $fields, $actions)->setHTMLID("Form_EditForm");
|
$form = CMSForm::create($this->owner, "EditForm", $fields, $actions)->setHTMLID("Form_EditForm");
|
||||||
|
@ -119,9 +119,9 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
public function updateCMSActions(FieldList $actions)
|
public function updateCMSActions(FieldList $actions)
|
||||||
{
|
{
|
||||||
if ($this->canBeReviewedBy(Member::currentUser())) {
|
if ($this->canBeReviewedBy(Member::currentUser())) {
|
||||||
$reviewAction = FormAction::create("reviewed", _t("ContentReview.BUTTONREVIEWED", "Content reviewed"))
|
$reviewAction = FormAction::create("reviewed", _t("ContentReview.BUTTONREVIEWED", "Review content"))
|
||||||
->setAttribute("data-icon", "pencil")
|
->setAttribute("data-icon", "pencil")
|
||||||
->setAttribute("data-text-alternate", _t("ContentReview.BUTTONREVIEWED", "Content reviewed"));
|
->setAttribute("data-text-alternate", _t("ContentReview.BUTTONREVIEWED", "Review content"));
|
||||||
|
|
||||||
$actions->push($reviewAction);
|
$actions->push($reviewAction);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user