/* global angular */
'use strict'; // jshint ignore:line


angular.module('lumx.text-field', [])
    .directive('lxTextField', ['$timeout', function($timeout)
    {
        return {
            restrict: 'E',
            scope: {
                label: '@',
                type: '@?',
                name: '@?',
                disabled: '&',
                error: '&',
                valid: '&',
                fixedLabel: '&',
                model: '=?'
            },
            templateUrl: 'lumx.text_field.html',
            replace: true,
            link: function(scope, element, attrs)
            {
                if (angular.isUndefined(attrs.type))
                {
                    scope.type = 'text';
                }
            }
        };
    }]);

@@ -300,24 +300,33 @@
    name: '@?
+fieldName
 ',%0A         

fix text-fields: replace "name" by "field-name"