

<div class="controlpanel text-center">
    <form method="post" action="/analyse_intervention">
     <div class="input-group" style="margin: 20 auto; width: 680px;">
     <table>
      <tr><th colspan=2>Problem Details</th> <th colspan=4>Intervention</th><th></th></tr>
      <tr><td></td> <td></td>
          <th>Cost</th> <th></th> <th>Success</th> <th>Backfire</th> <th></th></tr>
      <tr>
          <td>Cases</td>
          <td><input type="text" class="form-control" size="20" value='{{ cases }}' name='cases'></td>
          <td><input type="text" class="form-control" size="20" value='{{ cost }}' name='cost'></td>
          <td>Probability</td>
          <td><input type="text" class="form-control" size="10" value='{{ succrate }}' name='succrate'></td>
          <td><input type="text" class="form-control" size="10" value='{{ backfire }}' name='backfire'></td>
          <td></td>
      </tr>
      <tr>
          <td>Baserate</td>
          <td><input type="text" class="form-control" size="20" value='{{ baserate }}' name='baserate'></td>
          <td></td>
          <td>Impact</td>
          <td><input type="text" class="form-control" size="20" value='{{ payoff }}' name='payoff'></td>
          <td><input type="text" class="form-control" size="20" value='{{ payback }}' name='payback'></td>
          <td></td>
      </tr>

      <tr>
          <td>Min ROI</td>
          <td><input type="text" class="form-control" size="20" value='{{ minroi }}' name='minroi'></td>
          <td colspan=3></td>
          <td><button id="update_button" type="submit" class="btn btn-danger">Update</button></td>
      </tr>
     </table>


     </table>
    </div>
  </form>
 <div id="placeholder" style="margin: 10 auto; width: 680px;"></div>
</div>

<script>
  bootstrap_alert = function(message) {
    $('#placeholder').html(
      '<div class="alert alert-warning"><a class="close" data-dismiss="alert">×</a><span>'+message+'</span></div>');
   }
   $('#update_button').on('click', function() {bootstrap_alert('Please be patient, this can take a while.');
});
</script>

