Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 7b267a8

Browse files
authored
Merge pull request #2 from cormacmccarthy/swilliamset-w3847298-support-validation
(w3847298) add hbs driven checkbox to index page with validation stat…
2 parents a5ad40f + 374faed commit 7b267a8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<h2>Checkboxes</h2>
5959
<div class="thin-box">
6060
<section id="checkboxes-block">
61-
61+
<div id="myCheckbox1Wrapper" style="width: 300px;"></div>
6262
<div class="checkbox" id="myCheckbox">
6363
<label class="checkbox-custom" data-initialize="checkbox" id="myCustomCheckbox1">
6464
<input class="sr-only" type="checkbox" value="" />

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ define(function (require) {
3030
CHECKBOX
3131
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
3232

33+
var checkbox = require('hbs!fuelux_templates/checkbox');
34+
var $myCheckbox1Wrapper = $('#myCheckbox1Wrapper');
35+
$myCheckbox1Wrapper.html(checkbox({ id: 'myCheckbox1', required: true, validation: 'error', label: 'Checkboxes', checkboxes: [{label: 'Checkbox Label 1' }, {label: 'Checkbox Label 2' }]}));
36+
3337
// sample method buttons
3438
$('#btnCheckboxToggle').on('click', function () {
3539
$('#myCustomCheckbox1').checkbox('toggle');

0 commit comments

Comments
 (0)