From d8ce385929be5f702c7b8ffd1199372f591f03f4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 15 Dec 2021 11:52:46 -0800 Subject: [PATCH] Fixes #4631 - Edit button modal caption and submit button issue. --- e107_handlers/form_handler.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 5c960c0f1..0fe5c1607 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -5056,13 +5056,9 @@ var_dump($select_options);*/ $eModalCap = null; } - if (!empty($parms['modalSubmit'])) - { - $eModalCap .= " data-modal-submit='true'"; - } - $query = http_build_query($query); - $text .= "attributes([ + + $att = [ 'href' => e_SELF . "?$query", 'class' => "btn btn-default btn-secondary$eModal", 'data-modal-caption' => $eModalCap, @@ -5070,8 +5066,14 @@ var_dump($select_options);*/ 'data-toggle' => 'tooltip', 'data-bs-toggle' => 'tooltip', 'data-placement' => 'left', - ]) . "> - " . $editIconDefault . ''; + ]; + + if (!empty($parms['modalSubmit'])) + { + $att['data-modal-submit'] = 'true'; + } + + $text .= 'attributes($att) . '>' . $editIconDefault . ''; } $delcls = !empty($attributes['noConfirm']) ? ' no-confirm' : '';