Make WCAG2AA the default standard when adding URL

This commit is contained in:
Rowan Manning
2013-09-17 09:02:48 +01:00
parent 259d41f2aa
commit 366c887086
2 changed files with 7 additions and 2 deletions

View File

@@ -8,8 +8,14 @@ module.exports = route;
function route (app) { function route (app) {
app.express.get('/new', function (req, res) { app.express.get('/new', function (req, res) {
var standards = getStandards().map(function (standard) {
if (standard.title === 'WCAG2AA') {
standard.selected = true;
}
return standard;
});
res.render('new', { res.render('new', {
standards: getStandards() standards: standards
}); });
}); });

View File

@@ -27,7 +27,6 @@
<div class="col-md-4"> <div class="col-md-4">
<label class="control-label" for="new-task-standard">Standard</label> <label class="control-label" for="new-task-standard">Standard</label>
<select data-role="new-task-select" class="form-control" id="new-task-standard" name="standard"> <select data-role="new-task-select" class="form-control" id="new-task-standard" name="standard">
<option value="">Select a standard</option>
{{#standards}} {{#standards}}
<option {{#selected}}selected{{/selected}}>{{title}}</option> <option {{#selected}}selected{{/selected}}>{{title}}</option>
{{/standards}} {{/standards}}