Merge pull request #28 from scott1702/minor-tweaks

Minor UX Tweaks
This commit is contained in:
Christopher Pitt 2015-11-03 10:39:50 +13:00
commit ae7bef5449
2 changed files with 8 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class ContentReviewCMSExtension extends LeftAndMainExtension
public function reviewed($data, Form $form)
{
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"];
@ -40,12 +40,14 @@ class ContentReviewCMSExtension extends LeftAndMainExtension
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(TextareaField::create("ReviewNotes", "Review notes"));
$fields->push($reviewNotes);
$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");

View File

@ -119,9 +119,9 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
public function updateCMSActions(FieldList $actions)
{
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-text-alternate", _t("ContentReview.BUTTONREVIEWED", "Content reviewed"));
->setAttribute("data-text-alternate", _t("ContentReview.BUTTONREVIEWED", "Review content"));
$actions->push($reviewAction);
}