{% if page.petition.intro.size > 0 %}
{{ page.petition.intro }}
{% endif %} {% if page.petition.content.size > 0 %}
{{ page.petition.content }}
{% endif %} {% if page.petition.is_signed? %} {% include "form_greeting" greeting: "thanks for signing!" %} {% elsif request.sorta_logged_in? %} {% include "form_greeting" greeting: "will you sign?" %} {% else %}
Will you sign?
{% endif %} {% if page.petition.has_goal? %}
{% include "progress" percent: page.petition.percent_of_goal, count: page.petition.signatures_count, goal: page.petition.goal, label: page.petition.signature_name | pluralize %}
{% endif %} {% if page.show_social_slider? and page.public_activities_count > 0 %} {% include "social_slider" %} {% endif %} {% if page.petition.is_signed? %} {% form_for petition_signature %}
{% error_messages_for petition_signatures %}
{% if page.is_commentable? %}
{% text_area "content", class:"form-control autogrow overflow-hidden" %}
{% endif %} {% if page.petition.is_image? %} {% unless page.petition.current_signature.has_image? %}
{% if page.petition.require_image? %} {% file_field "image", class:"custom-file-input file sr-only", required:"required" %} {% else %} {% file_field "image", class:"custom-file-input file sr-only" %} {% endif %}
{% endunless %} {% endif %} {% if show_custom_fields %}
{% include "custom_fields" %}
{% endif %}
{% if page.is_commentable? %} {% capture signature_name %}Update {{ page.petition.signature_name }}{% endcapture %} {% submit_tag signature_name, class:"btn btn-primary submit-button" %}   {% endif %} {% capture signature_name %}Remove {{ page.petition.signature_name }}{% endcapture %} {{ page.petition.current_signature | delete_link message: signature_name class_name: "destroy-link"}}
{% endform_for %} {% else %} {% form_for petition_signature %}
{% error_messages_for petition_signature %}
{% if request.sorta_logged_in? == false or request.current_signup.has_name? == false %}
{% text_field "first_name", class:"form-control", required:"required" %}
{% text_field "last_name", class:"form-control", required:"required" %}
{% endif %} {% if request.sorta_logged_in? == false %}
{% email_field "email", class:"form-control", required:"required" %}
{% if site.ask_for_mobiles? %}
{% phone_field "mobile_number", class:"form-control" %}
{% endif %}
{% unless page.show_consent_form? %}
{% check_box "email_opt_in", class:"custom-control-input" %}
{% if site.ask_for_mobiles? %}
{% check_box "mobile_opt_in", class:"custom-control-input" %}
{% endif %}
{% endunless %} {% endif %} {% if page.petition.is_phone? %}
{% if page.petition.require_phone? %} {% phone_field "phone_number", class:"form-control", required:"required" %} {% else %} {% phone_field "phone_number", class:"form-control" %} {% endif %}
{% endif %} {% if page.petition.is_address? %} {% if request.sorta_logged_in? == false or request.current_signup.has_full_address? == false %}
{% if page.petition.require_address? %} {% text_field "submitted_address", class:"form-control", required: "required" %} {% else %} {% text_field "submitted_address", class:"form-control" %} {% endif %}
{% select_field "country_code", page.petition.countries, "code", "name", class:"custom-select" %}
{% endif %} {% endif %} {% if page.is_commentable? %}
{% text_area "content", class:"form-control autogrow overflow-hidden" %}
{% endif %} {% if page.petition.is_image? %}
{% if page.petition.require_image? %} {% file_field "image", class:"custom-file-input file sr-only", required:"required" %} {% else %} {% file_field "image", class:"custom-file-input file sr-only" %} {% endif %}
{% endif %} {% if page.petition.is_volunteer? and site.ask_for_volunteers? %} {% if request.sorta_logged_in? == false or request.current_signup.is_volunteer == false %}
{% check_box "is_volunteer", class:"custom-control-input checkbox" %}
{% endif %} {% endif %} {% if site.ask_to_publish_to_stream? %}
{% check_box "is_private", class:"custom-control-input checkbox" %}
{% else %} {% endif %} {% if show_custom_fields %}
{% include "custom_fields" %}
{% endif %} {% if page.show_consent_form? %} {% include "consent_form" %} {% endif %}
{% capture signature_name %}Add your {{ page.petition.signature_name }}{% endcapture %} {% submit_tag signature_name, class:"btn btn-primary submit-button" %}
{% if page.text_keyword_instructions.size > 0 %}

or {{ page.text_keyword_instructions }}

{% endif %}
{% endform_for %} {% endif %} {% if page.petition.is_image? %} {% assign image_count = 0 %} {% for signature in page.petition.signatures_with_images %} {% if signature.has_image? %} {% assign image_count = image_count | plus:1 %} {% endif %} {% endfor %} {% if image_count > 0 %} {% endif %} {% endif %} {% if page.tags_count > 0 %}
{% include "page_tags" with page %}
{% endif %} {% include "like_page" %}