Add name field to "New URL" form

This commit is contained in:
Rowan Manning
2013-11-11 11:41:58 +00:00
parent 6d7ca9a58a
commit 8bd18c9078
2 changed files with 11 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ function route (app) {
app.express.post('/new', function (req, res) { app.express.post('/new', function (req, res) {
var newTask = { var newTask = {
name: req.body.name,
url: req.body.url, url: req.body.url,
standard: req.body.standard, standard: req.body.standard,
ignore: req.body.ignore || [] ignore: req.body.ignore || []

View File

@@ -18,11 +18,20 @@
</div> </div>
{{/error}} {{/error}}
<div class="form-group clearfix">
<div class="row">
<div class="col-md-8 col-sm-8 col-xs-10">
<label class="control-label" for="new-task-name">Name</label>
<input class="form-control" id="new-task-name" type="text" placeholder="E.g. My Home Page" name="name" value="{{task.name}}"/>
</div>
</div>
</div>
<div class="form-group clearfix"> <div class="form-group clearfix">
<div class="row"> <div class="row">
<div class="col-md-8 col-sm-8 col-xs-10"> <div class="col-md-8 col-sm-8 col-xs-10">
<label class="control-label" for="new-task-url">URL</label> <label class="control-label" for="new-task-url">URL</label>
<input class="form-control" id="new-task-url" type="url" placeholder="URL" name="url" value="{{task.url}}"/> <input class="form-control" id="new-task-url" type="url" placeholder="E.g. http://mysite.com/" name="url" value="{{task.url}}"/>
</div> </div>
</div> </div>
</div> </div>