diff --git a/components/afArrayField/afArrayField.html b/components/afArrayField/afArrayField.html
index c8568c2..52fedeb 100644
--- a/components/afArrayField/afArrayField.html
+++ b/components/afArrayField/afArrayField.html
@@ -10,7 +10,7 @@
data-autoform-field="{{atts.name}}"
data-autoform-minCount="{{atts.minCount}}"
data-autoform-maxCount="{{atts.maxCount}}">
- Add
+ Add add
{{/if}}
@@ -26,7 +26,7 @@
{{#if afArrayFieldHasMoreThanMinimum name=../atts.name minCount=../atts.minCount maxCount=../atts.maxCount}}
{{/if}}
diff --git a/components/afFormGroup/afFormGroup.html b/components/afFormGroup/afFormGroup.html
index d8e01c3..0efeed5 100644
--- a/components/afFormGroup/afFormGroup.html
+++ b/components/afFormGroup/afFormGroup.html
@@ -12,7 +12,7 @@
{{/if}}
{{#if afFieldIsInvalid name=this.name}}
- {{{afFieldMessage name=this.name}}}
+ warning {{{afFieldMessage name=this.name}}}
{{/if}}
diff --git a/components/afFormGroup/afFormGroup.js b/components/afFormGroup/afFormGroup.js
index d318215..fb6be05 100644
--- a/components/afFormGroup/afFormGroup.js
+++ b/components/afFormGroup/afFormGroup.js
@@ -46,6 +46,7 @@ Template.afFormGroup_materialize.rendered = function() {
var placeholder = _this.data.afFieldInputAtts.placeholder;
var skipActiveLabelTypes = [
'select',
+ 'select-multiple',
'checkbox',
'checkbox-group',
'boolean-checkbox',
diff --git a/inputTypes/select-multiple/select-multiple.js b/inputTypes/select-multiple/select-multiple.js
index 4a58e1f..50a299c 100644
--- a/inputTypes/select-multiple/select-multiple.js
+++ b/inputTypes/select-multiple/select-multiple.js
@@ -1,10 +1,6 @@
Template.afSelectMultiple_materialize.helpers({
+ atts: Utility.attsToggleInvalidClass,
optionAtts: Utility.optionAtts
});
-Template.afSelectMultiple_materialize.helpers({
- atts: function() {
- var atts = Utility.attsToggleInvalidClass.call(this);
- return AutoForm.Utility.addClass(atts, 'browser-default');
- }
-});
+Template.afSelectMultiple_materialize.onRendered(Utility.initializeSelect);
diff --git a/utilities/option-atts.js b/utilities/option-atts.js
index f3a3c7f..b9bdabc 100644
--- a/utilities/option-atts.js
+++ b/utilities/option-atts.js
@@ -1,11 +1,13 @@
Utility.optionAtts = function() {
- var atts, item;
- item = this;
- atts = {
- value: item.value
- };
- if (item.selected) {
+ var atts = _.pick(this, 'value');
+
+ if(this.selected) {
atts.selected = '';
}
+
+ if (!_.isEmpty(this.htmlAtts)) {
+ _.extend(atts, this.htmlAtts);
+ }
+
return atts;
};