mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge branch '4'
This commit is contained in:
commit
c6ad8648fd
@ -110,9 +110,11 @@ class UserDefinedFormController extends PageController
|
|||||||
if ($this->Content && $form = $this->Form()) {
|
if ($this->Content && $form = $this->Form()) {
|
||||||
$hasLocation = stristr($this->Content, '$UserDefinedForm');
|
$hasLocation = stristr($this->Content, '$UserDefinedForm');
|
||||||
if ($hasLocation) {
|
if ($hasLocation) {
|
||||||
|
/** @see Requirements_Backend::escapeReplacement */
|
||||||
|
$formEscapedForRegex = addcslashes($form->forTemplate(), '\\$');
|
||||||
$content = preg_replace(
|
$content = preg_replace(
|
||||||
'/(<p[^>]*>)?\\$UserDefinedForm(<\\/p>)?/i',
|
'/(<p[^>]*>)?\\$UserDefinedForm(<\\/p>)?/i',
|
||||||
$form->forTemplate(),
|
$formEscapedForRegex,
|
||||||
$this->Content
|
$this->Content
|
||||||
);
|
);
|
||||||
return [
|
return [
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="$Class">
|
<div class="$Class">
|
||||||
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value.ATT"<% if $isChecked %>
|
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value.ATT"<% if $isChecked %>
|
||||||
checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> />
|
checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> />
|
||||||
<label for="$ID">$Title</label>
|
<label for="$ID">$Title.XML</label>
|
||||||
</div>
|
</div>
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
Loading…
Reference in New Issue
Block a user