project_form.hbs
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li>项目信息</li>
</ul>
<h4>项目信息</h4>
</div>
</div>
<!-- media -->
</div>
<!-- pageheader -->
<div class="panel panel-default">
<div class="panel-heading">
<p>请配置项目信息.</p>
</div>
<form action="/projects/save" method="POST" data-pjax>
<input type="hidden" name="_id" value="{{project._id}}">
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<h5 class="lg-title mb10">基本信息</h5>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label">Name</label>
<input type="text" name="name" value="{{project.name}}" class="form-control"
placeholder="项目名称, 须和gitlab中的名称一致">
</div>
<!-- form-group -->
</div>
<!-- col-sm-6 -->
<div class="col-sm-6">
<div class="form-group">
<label class="control-label">Name</label>
<input type="text" name="subname" value="{{project.subname}}" class="form-control"
placeholder="项目名称,ex: 前端wap版">
</div>
<!-- form-group -->
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label">Repository Url</label>
<input type="text" name="gitlab" value="{{project.gitlab}}" class="form-control"
placeholder="Gitlab 地址">
</div>
</div>
</div>
</div>
<!-- panel-body -->
<div class="panel-footer">
<button type="submit" class="btn btn-primary">保存</button>
<button type="button" class="btn btn-default ml20 go-back">取消</button>
</div>
</form>
<!-- panel-footer -->
</div>
<script>
$(function() {
$(document.body).off().on('submit', 'form[data-pjax]', function(event) {
event.preventDefault(); // stop default submit behavior
$.pjax.submit(event, '#pjax-container', {
type: 'POST'
});
});
$('.go-back').click(function() {
window.history.go(-1);
});
});
</script>