Skip to content

Commit

Permalink
do not track changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Dec 16, 2021
1 parent c03b8ce commit 4c6f9af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ This feature require my [cms-actions](https://github.com/lekoala/silverstripe-cm
$actions = parent::getCMSActions();
$doDeny = new PureModalAction("doDeny", "Deny");
$predefinedText = <<<TEXT
Dear Customer,
Dear Customer,

Your request has been denied.
Your request has been denied.

Best regards,
TEXT;
Best regards,
TEXT;
$iframeFields = new FieldList([
new DropdownField("SelectReason", "Select reason"),
new TextareaField("EnterText", "Enter custom text", $predefinedText),
Expand Down
3 changes: 3 additions & 0 deletions src/PureModalAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public function getFieldList()
public function setFieldList(FieldList $fieldList)
{
$this->fieldList = $fieldList;
foreach ($fieldList->dataFields() as $f) {
$f->addExtraClass('no-change-track');
}
return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/LeKoala/PureModal/PureModal.ss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$Title
</label>
<div class="pure-modal from-top">
<input id="$ModalID" class="checkbox" type="checkbox">
<input id="$ModalID" class="checkbox no-change-track" type="checkbox">
<div class="pure-modal-overlay">
<label for="$ModalID" class="pure-modal-close"></label>
<div class="pure-modal-wrap">
Expand Down
2 changes: 1 addition & 1 deletion templates/LeKoala/PureModal/PureModalAction.ss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$ButtonTitle
</label>
<div class="pure-modal from-top">
<input id="$ModalID" class="checkbox" type="checkbox">
<input id="$ModalID" class="checkbox no-change-track" type="checkbox">
<div class="pure-modal-overlay">
<div class="pure-modal-wrap pure-modal-action fill-height" style="max-height:90vh;">
<label for="$ModalID" class="pure-modal-close"></label>
Expand Down

0 comments on commit 4c6f9af

Please sign in to comment.