-
Manon Bourgognon authoredManon Bourgognon authored
validation-mixin.rst 1.84 KiB
validation-mixin
Available from version 0.16
The validation mixin creates a modal dialog before deleting or submitting data.
Used by:
Attributes
confirmation-type
It is a prerequisite and can take two options :
confirm
: to access to a basic modal dialog.dialog
: to get a<dialog>
more customizable.
confirmation-message
Message displayed in the modal dialog (confirm
ordialog
type). The message by default is "Please, confirm your choice".
The attributes below only concern ``dialog`` type.
confirmation-submit-text
Text displayed on the submit button ("Ok" by default).
confirmation-cancel-text
Text displayed on the cancel button ("Cancel" by default).
confirmation-submit-class
Submit button class name (undefined by default).
confirmation-cancel-class
Cancel button class name (undefined by default).
Some examples of the use of validation mixin attributes :
<solid-delete data-src="http://server/user/" confirmation-type="confirm" confirmation-message="Thank you to confirm the data deletion." ></solid-delete> <solid-form data-src="../data/list/events.jsonld" confirmation-type="dialog" confirmation-message="Are you sure you want to create this event ?" confirmation-submit-text="Yes, I am" confirmation-submit-class="submit-button" confirmation-cancel-class="cancel-button" ></solid-form>