Add modal for new budget
This commit is contained in:
parent
725555bdc9
commit
019ffa34cd
26
templates/budget-new.html
Normal file
26
templates/budget-new.html
Normal file
@ -0,0 +1,26 @@
|
||||
{{define "budget-new"}}
|
||||
<div id="newbudgetmodal" class="modal">
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#newbudgetform').ajaxForm({
|
||||
error: function() {
|
||||
$('#errorcreatingbudget').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h3>New Budget</h3>
|
||||
<form id="newbudgetform" action="/api/v1/budget/new" method="POST">
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="text" name="name" class="form-control" placeholder="Name" />
|
||||
</div>
|
||||
|
||||
<div id="errorcreatingbudget">
|
||||
Error creating budget.
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Create" class="form-control" />
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
@ -18,10 +18,11 @@
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="budget-item">
|
||||
<a href="budgets/new">New Budget</a>
|
||||
<a data-toggle="modal" data-target="#newbudgetmodal">New Budget</a>
|
||||
<span class="time"></span>
|
||||
</div>
|
||||
</div>
|
||||
{{template "budget-new"}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
Loading…
x
Reference in New Issue
Block a user