[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [BP][FIX] Page Edit: Update "Cancel edit" button handling for improved...

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69fc9ff977166_3819017c22431@gitlab-sidekiq-low-urgency-cpu-bound-v2-74cfb7f9d4-7hxvn.mail>

luci pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
7bb8634b by Yves Ngalamulume at 2026-05-07T14:06:22+00:00
[BP][FIX] Page Edit: Update "Cancel edit" button handling for improved...
---
* [FIX] Page Edit: Update "Cancel edit" button handling for improved functionality in case we have the edit buttons location set to both (top and bottom)
---
* [FIX] Update cancel edit button handling for improved functionality

* [FIX] Incorrect dark color in fivealive raspberry sub-theme

* [FIX] Raspberry theme header background overridden by Bootstrap navbar color

See merge request tikiwiki/tiki!10156

See merge request tikiwiki/tiki!10157

- - - - -


1 changed file:

- templates/wiki_edit_actions.tpl


Changes:

=====================================
templates/wiki_edit_actions.tpl
=====================================
@@ -21,15 +21,15 @@
             {/if}
         {/if}
         {if $page|lower ne 'sandbox'}
-            <input type="button" id="cancelEditBtn" class="wikiaction btn btn-link" title="{tr}Cancel the edit (changes will be lost).{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">
+            <input type="button" class="wikiaction btn btn-link cancelEditBtn" title="{tr}Cancel the edit (changes will be lost).{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">
             {jq}
-                $("#cancelEditBtn").on('click', function () {
-                const rootPath = '{{$rootPath}}';
-                const parentForm = $(this).closest('form');
-                const actionUrl = rootPath+parentForm.attr('action');
-                const cancelUrl = new URL(actionUrl);
-                cancelUrl.searchParams.set('cancel_edit', 1);
-                window.location.href = cancelUrl.toString();
+                $(".cancelEditBtn").off('click.cancelEdit').on('click.cancelEdit', function () {
+                    const rootPath = '{{$rootPath}}';
+                    const parentForm = $(this).closest('form');
+                    const actionUrl = rootPath + parentForm.attr('action');
+                    const cancelUrl = new URL(actionUrl);
+                    cancelUrl.searchParams.set('cancel_edit', 1);
+                    window.location.href = cancelUrl.toString();
                 });
             {/jq}
         {/if}



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7bb8634bebdd5b381de5caf9a62e71e85b123ab6

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7bb8634bebdd5b381de5caf9a62e71e85b123ab6
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.