gift-message-item-level.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. -->
  7. <!-- ko if: isActive() || hasActiveOptions() -->
  8. <button class="action action-gift"
  9. data-bind="
  10. click: $data.toggleFormBlockVisibility.bind($data),
  11. css: {_active: formBlockVisibility() || resultBlockVisibility()}
  12. ">
  13. <span data-bind="i18n: 'Gift options'"></span>
  14. </button>
  15. <div class="gift-content" data-bind="css: {_active: formBlockVisibility() || resultBlockVisibility()}"> <!-- add class "active" to display the content -->
  16. <!-- ko ifnot: resultBlockVisibility() -->
  17. <div class="gift-options">
  18. <!-- ko foreach: getRegion('additionalOptions') -->
  19. <!-- ko template: getTemplate() --><!-- /ko -->
  20. <!-- /ko -->
  21. <!-- ko template: formTemplate --><!--/ko-->
  22. </div>
  23. <!-- /ko -->
  24. <!-- ko if: resultBlockVisibility() -->
  25. <div class="gift-summary">
  26. <!-- ko foreach: getRegion('additionalOptions') -->
  27. <!--ko template: appliedTemplate --><!-- /ko -->
  28. <!-- /ko -->
  29. <!-- ko if: getObservable('message') -->
  30. <div class="gift-message-summary">
  31. <span data-bind="i18n: 'Message' + ':'"></span>
  32. <!-- ko text: getObservable('message') --><!-- /ko -->
  33. </div>
  34. <!-- /ko -->
  35. <div class="actions-toolbar">
  36. <div class="secondary">
  37. <button type="submit" class="action action-edit" data-bind="
  38. click: $data.editOptions.bind($data),
  39. attr: {title: $t('Edit')">
  40. <span data-bind="i18n: 'Edit'"></span>
  41. </button>
  42. <button class="action action-delete" data-bind="
  43. click: $data.deleteOptions.bind($data),
  44. attr: {title: $t('Delete')">
  45. <span data-bind="i18n: 'Delete'"></span>
  46. </button>
  47. </div>
  48. </div>
  49. </div>
  50. <!-- /ko -->
  51. </div>
  52. <!-- /ko -->