Created
August 6, 2019 09:59
-
-
Save ArtemSites/29dc382ec2b7e94ace2ac8ca526fd93c to your computer and use it in GitHub Desktop.
Bitrix убрать $_GET['success'] из url и скрыть popup с фразой об успехе.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); | |
| // include_once('./phpHtmlWriter.php'); | |
| global $APPLICATION; | |
| if ($_GET['success'] != null) { | |
| echo ' | |
| <script> | |
| $(function() { | |
| $(".callback-form_success").find(".mf-ok-text").text("'.$arResult["OK_MESSAGE"]. '"); | |
| $(".callback-form_success").css("display", "flex").show(); | |
| $("html").css("cursor", "pointer"); | |
| $(window).on("click", function() { | |
| $(".callback-form_success").hide(); | |
| var url = window.location.href; | |
| url = url.split("?")[0]; | |
| console.log(url); | |
| window.history.pushState({}, document.title, url); | |
| }); | |
| }); | |
| </script> | |
| '; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .callback-form_success>.ok-text { | |
| color: #ff8d13; | |
| } | |
| .callback-form_success { | |
| box-shadow: 0 0 25px 15px rgba(0,0,0,.5); | |
| position: fixed; | |
| top: 30%; | |
| z-index: 99; | |
| height: 240px; | |
| max-width: 670px; | |
| margin: auto; | |
| left: 50%; | |
| transform: translate(-50%); | |
| width: 100%; | |
| display: none; | |
| justify-content: center; | |
| align-items: center; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment