Skip to content

Commit

Permalink
add project to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
baijum committed Feb 25, 2015
1 parent 7bc5b87 commit 52819c0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 16 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,19 @@ <h1 class="page-header">All Items</h1>
<h1 class="page-header">New Item</h1>
<form class="form-horizontal" role="form">
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="name">Title</label>
<label class="col-sm-2 control-label" for="project">Project</label>
<div class="col-sm-10">
{{input valueBinding="project" id="project" placeholder="Project" required="true" class="form-control" }}<br />
</div>
</div>
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="title">Title</label>
<div class="col-sm-10">
{{input valueBinding="title" id="title" placeholder="Title" required="true" class="form-control" }}<br />
</div>
</div>
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="name">Description</label>
<label class="col-sm-2 control-label" for="description">Description</label>
<div class="col-sm-10">
{{textarea valueBinding="description" id="description" rows="3" placeholder="Description" required="true" class="form-control" }}
</div>
Expand Down Expand Up @@ -428,13 +434,19 @@ <h1 class="page-header">{{ title }}</h1>
<h1 class="page-header">Edit Item</h1>
<form class="form-horizontal" role="form">
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="name">Title</label>
<label class="col-sm-2 control-label" for="project">Project</label>
<div class="col-sm-10">
{{input valueBinding="project" id="project" placeholder="Project" required="true" class="form-control" }}<br />
</div>
</div>
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="title">Title</label>
<div class="col-sm-10">
{{input valueBinding="title" id="title" placeholder="Title" required="true" class="form-control" }}<br />
</div>
</div>
<div class="form-group form-group-lg">
<label class="col-sm-2 control-label" for="name">Description</label>
<label class="col-sm-2 control-label" for="description">Description</label>
<div class="col-sm-10">
{{textarea valueBinding="description" id="description" rows="3" placeholder="Description" required="true" class="form-control" }}
</div>
Expand Down
2 changes: 2 additions & 0 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ App.ItemsNewRoute = App.AuthenticatedRoute.extend({
App.ItemsNewController = Ember.Controller.extend({
actions: {
save: function() {
var project = this.get('project');
var title = this.get('title');
var description = this.get('description');
var item = this.store.createRecord('item', {
project: project,
title: title,
description: description
});
Expand Down

0 comments on commit 52819c0

Please sign in to comment.