Skip to content

Commit

Permalink
Fixed modal action docs (#146)
Browse files Browse the repository at this point in the history
* Fixed modal action docs

Fixed missing variable `$templatePath` and fixed boostrap modal dom

* Use of option var instead of fixed key
  • Loading branch information
easis authored Nov 22, 2024
1 parent 2d5fb12 commit 77340b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/docs/components/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Now we can update the template of the type class to use the newly added variable
{{ label }}
</button>
<div class="modal fade" id="#action-modal-{{ name }}">
<div class="modal fade" id="action-modal-{{ name }}">
<div class="modal-dialog">
<div class="modal-content">
{{ include(template_path, template_vars) }} // [!code ++]
Expand Down Expand Up @@ -289,7 +289,7 @@ class ModalActionType extends ButtonActionType
$value = $view->parent->vars['value']; // [!code ++]

foreach (['template_path', 'template_vars'] as $optionName) { // [!code ++]
if (is_callable($templatePath)) { // [!code ++]
if (is_callable($options[$optionName])) { // [!code ++]
$options[$optionName] = $options[$optionName]($value); // [!code ++]
} // [!code ++]
} // [!code ++]
Expand Down Expand Up @@ -568,4 +568,4 @@ If `FormActionType` is used, the scripts will append hidden inputs with selected
```html
<input type="hidden" name="product_id[]" value="1">
<input type="hidden" name="category_id[]" value="4">
```
```

0 comments on commit 77340b0

Please sign in to comment.