{# templates/representative/representative_edit.html #} {% extends "template_base.html" %} {% block title %}{% if representative %}{{ representative.representative_name }}: Edit Representative{% else %}New Representative{% endif %}{% endblock %} {% block content %} {% load template_filters %} {% load humanize %} < Back to Representatives

{% if representative %}Edit Representative "{{ representative.representative_name }}"{% else %}New Representative{% endif %}

{% if error_message %}

{{ error_message }}

{% endif %}
{% csrf_token %}
{% if representative.we_vote_hosted_profile_twitter_image_url_tiny %} Unknown {% else %} Unknown {% endif %} Uploaded {% if representative.we_vote_hosted_profile_uploaded_image_url_tiny %} (delete on politician)    {% else %} (add on politician) {% endif %} {% if representative.we_vote_hosted_profile_facebook_image_url_tiny %} Facebook {% endif %} {% if representative.we_vote_hosted_profile_twitter_image_url_tiny %} Twitter {% endif %} {% if representative.we_vote_hosted_profile_vote_usa_image_url_tiny %} Vote USA {% endif %}
{% if representative %} {{ representative.we_vote_id }} (delete representative) {% else %} {{ we_vote_id }} {% endif %}
In office: 
{% if representative.politician_we_vote_id %} view politician     update representative from politician {% else %}     (match to politician) {% endif %}
{% include "office_held/is_battleground_race_year_checkboxes.html" with office_held=representative %}
{% if representative.representative_twitter_handle %}
Refresh Twitter Details
Twitter Name: {{ representative.twitter_name }}
Twitter Description: {{ representative.twitter_description }}
Twitter Location: {{ representative.twitter_location }}
Twitter Followers: {{ representative.twitter_followers_count|intcomma }}
{% endif %} {% if representative.twitter_url %}Twitter URL (from Google Civic): {{ representative.twitter_url }}{% endif %}
{% if representative.representative_twitter_handle2 %}
View on Twitter     Make Primary Handle {% endif %}
{% if representative.representative_twitter_handle3 %}
View on Twitter     Make Primary Handle {% endif %}

cancel


{% if representative %} {% if duplicate_representative_list %}

Possible Duplicate Representatives

{% for found_representative in duplicate_representative_list %} {% endfor %}
    Representative Name Office Held State Twitter Handle Website Id We Vote Id
{{ forloop.counter }} {% if found_representative.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ found_representative.representative_name }} 
compare for merge
{% if found_representative.office_held_we_vote_id %}{{ found_representative.office_held_name }} {% endif %} {{ found_representative.state_code }} {% if found_representative.representative_twitter_handle %}{{ found_representative.representative_twitter_handle }} 
({{ found_representative.twitter_followers_count|intcomma }} followers){% endif %}
{% if found_representative.representative_url %}{{ found_representative.representative_url }} {% endif %} {{ found_representative.id }} {{ found_representative.we_vote_id }}
{% endif %} {% if possible_politician_list %}

Possible Matching Politicians

{% for found_politician in possible_politician_list %} {% endfor %}
    Politician Name State Twitter Handle Website Id We Vote Id
{{ forloop.counter }} {% if found_politician.politician_photo_url %} {% endif %} {{ found_politician.politician_name }} {{ found_politician.state_code|default_if_none:"" }} {% if found_politician.politician_twitter_handle %}{{ found_politician.politician_twitter_handle }} 
({{ found_politician.twitter_followers_count|intcomma }} followers){% endif %} {% if found_politician.politician_twitter_handle2 %}
{{ found_politician.politician_twitter_handle2 }} {% endif %} {% if found_politician.politician_twitter_handle3 %}
{{ found_politician.politician_twitter_handle3 }} {% endif %} {% if found_politician.politician_twitter_handle4 %}
{{ found_politician.politician_twitter_handle4 }} {% endif %} {% if found_politician.politician_twitter_handle5 %}
{{ found_politician.politician_twitter_handle5 }} {% endif %}
{% if found_politician.politician_url %}{{ found_politician.politician_url }} {% endif %} {% if found_politician.politician_url2 %}
{{ found_politician.politician_url2 }} {% endif %} {% if found_politician.politician_url3 %}
{{ found_politician.politician_url3 }} {% endif %} {% if found_politician.politician_url4 %}
{{ found_politician.politician_url4 }} {% endif %} {% if found_politician.politician_url5 %}
{{ found_politician.politician_url5 }} {% endif %}
{{ found_politician.id }} {{ found_politician.we_vote_id }}
{% endif %} {% if representative.photo_url %} {% endif %} {% else %} {# Only show other representatives running for this office when we are entering a new representative #} {% if representative_list %}
Existing Representatives
{% for representative in representative_list %} {% endfor %}
    Representative Name State Twitter Handle Website Id We Vote Id Vote Smart Id  
{{ forloop.counter }} {% if representative.photo_url %} {% endif %} {{ representative.representative_name }} {{ representative.state_code }} {% if representative.representative_twitter_handle %}{{ representative.representative_twitter_handle }}
({{ representative.twitter_followers_count|intcomma }} followers){% endif %}
{% if representative.representative_url %}{{ representative.representative_url }}{% endif %} {{ representative.id }} {{ representative.we_vote_id }} {{ representative.vote_smart_id }} (edit)

{% else %} {# Don't display anything if there aren't any other representatives captured for this office yet #} {% endif %} {% endif %}{# End of if representative #} {% endblock %}