Skip to content

Commit

Permalink
Merge pull request #5365 from nyaruka/allow-proceed-on-empty
Browse files Browse the repository at this point in the history
Allow broadcast creation with zero matches
  • Loading branch information
ericnewcomer authored Jul 9, 2024
2 parents 0a8a04e + 7e7e454 commit e18d2fa
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions templates/msgs/broadcast_create_target.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
{% load smartmin i18n %}

{% block extra-style %}
{{ block.super }}
<style>
.field_contact_search {
margin-bottom: 0 !important;
}
</style>
{{ block.super }}
<style>
.field_contact_search {
margin-bottom: 0 !important;
}
</style>
{% endblock extra-style %}
{% block extra-script %}
{{ block.super }}
<script type="text/javascript">
{
const modax = getModax();
const modalBody = modax.shadowRoot;
const queryWidget = modalBody.querySelector("temba-contact-search");
{{ block.super }}
<script type="text/javascript">
{
const modax = getModax();
const modalBody = modax.shadowRoot;
const queryWidget = modalBody.querySelector("temba-contact-search");

queryWidget.addEventListener("temba-content-changed", function(e) {
if (e.detail.reset || (e.detail.blockers && e.detail.blockers.length > 0)) {
modax.disabled = true;
} else if (e.detail.query) {
modax.disabled = e.detail.total == 0;
}
});
}
</script>
queryWidget.addEventListener("temba-content-changed", function(e) {
if (e.detail.reset || (e.detail.blockers && e.detail.blockers.length > 0)) {
modax.disabled = true;
} else if (e.detail.query) {
modax.disabled = false;
}
});
}
</script>
{% endblock extra-script %}

0 comments on commit e18d2fa

Please sign in to comment.