diff --git a/src/assets/css/tainacan-gutenberg-block-item-submission-form.css b/src/assets/css/tainacan-gutenberg-block-item-submission-form.css index 4b0be88f6..a87c920d9 100644 --- a/src/assets/css/tainacan-gutenberg-block-item-submission-form.css +++ b/src/assets/css/tainacan-gutenberg-block-item-submission-form.css @@ -139,10 +139,10 @@ display: inline-block; } .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-button { background-color: var(--tainacan-secondary, rgba(200, 200, 200, 0.3)); - padding: 0.4em 0.7em; - height: 0.95em; + padding: 0.45em 0.75em; + height: 1em; width: 10%; - max-width: 3.25em; + max-width: 3.45em; min-width: 1em; margin-left: 6px; border-radius: 3px; @@ -158,7 +158,8 @@ flex: 1 0 auto; margin: 0 2px; } .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-button.outline { - border: 2px solid var(--tainacan-input-border-color rgba(200, 200, 200, 0.3)); + margin-left: 0px !important; + border: 2px solid var(--tainacan-input-border-color, rgba(200, 200, 200, 0.3)); background-color: var(--tainacan-background-color, white); } .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-button.outline .fake-text { background-color: var(--tainacan-secondary, rgba(200, 200, 200, 0.1)); } @@ -177,6 +178,27 @@ margin-left: 0.5em; width: 24%; max-width: 4em; } + .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation { + display: flex; + align-items: center; + padding: 0.5em 0.75em 0.25em 0.75em; + border: 1px dashed var(--tainacan-input-border-color); } + .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation .fake-checkbox { + border: 2px solid var(--tainacan-info-color, rgba(200, 200, 200, 0.3)); + height: 0.875em; + width: 0.875em; + min-height: 0.875em; + min-width: 0.875em; + max-height: 0.875em; + max-width: 0.875em; + margin-right: 0.5em; + border-radius: 1px; + display: inline-block; } + .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation:hover .fake-checkbox, .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation:hover:focus .fake-checkbox, .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation:focus-within .fake-checkbox { + background-color: var(--tainacan-secondary, rgba(200, 200, 200, 0.1)); } + .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .fake-checkbox-confirmation .rich-text { + margin: 12px 0; + padding: 4px 2px; } .wp-block-tainacan-item-submission-form .item-submission-form-placeholder .documents-section { display: flex; padding: 0.5em; } diff --git a/src/assets/css/tainacan-gutenberg-block-item-submission-form.css.map b/src/assets/css/tainacan-gutenberg-block-item-submission-form.css.map index 9f9868f23..019b54fa1 100644 --- a/src/assets/css/tainacan-gutenberg-block-item-submission-form.css.map +++ b/src/assets/css/tainacan-gutenberg-block-item-submission-form.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAEA,uBAAwB;EACpB,MAAM,EAAE,kBAAkB;EAE1B,sDAA+B;IAC3B,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,oCAAmC;;AAGlD,uCAAwC;EACpC,MAAM,EAAE,QAAQ;EAGhB,0DAAmB;IACf,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,oCAAmC;EAG9C,wDAAiB;IACb,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,oCAAmC;IAC1C,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,QAAQ;EAEpB,yEAAkC;IAC9B,gBAAgB,EAAE,uCAAuC;IACzD,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,MAAM;IACtB,aAAa,EAAE,GAAG;IAClB,MAAM,E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,IAAI;QACjB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,GAAG;MAEhB,uGAAW;QACP,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,KAAK;QACjB,aAAa,EAAE,IAAI;IAG3B,8FAAqB;MACjB,OAAO,EAAE,KAAK;MACd,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;MACf,eAAe,EAAE,UAAU;IAE/B,2FAAkB;MACd,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,SAAS;MAClB,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,MAAM;MACjB,cAAc,EAAE,MAAM;MAEtB,0GAAe;QACX,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,MAAM;QAEjB,sHAAY;UACR,KAAK,EAAE,IAAI;UACX,SAAS,EAAE,IAAI;UACf,MAAM,EAAE,gBAAgB;QAE5B,uHAAe;UACX,aAAa,EAAE,sEAAoE;UACnF,aAAa,EAAE,KAAK;IAIhC,sFAAa;MACT,OAAO,EAAE,WAAW;MACpB,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,eAAe,EAAE,aAAa;MAE9B,mGAAa;QACT,gBAAgB,EAAE,oDAAkD;MAExE,mGAAa;QACT,MAAM,EAAE,KAAK", "sources": ["../../views/gutenberg-blocks/blocks/item-submission-form/style.scss"], "names": [], "file": "tainacan-gutenberg-block-item-submission-form.css" diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/block.json b/src/views/gutenberg-blocks/blocks/item-submission-form/block.json index cf899f422..f511f2d73 100644 --- a/src/views/gutenberg-blocks/blocks/item-submission-form/block.json +++ b/src/views/gutenberg-blocks/blocks/item-submission-form/block.json @@ -138,6 +138,14 @@ "helpInfoBellowLabel": { "type": "Boolean", "default": false + }, + "showTermsAgreementCheckbox": { + "type": "Boolean", + "default": false + }, + "termsAgreementMessage": { + "type": "String", + "default": "I agree to submit this item information." } }, "supports": { diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js b/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js index 8e8fd69e6..052f1ec12 100644 --- a/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js +++ b/src/views/gutenberg-blocks/blocks/item-submission-form/deprecated.js @@ -1,6 +1,217 @@ const { __ } = wp.i18n; export default [ + /* Deprecated on Tainacan 0.18.7, due to the addition of showTermsAgreementCheckbox */ + { + "attributes": { + "collectionId": { + "type": "String", + "default": "" + }, + "isCollectionModalOpen": { + "type": "Boolean", + "default": false + }, + "hideFileModalButton": { + "type": "Boolean", + "default": false + }, + "hideTextModalButton": { + "type": "Boolean", + "default": false + }, + "hideLinkModalButton": { + "type": "Boolean", + "default": false + }, + "hideThumbnailSection": { + "type": "Boolean", + "default": false + }, + "hideAttachmentsSection": { + "type": "Boolean", + "default": false + }, + "hideHelpButtons": { + "type": "Boolean", + "default": false + }, + "hideMetadataTypes": { + "type": "Boolean", + "default": false + }, + "showAllowCommentsSection": { + "type": "Boolean", + "default": false + }, + "hideCollapses": { + "type": "Boolean", + "default": false + }, + "backgroundColor": { + "type": "Object", + "default": { "r": 255, "g": 255, "b": 255, "a": 0 } + }, + "baseFontSize": { + "type": "Number", + "default": 16 + }, + "inputColor": { + "type": "String", + "default": "#1d1d1d" + }, + "inputBackgroundColor": { + "type": "String", + "default": "#ffffff" + }, + "inputBorderColor": { + "type": "String", + "default": "#dbdbdb" + }, + "labelColor": { + "type": "String", + "default": "#454647" + }, + "infoColor": { + "type": "String", + "default": "#555758" + }, + "primaryColor": { + "type": "String", + "default": "#d9eced" + }, + "secondaryColor": { + "type": "String", + "default": "#298596" + }, + "enabledMetadata": { + "type": "Array", + "default": [] + }, + "collectionMetadata": { + "type": "Array", + "default": [] + }, + "isLoadingCollectionMetadata": { + "type": "Boolean", + "default": false + }, + "sentFormHeading": { + "type": "String", + "default": "Form submitted!" + }, + "sentFormMessage": { + "type": "String", + "default": "Thank you. Your item was submitted to the collection." + }, + "documentSectionLabel": { + "type": "String", + "default": "Document" + }, + "attachmentsSectionLabel": { + "type": "String", + "default": "Attachments" + }, + "thumbnailSectionLabel": { + "type": "String", + "default": "Thumbnail" + }, + "metadataSectionLabel": { + "type": "String", + "default": "Metadata" + }, + "showItemLinkButton": { + "type": "Boolean", + "default": false + }, + "itemLinkButtonLabel": { + "type": "String", + "default": "Go to the item page" + }, + "helpInfoBellowLabel": { + "type": "Boolean", + "default": false + } + }, + "supports": { + "align": ["full", "wide"], + "html": true, + "multiple": false + }, + save({ attributes, className }) { + const { + collectionId, + backgroundColor, + hideFileModalButton, + hideTextModalButton, + hideLinkModalButton, + hideThumbnailSection, + hideAttachmentsSection, + showAllowCommentsSection, + hideHelpButtons, + hideMetadataTypes, + hideCollapses, + documentSectionLabel, + thumbnailSectionLabel, + attachmentsSectionLabel, + metadataSectionLabel, + baseFontSize, + inputColor, + inputBackgroundColor, + inputBorderColor, + labelColor, + infoColor, + primaryColor, + secondaryColor, + enabledMetadata, + sentFormHeading, + sentFormMessage, + showItemLinkButton, + itemLinkButtonLabel, + helpInfoBellowLabel + } = attributes; + + return
+
+
+
+ } + }, /* Deprecated on Tainacan 0.18.4, due to the new block.json strategy */ { attributes: { diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js b/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js index 95db62792..90ba69999 100644 --- a/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js +++ b/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js @@ -15,7 +15,7 @@ const { PanelBody } = wp.components; -const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); +const { InspectorControls, BlockControls, RichText, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); import tainacan from '../../js/axios.js'; import CollectionModal from '../faceted-search/collection-modal.js'; @@ -54,9 +54,13 @@ export default function ({ attributes, setAttributes, className, isSelected, cli metadataSectionLabel, showItemLinkButton, itemLinkButtonLabel, - helpInfoBellowLabel + helpInfoBellowLabel, + showTermsAgreementCheckbox, + termsAgreementMessage } = attributes; + const blockProps = useBlockProps(); + const fontSizes = [ { name: __( 'Tiny', 'tainacan' ), @@ -371,6 +375,20 @@ export default function ({ attributes, setAttributes, className, isSelected, cli } /> + + { + showTermsAgreementCheckbox = isChecked; + setAttributes({ showTermsAgreementCheckbox: isChecked }); + } + } + /> + + { showTermsAgreementCheckbox ? +
+ + setAttributes( { termsAgreementMessage: inputContent } ) } + placeholder={ __( 'Type here a message requiring the user to agree with certain conditions.' ) } + /> +
+ : null + } +