Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/afArrayField/afArrayField.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
data-autoform-field="{{atts.name}}"
data-autoform-minCount="{{atts.minCount}}"
data-autoform-maxCount="{{atts.maxCount}}">
Add <i class="mdi-content-add"></i>
Add <i class="material-icons">add</i>
</button>
{{/if}}
</div>
Expand All @@ -26,7 +26,7 @@
{{#if afArrayFieldHasMoreThanMinimum name=../atts.name minCount=../atts.minCount maxCount=../atts.maxCount}}
<div class="collection-item">
<button type="button" class="btn autoform-remove-item">
Remove <span class="mdi-content-clear"></span>
Remove <i class="material-icons">clear</i>
</button>
</div>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion components/afFormGroup/afFormGroup.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{/if}}
{{#if afFieldIsInvalid name=this.name}}
<div class="red-text">
<i class="mdi-alert-warning"></i> {{{afFieldMessage name=this.name}}}
<i class="material-icons">warning</i> {{{afFieldMessage name=this.name}}}
</div>
{{/if}}
</div>
Expand Down
1 change: 1 addition & 0 deletions components/afFormGroup/afFormGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 2 additions & 6 deletions inputTypes/select-multiple/select-multiple.js
Original file line number Diff line number Diff line change
@@ -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);
14 changes: 8 additions & 6 deletions utilities/option-atts.js
Original file line number Diff line number Diff line change
@@ -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;
};