function phone_click (event, phone_number) {
    //event.preventDefault();
    console.log(phone_number);
    $('#phone-' + phone_number + ' .check_btn').css(`display`,`block`);
    $('#phone-' + phone_number + ' .check_btn').html(`
      Did phone work?
        <a href="#" class="animate_custom_bounce accepted"     onclick="save_phone_vote(event, ${phone_number}, +1)">Yes</a>
        <a href="#" class="animate_custom_bounce not_working"  onclick="save_phone_vote(event, ${phone_number}, -1)" style="animation-delay: 1s;">No</a>
    `);
}

function save_phone_vote(event, phone_number, vote) {
    event.preventDefault();
    console.log(phone_number + vote);
    $('#phone-' + phone_number + ' .check_btn').html(`<div style="float:left">Thank you</div> 
    <svg style="float:left; margin-right: 10px; margin-top: -5px" width="24px" height="24px" viewBox="0 0 3.84 3.84" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--noto" preserveAspectRatio="xMidYMid meet"><path d="M0.303 0.701C0.191 0.786 0.134 1.025 0.121 1.363S0.173 1.884 0.195 1.94s0.189 0.138 0.377 0.283c0.138 0.106 1.219 0.859 1.347 0.918 0.204 0.093 0.333 -0.095 0.333 -0.095s0.108 0.062 0.212 0c0.128 -0.076 0.112 -0.17 0.112 -0.17s0.131 0.03 0.198 -0.029 0.097 -0.201 0.097 -0.201 0.088 0.04 0.164 -0.027 0.132 -0.158 0.052 -0.281 -0.403 -0.513 -0.487 -0.622 -0.3 -0.732 -0.508 -0.794 -0.413 -0.046 -0.63 0.018 -0.42 0.058 -0.661 -0.01 -0.499 -0.23 -0.499 -0.23" fill="#ffca28"/><path d="M3.699 1.23c-0.044 -0.295 -0.103 -0.496 -0.146 -0.545 -0.05 -0.055 -0.135 0.055 -0.316 0.119S2.73 0.892 2.73 0.892s-0.524 -0.015 -0.72 0.051c-0.074 0.025 -0.802 0.332 -0.824 0.46 -0.009 0.055 0.051 0.177 0.202 0.189 0.244 0.02 0.55 -0.193 0.55 -0.193 0.004 -0.006 0.04 -0.016 0.207 -0.016s0.361 0.11 0.373 0.13c0.125 0.205 0.243 0.349 0.358 0.489 0.084 0.102 0.28 0.371 0.28 0.371s0.221 -0.261 0.277 -0.322 0.265 -0.213 0.265 -0.213 0.046 -0.299 0 -0.608" fill="#ffca28"/><path d="M0.798 2.575s-0.08 0.028 -0.153 -0.076 -0.012 -0.177 0.062 -0.235 0.173 -0.087 0.231 -0.042c0.058 0.044 0.082 0.121 0.082 0.121s0.121 -0.098 0.229 -0.038 0.102 0.17 0.102 0.17 0.105 -0.064 0.216 0 0.056 0.248 0.056 0.248 0.129 0.004 0.153 0.131c0.024 0.127 -0.006 0.261 -0.151 0.286 -0.145 0.024 -0.229 -0.112 -0.229 -0.112s-0.145 0.087 -0.251 0.015 -0.095 -0.223 -0.095 -0.223 -0.13 0.022 -0.204 -0.047 -0.049 -0.197 -0.049 -0.197" fill="#ffca28"/><path d="M1.809 3.038c0.037 -0.068 0.046 -0.146 0.022 -0.21 -0.017 -0.047 -0.059 -0.106 -0.156 -0.134 0.001 -0.002 0.002 -0.003 0.003 -0.005l-0.003 -0.002c0.013 -0.039 0.016 -0.077 0.01 -0.122 -0.01 -0.071 -0.05 -0.124 -0.115 -0.149 -0.055 -0.021 -0.121 -0.019 -0.173 0.002 -0.006 -0.061 -0.035 -0.105 -0.092 -0.14 -0.113 -0.069 -0.198 -0.024 -0.25 0.006 -0.023 -0.066 -0.08 -0.099 -0.117 -0.114 -0.043 -0.017 -0.149 -0.04 -0.275 0.072l0.064 0.059c0.087 -0.074 0.151 -0.062 0.178 -0.051 0.069 0.028 0.067 0.079 0.066 0.103 0 0.023 -0.004 0.048 -0.061 0.101 -0.071 0.066 -0.121 0.066 -0.121 0.066 -0.051 0.006 -0.096 -0.032 -0.117 -0.07 -0.007 -0.013 -0.028 -0.06 0 -0.093 0.007 -0.007 0.02 -0.028 0.066 -0.065l-0.063 -0.06c-0.028 0.023 -0.062 0.061 -0.069 0.069 -0.042 0.05 -0.046 0.123 -0.01 0.19 0.03 0.056 0.091 0.109 0.165 0.116 -0.005 0.072 0.02 0.139 0.074 0.191 0.058 0.056 0.13 0.062 0.181 0.058 0.001 0.05 0.012 0.121 0.061 0.172 0.098 0.1 0.22 0.075 0.299 0.033 0.028 0.058 0.08 0.099 0.145 0.115 0.018 0.004 0.037 0.006 0.055 0.006 0.068 0 0.157 0 0.244 -0.17 -0.027 -0.017 -0.053 -0.03 -0.076 -0.043 -0.066 0.131 -0.154 0.135 -0.204 0.123 -0.045 -0.011 -0.079 -0.041 -0.094 -0.085 0.072 -0.081 0.123 -0.145 0.18 -0.235 0.064 0.013 0.105 0.043 0.122 0.087 0.014 0.039 0.009 0.088 -0.013 0.133zm-0.76 -0.275c-0.001 0 -0.093 0.032 -0.153 -0.026 -0.04 -0.039 -0.056 -0.085 -0.046 -0.139 0.109 -0.077 0.202 -0.198 0.222 -0.224 0.007 -0.004 0.099 -0.076 0.187 -0.021 0.041 0.025 0.057 0.084 0.049 0.126s-0.028 0.091 -0.107 0.176c-0.077 0.082 -0.152 0.108 -0.152 0.108m0.533 -0.077c-0.02 0.04 -0.082 0.171 -0.212 0.278 -0.015 0.012 -0.139 0.099 -0.23 0.005 -0.033 -0.034 -0.038 -0.092 -0.036 -0.13 0.061 -0.048 0.184 -0.156 0.279 -0.311 0.037 -0.042 0.109 -0.049 0.156 -0.03 0.035 0.013 0.055 0.04 0.06 0.08 0.005 0.037 0.004 0.069 -0.016 0.109" fill="#d69513"/><path d="M2.35 3.11c-0.029 0 -0.057 -0.004 -0.083 -0.014 -0.068 -0.024 -0.33 -0.224 -0.375 -0.293 -0.013 -0.02 -0.007 -0.047 0.013 -0.06 0.02 -0.013 0.047 -0.007 0.06 0.013 0.031 0.048 0.276 0.239 0.332 0.258 0.05 0.017 0.114 0.008 0.162 -0.023 0.031 -0.02 0.069 -0.058 0.075 -0.124 0.002 -0.024 0.023 -0.041 0.047 -0.039s0.041 0.023 0.039 0.047c-0.007 0.079 -0.047 0.146 -0.114 0.189a0.287 0.287 0 0 1 -0.154 0.046" fill="#d69513"/><path d="M2.665 2.915c-0.059 0 -0.123 -0.019 -0.2 -0.058 -0.095 -0.048 -0.219 -0.171 -0.31 -0.261 -0.018 -0.018 -0.035 -0.034 -0.049 -0.048 -0.017 -0.017 -0.018 -0.044 -0.001 -0.061s0.044 -0.018 0.061 -0.001c0.014 0.014 0.031 0.03 0.05 0.049 0.082 0.081 0.206 0.203 0.288 0.245 0.104 0.053 0.158 0.052 0.196 0.045 0.071 -0.014 0.116 -0.081 0.115 -0.175a0.043 0.043 0 0 1 0.086 0c0 0.136 -0.073 0.238 -0.185 0.26 -0.017 0.003 -0.035 0.005 -0.053 0.005" fill="#d69513"/><path d="M2.913 2.703c-0.023 0 -0.046 -0.004 -0.069 -0.013 -0.121 -0.047 -0.283 -0.197 -0.495 -0.457a0.043 0.043 0 0 1 0.067 -0.055c0.199 0.245 0.354 0.39 0.46 0.431 0.053 0.021 0.132 -0.009 0.179 -0.068 0.022 -0.028 0.054 -0.082 0.016 -0.141 -0.085 -0.129 -0.171 -0.234 -0.262 -0.344 -0.116 -0.142 -0.237 -0.288 -0.365 -0.499 -0.012 -0.02 -0.006 -0.047 0.014 -0.059s0.047 -0.006 0.059 0.014c0.125 0.205 0.243 0.349 0.358 0.489 0.092 0.112 0.179 0.218 0.267 0.352 0.049 0.075 0.042 0.166 -0.021 0.243 -0.048 0.059 -0.128 0.107 -0.209 0.107" fill="#d69513"/><path d="M2.989 1.766c-0.002 0 -0.003 0 -0.005 0 -0.317 -0.037 -0.477 -0.16 -0.582 -0.241 -0.052 -0.04 -0.093 -0.072 -0.132 -0.077 -0.11 -0.017 -0.22 -0.029 -0.337 0.005 -0.011 0.003 -0.044 0.019 -0.08 0.036 -0.108 0.051 -0.272 0.129 -0.392 0.142 -0.094 0.01 -0.177 -0.014 -0.236 -0.066 -0.047 -0.043 -0.074 -0.101 -0.074 -0.161 0 -0.105 0.133 -0.167 0.221 -0.208 0.048 -0.022 0.114 -0.059 0.183 -0.098 0.121 -0.068 0.259 -0.145 0.359 -0.177 0.166 -0.052 0.602 -0.068 0.742 -0.069 0.313 -0.003 0.571 -0.091 0.767 -0.192 0.008 -0.004 0.044 -0.023 0.075 -0.015 0.043 0.011 0.054 0.043 0.054 0.043 -0.214 0.128 -0.506 0.246 -0.895 0.25 -0.172 0.002 -0.572 0.02 -0.716 0.065 -0.092 0.029 -0.226 0.104 -0.343 0.17 -0.071 0.04 -0.138 0.078 -0.189 0.101 -0.051 0.024 -0.171 0.08 -0.171 0.13 0 0.035 0.017 0.071 0.046 0.097 0.04 0.036 0.1 0.052 0.169 0.045 0.106 -0.011 0.267 -0.088 0.364 -0.134 0.049 -0.023 0.075 -0.036 0.092 -0.041 0.145 -0.043 0.283 -0.022 0.374 -0.008 0.061 0.009 0.112 0.049 0.172 0.095C2.558 1.536 2.7 1.646 2.994 1.68c0.024 0.003 0.041 0.024 0.038 0.048 -0.003 0.021 -0.021 0.037 -0.043 0.037" fill="#d69513"/><path d="m3.139 2.347 -0.044 -0.065c0.034 0.018 0.11 0.004 0.207 -0.132 0.061 -0.087 0.176 -0.262 0.395 -0.352 0 0 0.017 0.083 -0.033 0.116 -0.148 0.102 -0.242 0.215 -0.292 0.286 -0.082 0.116 -0.158 0.186 -0.201 0.22 0 0 -0.005 -0.035 -0.032 -0.073" fill="#d69513"/><path d="M2.047 3.2c-0.108 0 -0.212 -0.056 -0.264 -0.085 -0.009 -0.005 -0.016 -0.009 -0.022 -0.012l0.064 -0.146s0.016 0.087 0.082 0.121c0.109 0.057 0.206 0.065 0.285 -0.04l0.069 0.052c-0.062 0.082 -0.139 0.11 -0.213 0.11" fill="#d69513"/><path d="M0.62 2.327c-0.099 -0.104 -0.22 -0.203 -0.354 -0.29 -0.007 -0.004 -0.043 -0.028 -0.061 -0.059 -0.028 -0.049 -0.021 -0.091 -0.021 -0.091 0.19 0.106 0.364 0.238 0.499 0.38z" fill="#d69513"/><path d="M1.188 1.03c-0.356 0 -0.684 -0.136 -0.92 -0.295 0 0 0.012 -0.025 0.036 -0.035 0.033 -0.015 0.058 -0.007 0.061 -0.004 0.219 0.136 0.51 0.248 0.823 0.248h0.002c0.09 0 0.21 -0.036 0.282 -0.057 0.013 -0.004 0.025 -0.007 0.036 -0.01 0.177 -0.05 0.367 -0.049 0.637 0.002l-0.016 0.085c-0.255 -0.048 -0.434 -0.049 -0.597 -0.003 -0.01 0.003 -0.022 0.006 -0.035 0.01 -0.076 0.023 -0.205 0.061 -0.307 0.061 -0.001 0 -0.002 0 -0.002 0" fill="#d69513"/><path d="M2.78 1.884s-0.024 -0.063 0.016 -0.099c0.047 -0.042 0.1 -0.027 0.136 -0.026 0 0 -0.071 -0.019 -0.162 -0.055 -0.112 -0.045 -0.19 -0.101 -0.19 -0.101s0.02 0.04 0.082 0.135c0.062 0.095 0.116 0.147 0.116 0.147" fill="#d69513"/></svg>
        <a href="#" class="close"     onclick="close_phone_vote(event, ${phone_number})">Close</a>`);
}

function close_phone_vote(event, phone_number, vote) {
    event.preventDefault();
    console.log(phone_number + vote);
    $('#phone-' + phone_number + ' .check_btn').css(`display`,`none`);
    $('#phone-' + phone_number + ' .check_btn').html(``);
}

