Add markup and stying to add new url form

This commit is contained in:
perryharlock
2013-09-16 16:42:53 +01:00
parent 1e7608eba3
commit 46ea32582c
3 changed files with 41 additions and 34 deletions

View File

@@ -243,7 +243,7 @@ ul {
} }
.standards-lists { .standards-lists {
height:200px; height:300px;
overflow:hidden; overflow:hidden;
overflow-y:auto; overflow-y:auto;
margin-bottom:15px; margin-bottom:15px;

View File

@@ -2,7 +2,7 @@ $(document).ready(function(){
var data = {}; var data = {};
var standardsList = $('[data-role="standards-list"]'); var standardsList = $('[data-role="standards-list"]');
var standardSelect = $('#selectStandard'); var standardSelect = $('[data-role="new-task-select"]');
var headingBadges = $('.heading-badges'); var headingBadges = $('.heading-badges');
var taskListSelector = $('[data-role="task-list"] a'); var taskListSelector = $('[data-role="task-list"] a');
var toTopLinks = $('[data-role="top"]'); var toTopLinks = $('[data-role="top"]');

View File

@@ -1,13 +1,11 @@
{{#content "title"}} {{#content "title"}}
Create A Task Add a new url
{{/content}} {{/content}}
<a href="/">&laquo; all tasks</a> <form class="col-md-12 col-xs-" action="/new" method="post">
<h1>Create A Task</h1> <legend>Add a new url</legend>
<form action="/new" method="post">
{{#error}} {{#error}}
<div style="color: #c00;"> <div style="color: #c00;">
@@ -15,40 +13,49 @@
</div> </div>
{{/error}} {{/error}}
<div> <div class="form-group clearfix">
<label for="new-task-url">URL</label><br/> <div class="row">
<input id="new-task-url" type="text" name="url" value="{{task.url}}"/> <div class="col-md-8">
<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}}"/>
</div>
</div>
</div> </div>
<div> <div class="form-group clearfix">
<label for="new-task-standard">Standard</label><br/> <div class="row">
<select id="new-task-standard" name="standard"> <div class="col-md-4">
<option value="">Select a standard</option> <label class="control-label" for="new-task-standard">Standard</label>
{{#standards}} <select data-role="new-task-select" class="form-control" id="new-task-standard" name="standard">
<option {{#selected}}selected{{/selected}}>{{title}}</option> <option value="">Select a standard</option>
{{/standards}} {{#standards}}
</select> <option {{#selected}}selected{{/selected}}>{{title}}</option>
{{/standards}}
</select>
</div>
</div>
</div> </div>
<div> <p class="control-label"><b>Ignore these rules</b> <a target="_blank" href="https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules">(full list of rules here)</a></p>
Ignore Rules<br/>
<div class="standards-lists">
{{#standards}} {{#standards}}
<b>{{title}}</b> <div data-role="standards-list" data-attr="{{title}}" class="form-group">
<ul> <p class="control-label"><b>{{title}} Rules</b></p>
{{#rules}} <ul class="list-unstyled">
<li> {{#rules}}
<label> <li>
<input type="checkbox" name="ignore[]" value="{{name}}" {{#ignored}}checked{{/ignored}}/> <label>
{{name}} <input type="checkbox" name="ignore[]" value="{{name}}" {{#ignored}}checked{{/ignored}}/>
</label> {{name}}
</li> </label>
{{/rules}} </li>
</ul> {{/rules}}
</ul>
</div>
{{/standards}} {{/standards}}
</div> </div>
<div> <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> Add url </button>
<input type="submit" value="Add"/>
</div>
</form> </form>