submit.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @var yii\web\View $this
  4. */
  5. $this->title = '发起上线';
  6. ?>
  7. <div class="box">
  8. <form role="form" method="POST" action="/walle/submit?projectId=<?= (int)$_GET['projectId'] ?>">
  9. <div class="box-body">
  10. <div class="form-group">
  11. <label for="exampleInputEmail1">任务标题</label>
  12. <input class="form-control" id="exampleInputEmail1" placeholder="上线标题" type="name" name="title">
  13. </div>
  14. <div class="form-group">
  15. <label>版本选取</label>
  16. <select name="commit" aria-hidden="true" tabindex="-1" id="commit_history" class="form-control select2 select2-hidden-accessible">
  17. </select>
  18. </div>
  19. </div><!-- /.box-body -->
  20. <div class="box-footer">
  21. <input type="submit" class="btn btn-primary" value="提交">
  22. </div>
  23. </form>
  24. </div>
  25. <script type="text/javascript">
  26. $(function() {
  27. $.get("/walle/get-commit-history?projectId=" + <?= (int)$_GET['projectId'] ?>, function(data) {
  28. var select = '';
  29. $.each(data.data, function (key, value) {
  30. select += '<option value="' + value.id + '">' + value.message +'</option>';
  31. })
  32. $('#commit_history').append(select);
  33. });
  34. })
  35. </script>