ON/OFF or YES/NO - that is the question!

This commit is contained in:
Stian Thorgersen 2013-11-26 14:42:05 +00:00
parent a7a5156b6a
commit d20be22ab5

View file

@ -431,8 +431,8 @@ module.directive('onoffswitch', function() {
offText: '@offText' offText: '@offText'
}, },
compile: function(element, attrs) { compile: function(element, attrs) {
if (!attrs.onText) { attrs.onText = "YES"; } if (!attrs.onText) { attrs.onText = "ON"; }
if (!attrs.offText) { attrs.offText = "NO"; } if (!attrs.offText) { attrs.offText = "OFF"; }
var html = "<div class=\"onoffswitch\">" + var html = "<div class=\"onoffswitch\">" +
"<input type=\"checkbox\" data-ng-model=\"ngModel\" class=\"onoffswitch-checkbox\" name=\"" + attrs.name + "\" id=\"" + attrs.id + "\">" + "<input type=\"checkbox\" data-ng-model=\"ngModel\" class=\"onoffswitch-checkbox\" name=\"" + attrs.name + "\" id=\"" + attrs.id + "\">" +