DmitrMakeev commited on
Commit
ca915e1
·
verified ·
1 Parent(s): 92bf419

Update nutri_call.html

Browse files
Files changed (1) hide show
  1. nutri_call.html +7 -28
nutri_call.html CHANGED
@@ -551,24 +551,7 @@ legend {
551
  text-align: right;
552
  }
553
  </style>
554
- <style>
555
- .btn {
556
- padding: 10px 20px;
557
- border: none;
558
- border-radius: 5px;
559
- cursor: pointer;
560
- }
561
-
562
- .btn-success {
563
- background-color: #28a745;
564
- color: white;
565
- }
566
 
567
- .btn-danger {
568
- background-color: #dc3545;
569
- color: white;
570
- }
571
- </style>
572
 
573
 
574
  <body>
@@ -1649,6 +1632,8 @@ document.getElementById("save-profile").addEventListener("click", async function
1649
  showCancelButton: true,
1650
  confirmButtonText: "Сохранить",
1651
  cancelButtonText: "Отмена",
 
 
1652
  inputValidator: (value) => {
1653
  if (!value) {
1654
  return "Название профиля не может быть пустым!";
@@ -1710,21 +1695,15 @@ document.getElementById("delete-profile").addEventListener("click", async functi
1710
  }
1711
 
1712
  // Показываем SweetAlert2 для подтверждения удаления
1713
- const swalWithBootstrapButtons = Swal.mixin({
1714
- customClass: {
1715
- confirmButton: "btn btn-success",
1716
- cancelButton: "btn btn-danger"
1717
- },
1718
- buttonsStyling: false
1719
- });
1720
-
1721
- const result = await swalWithBootstrapButtons.fire({
1722
  title: "Вы уверены?",
1723
  text: "Это действие нельзя отменить!",
1724
  icon: "warning",
1725
  showCancelButton: true,
1726
  confirmButtonText: "Да, удалить!",
1727
  cancelButtonText: "Нет, отмена!",
 
 
1728
  reverseButtons: true
1729
  });
1730
 
@@ -1744,14 +1723,14 @@ document.getElementById("delete-profile").addEventListener("click", async functi
1744
  }
1745
 
1746
  // Показываем сообщение об успешном удалении
1747
- swalWithBootstrapButtons.fire({
1748
  title: "Удалено!",
1749
  text: "Профиль успешно удалён.",
1750
  icon: "success"
1751
  });
1752
  } else if (result.dismiss === Swal.DismissReason.cancel) {
1753
  // Показываем сообщение об отмене
1754
- swalWithBootstrapButtons.fire({
1755
  title: "Отменено",
1756
  text: "Профиль не был удалён.",
1757
  icon: "error"
 
551
  text-align: right;
552
  }
553
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
554
 
 
 
 
 
 
555
 
556
 
557
  <body>
 
1632
  showCancelButton: true,
1633
  confirmButtonText: "Сохранить",
1634
  cancelButtonText: "Отмена",
1635
+ confirmButtonColor: "#28a745", // Зелёная кнопка
1636
+ cancelButtonColor: "#dc3545", // Красная кнопка
1637
  inputValidator: (value) => {
1638
  if (!value) {
1639
  return "Название профиля не может быть пустым!";
 
1695
  }
1696
 
1697
  // Показываем SweetAlert2 для подтверждения удаления
1698
+ const result = await Swal.fire({
 
 
 
 
 
 
 
 
1699
  title: "Вы уверены?",
1700
  text: "Это действие нельзя отменить!",
1701
  icon: "warning",
1702
  showCancelButton: true,
1703
  confirmButtonText: "Да, удалить!",
1704
  cancelButtonText: "Нет, отмена!",
1705
+ confirmButtonColor: "#dc3545", // Красная кнопка
1706
+ cancelButtonColor: "#28a745", // Зелёная кнопка
1707
  reverseButtons: true
1708
  });
1709
 
 
1723
  }
1724
 
1725
  // Показываем сообщение об успешном удалении
1726
+ Swal.fire({
1727
  title: "Удалено!",
1728
  text: "Профиль успешно удалён.",
1729
  icon: "success"
1730
  });
1731
  } else if (result.dismiss === Swal.DismissReason.cancel) {
1732
  // Показываем сообщение об отмене
1733
+ Swal.fire({
1734
  title: "Отменено",
1735
  text: "Профиль не был удалён.",
1736
  icon: "error"