Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

feat(component): add form-errors custom element #108

Closed
wants to merge 3 commits into from

Conversation

bas080
Copy link
Contributor

@bas080 bas080 commented Feb 6, 2017

Add a globalized form-errors component. Also adds the association-select's type bindable.

<template>
<p class="help-block" repeat.for="message of messages">${message}</p>
</template>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline.

<template>
<p repeat.for="message of messages">${message}</p>
</template>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline.

src/config.js Outdated
// ValidationResult instance
errorMessage: error => error.message,
errorValid : error => error.valid

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline

constructor(config) {
this.config = config.configurations;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align consecutive assignments

<association-select
attributes.bind = "formField.element.attributes"
multiple.bind = "formField.element.multiple"
value.bind = "formField.value"
property.bind = "formField.element.property"
repository.bind = "formField.element.repository"
resource.bind = "formField.element.resource"

type.bind = "formField.element.selectType"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows for checkboxes or select type to be chose for aurelia-orm's association-select component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be best to make this part of a seperate pull request

@@ -10,7 +10,7 @@ export class FormFields {
@bindable({defaultBindingMode: bindingMode.twoWay})
model

@bindable messages
@bindable errors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semicolon (apply everywhere);

}

}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline

export class FormErrors {

@bindable
errors;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put on same line as @bindable

@RWOverdijk RWOverdijk closed this Feb 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants