{% set title %}{% trans "Name" %}{% endset %}
{% set helpText %}{% trans "The Name for this Campaign" %}{% endset %}
{{ forms.input("name", title, campaign.campaign, helpText) }}
{% set title %}{% trans "Start Date" %}{% endset %}
{% set helpText %}{% trans "Select the start date for this campaign" %}{% endset %}
{{ forms.date("startDt", title, campaign.getStartDt(), helpText, "starttime-control", "required", "") }}
{% set title %}{% trans "End Date" %}{% endset %}
{% set helpText %}{% trans "Select the end date for this campaign" %}{% endset %}
{{ forms.date("endDt", title, campaign.getEndDt(), helpText, "endtime-control", "required", "") }}
{% set title %}{% trans "Display" %}{% endset %}
{% set helpText %}{% trans "Please select one or more displays / groups for this event to be shown on." %}{% endset %}
{% set attributes = [
{ name: "data-search-url", value: url_for("displayGroup.search") },
{ name: "data-trans-groups", value: "Groups"|trans },
{ name: "data-trans-display", value: "Display"|trans },
{ name: "data-search-term", value: "displayGroup" },
{ name: "data-id-property", value: "displayGroupId" },
{ name: "data-text-property", value: "displayGroup" },
] %}
{{ forms.dropdown("displayGroupIds[]", "dropdownmulti", title, displayGroupIds, displayGroups, "displayGroupId", "displayGroup", helpText, "", "", "", "", attributes) }}
{% set title %}{% trans "Target Type" %}{% endset %}
{% set helpText %}{% trans "How would you like to set the target for this campaign?" %}{% endset %}
{% set options = [
{ id: "plays", name: "Plays"|trans },
{ id: "budget", name: "Budget"|trans },
{ id: "impressions", name: "Impressions"|trans },
] %}
{{ forms.dropdown("targetType", "single", title, campaign.targetType, options, "id", "name", helpText, "campaign-type-ad") }}
{% set title %}{% trans "Target" %}{% endset %}
{% set helpText %}{% trans "What is the target number for this Campaign over its entire playtime" %}{% endset %}
{{ forms.number("target", title, campaign.target, helpText) }}
{% if currentUser.featureEnabled("tag.tagging") %}
{% set title %}{% trans "Tags" %}{% endset %}
{% set helpText %}{% trans "Tags for this Campaign - Comma separated string of Tags or Tag|Value format. If you choose a Tag that has associated values, they will be shown for selection below." %}{% endset %}
{{ forms.inputWithTags("tags", title, campaign.tags, helpText, 'tags-with-value') }}
{% set title %}{% trans "Tag value" %}{% endset %}
{{ forms.dropdown("tagValue", "single", title, "", options, "key", "value") }}
{% set title %}{% trans "Tag value" %}{% endset %}
{% set helpText %}{% trans "Please provide the value for this Tag and confirm by pressing enter on your keyboard." %}{% endset %}
{{ forms.input("tagValueInput", title, "", helpText) }}
{% trans "This tag requires a set value, please select one from the Tag value dropdown or provide Tag value in the dedicated field." %}
{% endif %}
{{ forms.message("Add reference fields if needed"|trans) }}
{% set title %}{% trans "Reference 1" %}{% endset %}
{{ forms.input("ref1", title, campaign.ref1, null) }}
{% set title %}{% trans "Reference 2" %}{% endset %}
{{ forms.input("ref2", title, campaign.ref2, null) }}
{% set title %}{% trans "Reference 3" %}{% endset %}
{{ forms.input("ref3", title, campaign.ref3, null) }}
{% set title %}{% trans "Reference 4" %}{% endset %}
{{ forms.input("ref4", title, campaign.ref4, null) }}
{% set title %}{% trans "Reference 5" %}{% endset %}
{{ forms.input("ref5", title, campaign.ref5, null) }}
{{ forms.button("Save"|trans, "submit", null, null, null, "btn-success") }}