From 2114f5705ef8c67e022ab47e3b9466440d9539e4 Mon Sep 17 00:00:00 2001
From: Liad Yosef <liady@users.noreply.github.com>
Date: Tue, 28 Apr 2015 12:47:11 +0300
Subject: [PATCH] support "for" attribute in react templates

Add support for using "for" attribute and converting it to DOM API supported "htmlFor"
---
 src/reactTemplates.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/reactTemplates.js b/src/reactTemplates.js
index 7c4975c..30a1597 100644
--- a/src/reactTemplates.js
+++ b/src/reactTemplates.js
@@ -78,7 +78,7 @@ var reactSupportedAttributes = ['accept', 'acceptCharset', 'accessKey', 'action'
                                 'max', 'maxLength', 'media', 'mediaGroup', 'method', 'min', 'multiple', 'muted', 'name', 'noValidate', 'open', 'pattern', 'placeholder', 'poster', 'preload', 'radioGroup', 'readOnly', 'rel',
                                 'required', 'role', 'rows', 'rowSpan', 'sandbox', 'scope', 'scrolling', 'seamless', 'selected', 'shape', 'size', 'sizes', 'span', 'spellCheck', 'src', 'srcDoc', 'srcSet', 'start', 'step',
                                 'style', 'tabIndex', 'target', 'title', 'type', 'useMap', 'value', 'width', 'wmode'];
-var attributesMapping = {'class': 'className', 'rt-class': 'className'};
+var attributesMapping = {'class': 'className', 'rt-class': 'className', 'for': 'htmlFor'};
 _.forEach(reactSupportedAttributes, function (attributeReactName) {
     if (attributeReactName !== attributeReactName.toLowerCase()) {
         attributesMapping[attributeReactName.toLowerCase()] = attributeReactName;