diff --git a/app/Http/Controllers/Twill/FeeController.php b/app/Http/Controllers/Twill/FeeController.php index e2781d82c7..92bfc5e021 100644 --- a/app/Http/Controllers/Twill/FeeController.php +++ b/app/Http/Controllers/Twill/FeeController.php @@ -8,6 +8,8 @@ class FeeController extends \App\Http\Controllers\Twill\ModuleController { + protected FeeRepository $fees; + public function __construct(FeeRepository $fees) { $this->fees = $fees; diff --git a/resources/views/twill/articles/form.blade.php b/resources/views/twill/articles/form.blade.php index 11f777d9c0..f604981fc7 100644 --- a/resources/views/twill/articles/form.blade.php +++ b/resources/views/twill/articles/form.blade.php @@ -1,166 +1,155 @@ @extends('twill::layouts.form', [ + // We define the fieldsets here for sticky subnav as the user scrolls down the form 'additionalFieldsets' => [ + ['fieldset' => 'content', 'label' => 'Content'], ['fieldset' => 'sponsors', 'label' => 'Sponsors'], - ['fieldset' => 'attributes', 'label' => 'Attributes'], ['fieldset' => 'related', 'label' => 'Further Reading'], - ['fieldset' => 'side_related', 'label' => 'Sidebar Related'] + ['fieldset' => 'side_related', 'label' => 'Sidebar Related'], + ['fieldset' => 'metadata', 'label' => 'Metadata'], ] ]) @section('contentFields') - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' - ]) - - @formField('date_picker', [ - 'name' => 'date', - 'label' => 'Display date', - 'optional' => false, - 'note' => 'Required', - ]) - - @formField('select', [ - 'name' => 'layout_type', - 'label' => 'Article layout', - 'options' => $articleLayoutsList, - 'default' => '0' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Hero image', - 'name' => 'hero', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Mobile hero image', - 'name' => 'mobile_hero', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('wysiwyg', [ - 'type' => 'textarea', - 'name' => 'hero_caption', - 'label' => 'Hero image caption', - 'note' => 'Usually used for copyright', - 'maxlength' => 255, - 'toolbarOptions' => [ - 'italic', 'link', - ], - ]) - - @formField('multi_select', [ - 'name' => 'categories', - 'label' => 'Categories', - 'options' => $categoriesList, - 'placeholder' => 'Select some categories', - ]) - - @formField('input', [ - 'name' => 'subtype', - 'label' => 'Article Label' - ]) - - @formField('wysiwyg', [ - 'name' => 'heading', - 'label' => 'Header', - 'maxlength' => 255, - 'note' => 'Max 255 characters. Will be used on the article detail page.', - 'toolbarOptions' => [ - 'italic' - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'List Description', - 'maxlength' => 255, - 'note' => 'Max 255 characters. Will be used on the article landing and listing pages, and social media.', - 'toolbarOptions' => [ - 'italic' - ], - ]) + + + + + + + + + + + + + + + + + + + @include('twill.partials.authors') - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Author thumbnail', - 'name' => 'author', - 'note' => 'Minimum image width 600px' - ]) - - @formField('checkbox', [ - 'name' => 'is_unlisted', - 'label' => "Don't show this article in listings", - ]) - - @formField('checkbox', [ - 'name' => 'is_in_magazine', - 'label' => 'Assume this article is featured in a magazine issue', - ]) - - @formField('wysiwyg', [ - 'name' => 'citations', - 'label' => 'Citation', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], - ]) - - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + + + + + + + + + @php + $blocks = BlockHelpers::getBlocksForEditor([ 'paragraph', 'image', 'hr', 'artwork', 'split_block', 'gallery_new', 'link', 'video', 'quote', 'tour_stop', 'accordion', 'media_embed', 'list', 'grid', 'image_slider', 'button', 'audio_player', '360_embed', 'vtour_embed', 'mirador_embed', '3d_embed', 'feature_2x', 'membership_banner', 'layered_image_viewer', '3d_tour', 'feature_4x', 'citation', 'citation', 'mirador_modal' - ]) - ]) + ]); + @endphp + @stop @section('fieldsets') - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'sponsors', - 'name' => 'sponsors', - 'label' => 'Sponsors', - 'note' => 'Display content blocks from this sponsor', - 'max' => 1 - ]) - - - + + + + +

Use "Custom related items" to relate up to 4 articles to show on the article page. See special note on articles below.

- @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'further_reading_items', - 'endpoints' => [ +

We use Category data to determine which articles to relate. We automatically append any article related in this way to the "Related Content" section in reverse chronological order. The following articles would be shown on this article's page automatically:

@@ -179,7 +168,7 @@

If this logic is satisfactory, there's no need to add exhibitions to the "Custom related items" field. However, if you'd like to control the order of exhibitions relative to other related content, feel free to add them using the field above.

-
+ @component('twill.partials.featured-related', ['form_fields' => $form_fields, 'autoRelated' => $autoRelated, 'item' => $item]) @slot('routePrefix', 'collection.articlesPublications') diff --git a/resources/views/twill/artists/form.blade.php b/resources/views/twill/artists/form.blade.php index df90853056..f3cbb77eea 100644 --- a/resources/views/twill/artists/form.blade.php +++ b/resources/views/twill/artists/form.blade.php @@ -1,114 +1,109 @@ -@extends('twill::layouts.form') +@extends('twill::layouts.form', [ + 'additionalFieldsets' => [ + ['fieldset' => 'attributes', 'label' => 'Attributes'], + ] +]) @section('contentFields') - @formField('input', [ - 'name' => 'datahub_id', - 'label' => 'Datahub ID', - 'disabled' => true - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Hero Image', - 'name' => 'hero', - 'note' => 'Minimum image width 2000px' - ]) - - @formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'toolbarOptions' => [ - 'italic', 'link' - ], - ]) - - @formField('input', [ - 'name' => 'birth_date', - 'label' => 'Birth Date', - 'disabled' => true - ]) - - @formField('input', [ - 'name' => 'death_date', - 'label' => 'Death Date', - 'disabled' => true - ]) - - @formField('wysiwyg', [ - 'name' => 'intro', - 'label' => 'Intro', - 'toolbarOptions' => [ - 'italic', 'link', 'strike' - ], - - ]) + + + + + + + + + + + @stop @section('fieldsets') - +

These fields will be used for the homepage carousel.

- @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Carousel Image', - 'name' => 'carousel', - 'note' => 'If left blank, hero image will be used instead', - ]) - - @formField('input', [ - 'name' => 'short_name_caption', - 'label' => 'Short name qualifier', - 'note' => 'Override default of "' .$item->getApiModelFilledCached()->short_name_qualifer . '"', - ]) - - @formField('input', [ - 'name' => 'short_name_display', - 'label' => 'Short name', - 'note' => 'Override default of "' .$item->getApiModelFilledCached()->short_name . '"', - ]) -
- - + + + + + + + +

Use "Custom related items" to relate as many items as possible. No more than 12 will be shown on the artist's detail page, but all of them will be used to augment search. See special note on exhibitions below.

- @formField('browser', [ - 'name' => 'related_items', - 'endpoints' => [ +

We use CITI data to determine which exhibitions are related to each artist by checking which artworks were featured in each exhibition. We automatically append any exhibition related in this way to the "Related Content" section in reverse chronological order. The following exhibitions would be shown on this artist's page automatically:

@@ -126,23 +121,23 @@

If this logic is satisfactory, there's no need to add exhibitions to the "Custom related items" field. However, if you'd like to control the order of exhibitions relative to other related content, feel free to add them using the field above. If you'd like to ensure that certain exhibitions never show up on this artist's detail page, use the following field:

- @formField('browser', [ - 'name' => 'hidden_related_items', - 'endpoints' => [ + -
+ @include('twill.partials.meta') diff --git a/resources/views/twill/artworks/form.blade.php b/resources/views/twill/artworks/form.blade.php index 35c2d73357..95e3992717 100644 --- a/resources/views/twill/artworks/form.blade.php +++ b/resources/views/twill/artworks/form.blade.php @@ -21,65 +21,67 @@ @include('twill.partials.meta') - - @formField('input', [ - 'name' => 'datahub_id', - 'label' => 'Datahub ID', - 'disabled' => true - ]) - + + + - + - + - +

This functionality is meant to support super-resolution images. It is a work-around for the 3000-pixel limit on images coming from our DAMS. If you upload an image here, it will replace the primary zoomable image for the artwork on the website.

- @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => true, - 'label' => 'Custom image', - 'name' => 'iiif', - 'note' => 'Minimum image width 3000px' - ]) + - @formField('checkbox', [ - 'name' => 'force_iiif_regenerate', - 'label' => 'Force tile regeneration', - 'default' => false, - ]) +

This checkbox is meant as a fail-safe. If for some reason, you see missing tiles when you zoom and pan around the deep-zoom viewer, check this option and re-publish. There's no need to use it under normal circumstances. Please note that it may take up to 10 minutes to generate tiles.

-
+ - - @formField('files', [ - 'name' => 'image_sequence_file', - 'label' => 'Image Sequence Zip', - 'note' => 'Upload a .zip file' - ]) - + + + - +

Add a Mirador modal to the artwork page by either checking the box below to use the default manifest file or uploading your own.

- @formField('checkbox', [ - 'name' => 'default_manifest_url', - 'label' => 'Use default manifest file.', - 'note' => 'i.e. ' . config('api.public_uri') . '/api/v1/artworks/' . $item->datahub_id . '/manifest.json', - 'default' => false, - ]) - @formField('files', [ - 'name' => 'upload_manifest_file', - 'label' => 'Alternative manifest file', - 'note' => 'Upload a .json file' - ]) - @formField('radios', [ - 'name' => 'default_view', - 'label' => 'Default View', - 'default' => 'single', - 'inline' => true, - 'options' => [ + + @php + $note = 'i.e. ' . config('api.public_uri') . '/api/v1/artworks/' . $item->datahub_id . '/manifest.json'; + @endphp + + + +
- +

When the work of art is itself a website, enter its information here.

- @formField('input', [ - 'name' => 'artwork_website_url', - 'label' => 'Artwork website URL', - ]) -
+ + @stop @push('vuexStore') diff --git a/resources/views/twill/authors/create.blade.php b/resources/views/twill/authors/create.blade.php index d6eab28579..b0f1d635da 100644 --- a/resources/views/twill/authors/create.blade.php +++ b/resources/views/twill/authors/create.blade.php @@ -1,12 +1,10 @@ @include('twill.partials.create') -@formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Description', - 'maxlength' => 1000, - 'type' => 'textarea', - 'rows' => 6, - 'toolbarOptions' => [ - 'bold', 'italic', 'link' - ], -]) + diff --git a/resources/views/twill/authors/form.blade.php b/resources/views/twill/authors/form.blade.php index 11a9fc82f5..961548f29b 100644 --- a/resources/views/twill/authors/form.blade.php +++ b/resources/views/twill/authors/form.blade.php @@ -1,31 +1,27 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Description', - 'maxlength' => 1000, - 'type' => 'textarea', - 'rows' => 6, - 'toolbarOptions' => [ - 'bold', 'italic', 'link', 'strike' - ], - ]) + - @formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'Listing Description', - 'type' => 'textarea', - 'maxlength' => 300, - 'note' => 'Used in listings and for social media', - 'toolbarOptions' => [ - 'italic' - ], - ]) + - @formField('medias', [ - 'label' => 'Hero Image', - 'name' => 'hero', - 'note' => 'Minimum image width 2000px' - ]) + @stop diff --git a/resources/views/twill/blocks/360_embed.blade.php b/resources/views/twill/blocks/360_embed.blade.php index d77a4f26a8..018ac72201 100644 --- a/resources/views/twill/blocks/360_embed.blade.php +++ b/resources/views/twill/blocks/360_embed.blade.php @@ -6,13 +6,18 @@ @twillBlockTitle('360 Embed') @twillBlockIcon('image') -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 's'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 's'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('files', [ - 'name' => 'image_sequence_file', - 'label' => '360 Zip', - 'note' => 'Upload a .zip file', -]) + -@formField('input', [ - 'name' => 'alt_text', - 'label' => 'Alt Text', -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/360_modal.blade.php b/resources/views/twill/blocks/360_modal.blade.php index 252777e9f7..1a303d39ae 100644 --- a/resources/views/twill/blocks/360_modal.blade.php +++ b/resources/views/twill/blocks/360_modal.blade.php @@ -1,32 +1,28 @@ @twillBlockTitle('360 Modal') @twillBlockIcon('image') -@formField('medias', [ - 'name' => 'image', - 'label' => '360 Image', - 'max' => '1', -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('files', [ - 'name' => 'image_sequence_file', - 'label' => '360 Zip', - 'note' => 'Upload a .zip file', -]) + diff --git a/resources/views/twill/blocks/accordion.blade.php b/resources/views/twill/blocks/accordion.blade.php index 3a086464b2..c632f4c840 100644 --- a/resources/views/twill/blocks/accordion.blade.php +++ b/resources/views/twill/blocks/accordion.blade.php @@ -1,4 +1,6 @@ @twillBlockTitle('Accordion') @twillBlockIcon('text') -@formField('repeater', ['type' => 'accordion_item']) + diff --git a/resources/views/twill/blocks/artwork.blade.php b/resources/views/twill/blocks/artwork.blade.php index db0452c87c..ed7f7d67eb 100644 --- a/resources/views/twill/blocks/artwork.blade.php +++ b/resources/views/twill/blocks/artwork.blade.php @@ -7,20 +7,25 @@ @twillBlockIcon('image') @if ($type === 'digitalPublications') - @formField('checkbox', [ - 'name' => 'hide_figure_number', - 'label' => 'Hide figure number', - 'default' => false, - ]) + @endif -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + +

Note: if the chosen artwork does not have rights to be viewed at a large size, it will display as size small

-@formField('browser', [ - 'routePrefix' => 'collection', - 'name' => 'artworks', - 'moduleName' => 'artworks', - 'label' => 'Artworks', - 'max' => 1 -]) + -@formField('wysiwyg', [ - 'name' => 'captionAddendum', - 'label' => 'Caption addendum', - 'note' => 'Appended to generated tombstone', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/audio_player.blade.php b/resources/views/twill/blocks/audio_player.blade.php index 8629ea182e..5a866659ab 100644 --- a/resources/views/twill/blocks/audio_player.blade.php +++ b/resources/views/twill/blocks/audio_player.blade.php @@ -1,40 +1,34 @@ @twillBlockTitle('Audio Player') @twillBlockIcon('image') -@formField('files', [ - 'name' => 'audio_file', - 'label' => 'Audio file', - 'note' => 'Upload a .mp3 file', -]) + -@formField('input', [ - 'name' => 'title_display', - 'label' => 'Title', - 'note' => 'Use tag to add italics. e.g. Nighthawks' -]) + -@formField('wysiwyg', [ - 'name' => 'transcript', - 'label' => 'Transcript', - 'toolbarOptions' => [ - 'italic', 'link' - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/button.blade.php b/resources/views/twill/blocks/button.blade.php index 619f4d01d7..7f4e45520f 100644 --- a/resources/views/twill/blocks/button.blade.php +++ b/resources/views/twill/blocks/button.blade.php @@ -1,13 +1,13 @@ @twillBlockTitle('Button') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'title', - 'label' => 'Title', - 'maxlength' => 25 -]) + -@formField('input', [ - 'name' => 'link', - 'label' => 'Link' -]) + diff --git a/resources/views/twill/blocks/collection_block.blade.php b/resources/views/twill/blocks/collection_block.blade.php index 642f92ed3e..a8b5415f94 100644 --- a/resources/views/twill/blocks/collection_block.blade.php +++ b/resources/views/twill/blocks/collection_block.blade.php @@ -1,53 +1,53 @@ @twillBlockTitle('Collection Block') @twillBlockIcon('Image') -@formField('input', [ - 'name' => 'collection_heading', - 'label' => 'Heading' -]) + -@formField('browser', [ - 'name' => 'artworks', - 'routePrefix' => 'collection', - 'moduleName' => 'artworks', - 'label' => 'Artworks', - 'max' => 20, -]) + -@formField('wysiwyg', [ - 'name' => 'bottom_desc', - 'label' => 'Description', - 'type' => 'textarea' -]) + -@component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'primary_button_label', - 'label' => 'Primary Button Label' - ]) - @endslot + + + + - @slot('right') - @formField('input', [ - 'name' => 'primary_button_link', - 'label' => 'Primary Button Link' - ]) - @endslot -@endcomponent + + + + -@component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'secondary_button_label', - 'label' => 'Secondary Button Label' - ]) - @endslot + + + + - @slot('right') - @formField('input', [ - 'name' => 'secondary_button_link', - 'label' => 'Secondary Button Link' - ]) - @endslot -@endcomponent + + + + diff --git a/resources/views/twill/blocks/custom_banner.blade.php b/resources/views/twill/blocks/custom_banner.blade.php index 60bf4a2af1..8304caa8a4 100644 --- a/resources/views/twill/blocks/custom_banner.blade.php +++ b/resources/views/twill/blocks/custom_banner.blade.php @@ -15,196 +15,197 @@ @twillBlockTitle('Custom Banner') @twillBlockIcon('image') -@formField('select', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'default', - 'options' => collect($themes)->map(function($theme) { +@php + $options = collect($themes)->map(function($theme) { return [ 'value' => $theme, 'label' => ucfirst($theme), ]; - })->toArray(), -]) - -@formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'editorial', - 'renderForBlocks' => true, - ]) - - @formField('select', [ - 'name' => 'variation', - 'label' => 'Variation', - 'options' => [ + })->toArray() +@endphp + + + + + + + + + + + + + + + + @php + $options = collect($categoriesList)->map(function($name, $id) { + return [ + 'value' => $id, + 'label' => $name, + ]; + })->toArray(); + @endphp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/twill/blocks/digital_label.blade.php b/resources/views/twill/blocks/digital_label.blade.php index 64762849f3..88bde02c71 100644 --- a/resources/views/twill/blocks/digital_label.blade.php +++ b/resources/views/twill/blocks/digital_label.blade.php @@ -1,10 +1,10 @@ @twillBlockTitle('Interactive feature') @twillBlockIcon('text') -@formField('browser', [ - 'routePrefix' => 'collection.interactiveFeatures', - 'name' => 'experiences', - 'moduleName' => 'experiences', - 'label' => 'Interactive Feature', - 'max' => 1 -]) + diff --git a/resources/views/twill/blocks/editorial_block.blade.php b/resources/views/twill/blocks/editorial_block.blade.php index c441a0d5a4..99b9c0c669 100644 --- a/resources/views/twill/blocks/editorial_block.blade.php +++ b/resources/views/twill/blocks/editorial_block.blade.php @@ -5,22 +5,27 @@ $endpoints = [ [ 'label' => 'Article', - 'value' => moduleRoute('articles', 'collection.articlesPublications', 'browser', ['published' => true]), + 'name' => 'collection.articlesPublications.articles' ], [ 'label' => 'Highlight', - 'value' => moduleRoute('highlights', 'collection', 'browser', ['is_published' => true]) + 'name' => 'collection.highlights' ], [ 'label' => 'Interactive feature', - 'value' => moduleRoute('experiences', 'collection.interactiveFeatures', 'browser', ['is_published' => true]) + 'name' => 'collection.interactiveFeatures.experiences' ], [ 'label' => 'Video', - 'value' => moduleRoute('videos', 'collection.articlesPublications', 'browser', ['is_published' => true]), + 'name' => 'collection.articlesPublications.videos' ], ]; + $params = [ + 'published' => true, + 'is_published' => true + ]; + switch ($type) { case 'Editorial': $themes = ['default']; @@ -33,188 +38,187 @@ @twillBlockTitle('Editorial Block') @twillBlockIcon('image') -@formField('select', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'default', - 'options' => collect($themes)->map(function($theme) { +@php + $options = collect($themes)->map(function($theme) { return [ 'value' => $theme, 'label' => ucfirst($theme), ]; - })->toArray(), -]) - - @formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'default', - 'renderForBlocks' => true, - ]) - - @formField('select', [ - 'name' => 'variation', - 'label' => 'Variation', - 'options' => [ - [ - 'value' => 'feature-5-side', - 'label' => 'Feature 5 Side', - ], - [ - 'value' => 'feature-5-top', - 'label' => 'Feature 5 Top', - ], - [ - 'value' => 'video', - 'label' => 'Video', - ], - [ - 'value' => '3-across', - 'label' => '3 Across', - ], - [ - 'value' => '4-across', - 'label' => '4 Across', - ], + })->toArray(); +@endphp + + + + + + + + + + + + + + + + @php + $options = collect($categoriesList)->map(function($name, $id) { return [ 'value' => $id, 'label' => $name, ]; - })->toArray(), - 'placeholder' => 'Add categories', - ]) - - @endcomponent - - @formConnectedFields([ - 'fieldName' => 'variation', - 'fieldValues' => ['feature-5-side', 'feature-5-top'], - 'renderForBlocks' => true, - ]) - - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'stories', - 'endpoints' => $endpoints, - 'max' => 5, - 'label' => 'Stories', - ]) - @endcomponent - - - @formConnectedFields([ - 'fieldName' => 'variation', - 'fieldValues' => 'video', - 'renderForBlocks' => true, - ]) - - @component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'browse_label', - 'label' => 'Browse More Label', - 'type' => 'text', - ]) - @endslot - @slot('right') - @formField('input', [ - 'name' => 'browse_link', - 'label' => 'Browse More Link', - 'type' => 'text', - ]) - @endslot - @endcomponent - - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'videos', - 'endpoints' => [ - [ - 'label' => 'Video', - 'value' => moduleRoute('videos', 'collection.articlesPublications', 'browser', ['is_published' => true]), - ], - ], - 'max' => 6, - 'label' => 'Videos', - ]) - @endcomponent - - @formConnectedFields([ - 'fieldName' => 'variation', - 'fieldValues' => '3-across', - 'renderForBlocks' => true, - ]) - - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'stories', - 'endpoints' => $endpoints, - 'max' => 6, - 'label' => 'Stories', - ]) - @endcomponent - - @formConnectedFields([ - 'fieldName' => 'variation', - 'fieldValues' => '4-across', - 'renderForBlocks' => true, - ]) - - @component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'browse_label', - 'label' => 'Browse More Label', - 'type' => 'text', - ]) - @endslot - @slot('right') - @formField('input', [ - 'name' => 'browse_link', - 'label' => 'Browse More Link', - 'type' => 'text', - ]) - @endslot - @endcomponent - - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'stories', - 'endpoints' => $endpoints, - 'max' => 8, - 'label' => 'Stories', - ]) - @endcomponent + })->toArray(); + @endphp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/twill/blocks/event.blade.php b/resources/views/twill/blocks/event.blade.php index 08472b7bfa..087f33e817 100644 --- a/resources/views/twill/blocks/event.blade.php +++ b/resources/views/twill/blocks/event.blade.php @@ -1,9 +1,9 @@ @twillBlockTitle('Event') @twillBlockIcon('text') -@formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'events', - 'name' => 'events', - 'label' => 'Event' -]) + diff --git a/resources/views/twill/blocks/events.blade.php b/resources/views/twill/blocks/events.blade.php index 5122f1075d..4a8f16c5c8 100644 --- a/resources/views/twill/blocks/events.blade.php +++ b/resources/views/twill/blocks/events.blade.php @@ -26,42 +26,42 @@ @endphp -@formField('input', [ - 'name' => 'title', - 'label' => 'Title', -]) + -@formField('multi_select', [ - 'name' => 'audience', - 'label' => 'Audience', - 'options' => $audiences, -]) + -@formField('multi_select', [ - 'name' => 'type', - 'label' => 'Type', - 'options' => $types, -]) + -@formField('multi_select', [ - 'name' => 'program', - 'label' => 'Program', - 'options' => $programs, -]) + -@component('twill::partials.form.utils._columns') -@slot('left') - @formField('date_picker', [ - 'name' => 'date_start', - 'label' => 'Start date', - 'withTime' => false, - ]) -@endslot -@slot('right') - @formField('date_picker', [ - 'name' => 'date_end', - 'label' => 'End date', - 'withTime' => false, - ]) -@endslot -@endcomponent + + + + + + + + diff --git a/resources/views/twill/blocks/exhibitions.blade.php b/resources/views/twill/blocks/exhibitions.blade.php index f9deabccc0..6d0fe508c1 100644 --- a/resources/views/twill/blocks/exhibitions.blade.php +++ b/resources/views/twill/blocks/exhibitions.blade.php @@ -1,15 +1,15 @@ @twillBlockTitle('Exhibitions') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'title', - 'label' => 'Title', -]) + -@formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'max' => 4, - 'moduleName' => 'exhibitions', - 'name' => 'exhibitions', - 'label' => 'Exhibitions' -]) + diff --git a/resources/views/twill/blocks/feature_2x.blade.php b/resources/views/twill/blocks/feature_2x.blade.php index 4d3a229cca..a3672d713c 100644 --- a/resources/views/twill/blocks/feature_2x.blade.php +++ b/resources/views/twill/blocks/feature_2x.blade.php @@ -1,10 +1,10 @@ @twillBlockTitle('Feature 2x') @twillBlockIcon('image') -@formField('browser', [ - 'routePrefix' => 'collection.interactiveFeatures', - 'moduleName' => 'experiences', - 'name' => 'experiences', - 'max' => 2, - 'label' => 'Featured items', -]) + diff --git a/resources/views/twill/blocks/feature_4x.blade.php b/resources/views/twill/blocks/feature_4x.blade.php index 22134bd188..00e23b3bf7 100644 --- a/resources/views/twill/blocks/feature_4x.blade.php +++ b/resources/views/twill/blocks/feature_4x.blade.php @@ -1,10 +1,10 @@ @twillBlockTitle('Feature 4x') @twillBlockIcon('image') -@formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'highlights', - 'name' => 'highlights', - 'max' => 4, - 'label' => 'Featured items', -]) + diff --git a/resources/views/twill/blocks/feature_block.blade.php b/resources/views/twill/blocks/feature_block.blade.php index 9b86d99a73..a375a8fcd9 100644 --- a/resources/views/twill/blocks/feature_block.blade.php +++ b/resources/views/twill/blocks/feature_block.blade.php @@ -14,103 +14,104 @@ @twillBlockTitle('Feature Block') @twillBlockIcon('image') - -@formField('select', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'default', - 'options' => collect($themes)->map(function($theme) { +@php + $options = collect($themes)->map(function($theme) { return [ 'value' => $theme, 'label' => ucfirst($theme), ]; - })->toArray(), -]) - -@formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'editorial', - 'renderForBlocks' => true, - ]) - - @formField('select', [ - 'name' => 'variation', - 'label' => 'Variation', - 'options' => [ + })->toArray(); +@endphp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Note: If event date has passed it will not be shown - @formField('browser', [ - 'name' => 'events', - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'events', - 'label' => 'Events', - 'max' => 20, - ]) - - @endcomponent - -@endcomponent - -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'feature_type', - 'fieldValues' => 'exhibitions', - 'renderForBlocks' => true, -]) - - @formField('select', [ - 'name' => 'columns', - 'label' => '# of columns', - 'note' => 'Number of columns selected and items loaded must match', - 'options' => [ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/twill/blocks/featured_pages_grid.blade.php b/resources/views/twill/blocks/featured_pages_grid.blade.php index 8aae192d58..cfd11bb2c6 100644 --- a/resources/views/twill/blocks/featured_pages_grid.blade.php +++ b/resources/views/twill/blocks/featured_pages_grid.blade.php @@ -1,25 +1,25 @@ @twillBlockTitle('Featured Pages Grid') @twillBlockIcon('image') -@formField('input', [ - 'name' => 'heading', - 'label' => 'Heading', -]) + -@formField('browser', [ - 'routePrefix' => 'generic', - 'moduleName' => 'genericPages', - 'name' => 'genericPages', - 'endpoints' => [ + diff --git a/resources/views/twill/blocks/gallery_new.blade.php b/resources/views/twill/blocks/gallery_new.blade.php index 90b76e5740..a2d574e6d0 100644 --- a/resources/views/twill/blocks/gallery_new.blade.php +++ b/resources/views/twill/blocks/gallery_new.blade.php @@ -10,43 +10,39 @@ @include('twill.partials.gallery-shared') @if ($type === 'digitalPublications') - @formField('checkbox', [ - 'name' => 'hide_figure_number', - 'label' => 'Hide figure number', - 'default' => false, - ]) + @endif -@formField('wysiwyg', [ - 'name' => 'title', - 'label' => 'Title', - 'maxlength' => 60, - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) - -@formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Description', - 'rows' => 4, - 'maxlength' => 500, - 'note' => 'Will be hidden if title is empty', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) - -@formField('checkbox', [ - 'name' => 'disable_gallery_modals', - 'label' => 'Disable modals for this gallery', -]) - -@formField('checkbox', [ - 'name' => 'is_gallery_zoomable', - 'label' => 'Make all image modals zoomable (override)', -]) - -@formField('repeater', [ - 'type' => 'gallery_new_item', -]) + + + + + + + + + diff --git a/resources/views/twill/blocks/grid.blade.php b/resources/views/twill/blocks/grid.blade.php index afe436e99a..d9de579670 100644 --- a/resources/views/twill/blocks/grid.blade.php +++ b/resources/views/twill/blocks/grid.blade.php @@ -1,26 +1,26 @@ @twillBlockTitle('Grid') @twillBlockIcon('image') -@formField('wysiwyg', [ - 'name' => 'heading', - 'label' => 'Heading', - 'maxlength' => 60, - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('input', [ - 'name' => 'grid_link_label', - 'label' => 'Link Label', - 'maxlength' => 60, - 'note' => 'Displayed at top-right of title bar', -]) + -@formField('input', [ - 'name' => 'grid_link_href', - 'label' => 'Link URL', - 'maxlength' => 60, -]) + -@formField('repeater', ['type' => 'grid_item']) + diff --git a/resources/views/twill/blocks/image.blade.php b/resources/views/twill/blocks/image.blade.php index d852986abc..e0640d2dde 100644 --- a/resources/views/twill/blocks/image.blade.php +++ b/resources/views/twill/blocks/image.blade.php @@ -24,71 +24,75 @@ @twillBlockIcon('image') @if ($type === 'digitalPublications') - @formField('checkbox', [ - 'name' => 'hide_figure_number', - 'label' => 'Hide figure number', - 'default' => false, - ]) + @endif -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'options' => $options, -]) +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; +@endphp + + + +@php + $default = $type === 'digitalPublications' ? true : false; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp -@formField('checkbox', [ - 'name' => 'use_contain', - 'label' => 'Always show the whole image instead of cropping to the container', - 'default' => ($type === 'digitalPublications' ? true : false), - 'disabled' => ($type === 'digitalPublications' ? true : false), -]) + -@formField('checkbox', [ - 'name' => 'use_alt_background', - 'label' => 'Use white instead of gray to pillarbox the image', - 'default' => ($type === 'digitalPublications' ? true : false), - 'disabled' => ($type === 'digitalPublications' ? true : false), -]) + -@formField('checkbox', [ - 'name' => 'is_modal', - 'label' => 'Allow this image to be viewed in a modal', -]) + -@formField('checkbox', [ - 'name' => 'is_zoomable', - 'label' => 'Make the image modal zoomable', -]) + -@formField('medias', [ - 'name' => 'image', - 'label' => 'Image' -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('input', [ - 'name' => 'image_link', - 'label' => 'Link (optional)', - 'note' => 'Makes image clickable', - 'type' => 'text' -]) + diff --git a/resources/views/twill/blocks/image_slider.blade.php b/resources/views/twill/blocks/image_slider.blade.php index 2c5860be35..47a134b9f9 100644 --- a/resources/views/twill/blocks/image_slider.blade.php +++ b/resources/views/twill/blocks/image_slider.blade.php @@ -6,18 +6,23 @@ @twillBlockTitle('Image Slider') @twillBlockIcon('image') -@formField('checkbox', [ - 'name' => 'is_slider_zoomable', - 'label' => 'Enable zoom', -]) + -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption_text', - 'label' => 'Caption text', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) +
-@formField('medias', [ - 'name' => 'left_image', - 'label' => 'Left image', -]) + -@formField('medias', [ - 'name' => 'right_image', - 'label' => 'Right image', -]) + diff --git a/resources/views/twill/blocks/layered_image_viewer.blade.php b/resources/views/twill/blocks/layered_image_viewer.blade.php index 2cc37ddf8a..a749f0399e 100644 --- a/resources/views/twill/blocks/layered_image_viewer.blade.php +++ b/resources/views/twill/blocks/layered_image_viewer.blade.php @@ -6,31 +6,32 @@ @twillBlockTitle('Layered Image Viewer') @twillBlockIcon('image') -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('repeater', ['type' => 'layered_image_viewer_img']) + -@formField('repeater', ['type' => 'layered_image_viewer_overlay']) + diff --git a/resources/views/twill/blocks/link.blade.php b/resources/views/twill/blocks/link.blade.php index 6723dcb18f..f02d66c826 100644 --- a/resources/views/twill/blocks/link.blade.php +++ b/resources/views/twill/blocks/link.blade.php @@ -1,19 +1,19 @@ @twillBlockTitle('Link') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'title', - 'label' => 'Title', - 'maxlength' => 60 -]) + -@formField('input', [ - 'name' => 'link', - 'label' => 'Link' -]) + -@formField('files', [ - 'name' => 'attachment', - 'label' => 'Attachment', - 'note' => 'Add one file' -]) + diff --git a/resources/views/twill/blocks/list.blade.php b/resources/views/twill/blocks/list.blade.php index 2409485497..997a0f8040 100644 --- a/resources/views/twill/blocks/list.blade.php +++ b/resources/views/twill/blocks/list.blade.php @@ -1,4 +1,6 @@ @twillBlockTitle('List') @twillBlockIcon('text') -@formField('repeater', ['type' => 'list_item']) + diff --git a/resources/views/twill/blocks/magazine_call_to_action.blade.php b/resources/views/twill/blocks/magazine_call_to_action.blade.php index 0a71c5a51b..1486cfb73a 100644 --- a/resources/views/twill/blocks/magazine_call_to_action.blade.php +++ b/resources/views/twill/blocks/magazine_call_to_action.blade.php @@ -1,12 +1,12 @@ @twillBlockTitle('Magazine Call to Action') @twillBlockIcon('text') -@formField('radios', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'dark', - 'inline' => true, - 'options' => [ + -@formField('input', [ - 'name' => 'tag', - 'label' => 'Tag', - 'note' => 'Small text, e.g. "Exhibition"' -]) + -@formField('wysiwyg', [ - 'name' => 'title', - 'label' => 'Title', - 'toolbarOptions' => [ - 'italic' - ], -]) + -@formField('input', [ - 'name' => 'link_text', - 'label' => 'Link text' -]) + -@formField('input', [ - 'name' => 'link_url', - 'label' => 'Link URL' -]) + diff --git a/resources/views/twill/blocks/magazine_item.blade.php b/resources/views/twill/blocks/magazine_item.blade.php index 9b726dbeb5..6981f0acdd 100644 --- a/resources/views/twill/blocks/magazine_item.blade.php +++ b/resources/views/twill/blocks/magazine_item.blade.php @@ -1,12 +1,8 @@ @twillBlockTitle('Magazine Item') @twillBlockIcon('text') -@formField('radios', [ - 'name' => 'feature_type', - 'label' => 'Feature type', - 'default' => \App\Models\MagazineItem::ITEM_TYPE_ARTICLE, - 'inline' => true, - 'options' => [ +@php + $options = [ [ 'value' => \App\Models\MagazineItem::ITEM_TYPE_ARTICLE, 'label' => 'Article' @@ -22,88 +18,94 @@ [ 'value' => \App\Models\MagazineItem::ITEM_TYPE_CUSTOM, 'label' => 'Custom' - ], - ] -]) + ] + ]; +@endphp + + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'feature_type', - 'fieldValues' => \App\Models\MagazineItem::ITEM_TYPE_ARTICLE, - 'renderForBlocks' => true -]) - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => \App\Models\MagazineItem::ITEM_TYPE_ARTICLE, - 'label' => 'Article' - ]) -@endcomponent + + + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'feature_type', - 'fieldValues' => \App\Models\MagazineItem::ITEM_TYPE_HIGHLIGHT, - 'renderForBlocks' => true -]) - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'highlights', - 'name' => \App\Models\MagazineItem::ITEM_TYPE_HIGHLIGHT, - 'label' => 'Highlight' - ]) -@endcomponent + + + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'feature_type', - 'fieldValues' => \App\Models\MagazineItem::ITEM_TYPE_EXPERIENCE, - 'renderForBlocks' => true -]) - @formField('browser', [ - 'routePrefix' => 'collection.interactiveFeatures', - 'moduleName' => 'experiences', - 'name' => \App\Models\MagazineItem::ITEM_TYPE_EXPERIENCE, - 'label' => 'Interactive Feature' - ]) -@endcomponent + + + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'feature_type', - 'fieldValues' => \App\Models\MagazineItem::ITEM_TYPE_CUSTOM, - 'renderForBlocks' => true -]) - @formField('medias', [ - 'name' => 'listing_image', - 'label' => 'Hero image', - ]) + + - @formField('input', [ - 'name' => 'tag', - 'label' => 'Tag', - 'note' => 'Small text, e.g. "Exhibition"' - ]) + - @formField('input', [ - 'name' => 'title', - 'label' => 'Title', - 'note' => 'Use tag to add italics, e.g. Nighthawks' - ]) + - @formField('input', [ - 'name' => 'url', - 'label' => 'URL for link' - ]) + - @formField('input', [ - 'name' => 'author_display', - 'label' => 'Author' - ]) -@endcomponent + + -@formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'List description', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'toolbarOptions' => [ - 'italic' - ], -]) + diff --git a/resources/views/twill/blocks/media_embed.blade.php b/resources/views/twill/blocks/media_embed.blade.php index c965e749ab..ebedf46c2c 100644 --- a/resources/views/twill/blocks/media_embed.blade.php +++ b/resources/views/twill/blocks/media_embed.blade.php @@ -6,13 +6,18 @@ @twillBlockTitle('Media embed') @twillBlockIcon('text') -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 's'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 's'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('radios', [ - 'name' => 'embed_type', - 'label' => 'Embed type', - 'default' => 'html', - 'inline' => true, - 'options' => [ + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'embed_type', - 'fieldValues' => 'html', - 'renderForBlocks' => true -]) - @formField('input', [ - 'name' => 'embed_code', - 'label' => 'Media embed code', - 'type' => 'textarea' - ]) -@endcomponent + + + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'embed_type', - 'fieldValues' => 'url', - 'renderForBlocks' => true -]) - @formField('input', [ - 'name' => 'embed_url', - 'label' => 'Media embed URL', - ]) -@endcomponent + + + -@formField('input', [ - 'name' => 'embed_height', - 'label' => 'Height override', - 'note' => 'Optional. Use CSS units, e.g. "400px"', -]) + -@formField('checkbox', [ - 'name' => 'disable_placeholder', - 'label' => 'Disable placeholder element', -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/membership_banner.blade.php b/resources/views/twill/blocks/membership_banner.blade.php index c028c13694..aee38a382f 100644 --- a/resources/views/twill/blocks/membership_banner.blade.php +++ b/resources/views/twill/blocks/membership_banner.blade.php @@ -1,34 +1,30 @@ @twillBlockTitle('Banner') @twillBlockIcon('text') -@formField('medias', [ - 'name' => 'membership_banner_image', - 'label' => 'Image', - 'max' => '1' -]) + -@formField('input', [ - 'type' => 'text', - 'name' => 'headline', - 'label' => 'Headline', - 'maxlength' => 50 -]) + -@formField('input', [ - 'type' => 'text', - 'name' => 'short_copy', - 'label' => 'Short copy', - 'maxlength' => 80 -]) + -@formField('input', [ - 'type' => 'text', - 'name' => 'url_address', - 'label' => 'Link', -]) + -@formField('input', [ - 'type' => 'text', - 'name' => 'link_text', - 'label' => 'Button text', -]) + diff --git a/resources/views/twill/blocks/mirador_embed.blade.php b/resources/views/twill/blocks/mirador_embed.blade.php index 128c613566..bf673e9f42 100644 --- a/resources/views/twill/blocks/mirador_embed.blade.php +++ b/resources/views/twill/blocks/mirador_embed.blade.php @@ -6,26 +6,31 @@ @twillBlockTitle('Mirador Embed') @twillBlockIcon('image') -@formField('input', [ - 'type' => 'number', - 'name' => 'objectId', - 'label' => 'Object ID', - 'note' => 'Enter object ID to obtain manifest dynamically.' -]) + -@formField('files', [ - 'name' => 'upload_manifest_file', - 'label' => 'Alternative manifest file', - 'note' => 'Upload a .json file' -]) + -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('radios', [ - 'name' => 'default_view', - 'label' => 'Default View', - 'default' => 'single', - 'inline' => true, - 'options' => [ + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/mirador_modal.blade.php b/resources/views/twill/blocks/mirador_modal.blade.php index 2d95283db7..ad1128da08 100644 --- a/resources/views/twill/blocks/mirador_modal.blade.php +++ b/resources/views/twill/blocks/mirador_modal.blade.php @@ -1,31 +1,31 @@ @twillBlockTitle('Mirador Modal') @twillBlockIcon('image') -@formField('medias', [ - 'name' => 'image', - 'label' => 'Mirador Image', - 'max' => '1', -]) + -@formField('input', [ - 'type' => 'number', - 'name' => 'objectId', - 'label' => 'Object ID', - 'note' => 'Enter object ID to obtain manifest dynamically.', -]) + -@formField('files', [ - 'name' => 'upload_manifest_file', - 'label' => 'Alternative manifest file', - 'note' => 'Upload a .json file', -]) + -@formField('radios', [ - 'name' => 'default_view', - 'label' => 'Default View', - 'default' => 'single', - 'inline' => true, - 'options' => [ + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/mobile_app.blade.php b/resources/views/twill/blocks/mobile_app.blade.php index 84e2a6d698..242603c96e 100644 --- a/resources/views/twill/blocks/mobile_app.blade.php +++ b/resources/views/twill/blocks/mobile_app.blade.php @@ -1,10 +1,8 @@ @twillBlockTitle('Mobile app promo') @twillBlockIcon('text') -@formField('wysiwyg', [ - 'name' => 'callout', - 'label' => 'Callout text', - 'toolbarOptions' => [ - 'bold', 'italic', 'link' - ], -]) + diff --git a/resources/views/twill/blocks/my_museum_tour_grid.blade.php b/resources/views/twill/blocks/my_museum_tour_grid.blade.php index c871b76391..dd1cd4040f 100644 --- a/resources/views/twill/blocks/my_museum_tour_grid.blade.php +++ b/resources/views/twill/blocks/my_museum_tour_grid.blade.php @@ -1,26 +1,22 @@ @twillBlockTitle('My Museum Tour Grid') @twillBlockIcon('image') -@formField('wysiwyg', [ - 'name' => 'my_museum_tour_grid_heading', - 'label' => 'Heading', - 'toolbarOptions' => [ - 'italic' - ], -]) + -@formField('wysiwyg', [ - 'name' => 'my_museum_tour_grid_text', - 'label' => 'Intro Text', - 'toolbarOptions' => [ - 'italic' - ], -]) + -@formField('browser', [ - 'routePrefix' => 'visit', - 'moduleName' => 'myMuseumTourItems', - 'name' => 'myMuseumTourItems', - 'label' => 'My Museum Tour', - 'max' => -1, -]) + diff --git a/resources/views/twill/blocks/newsletter_signup_inline.blade.php b/resources/views/twill/blocks/newsletter_signup_inline.blade.php index 5acabb77e2..ff1006422b 100644 --- a/resources/views/twill/blocks/newsletter_signup_inline.blade.php +++ b/resources/views/twill/blocks/newsletter_signup_inline.blade.php @@ -1,15 +1,19 @@ @twillBlockTitle('Newsletter signup inline') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'copy', - 'label' => 'Custom copy', - 'note' => 'Override default copy', - 'maxlength' => 60 -]) + -@formField('select', [ - 'name' => 'list', - 'label' => 'Newsletter target list', - 'options' => \App\Models\ExactTargetList::getList() -]) +@php + $options = \App\Models\ExactTargetList::getList()->toArray(); +@endphp + + diff --git a/resources/views/twill/blocks/paragraph.blade.php b/resources/views/twill/blocks/paragraph.blade.php index 1b3f5de4b4..bb49a427df 100644 --- a/resources/views/twill/blocks/paragraph.blade.php +++ b/resources/views/twill/blocks/paragraph.blade.php @@ -1,15 +1,9 @@ @twillBlockTitle('Paragraph') @twillBlockIcon('text') -@formField('wysiwyg', [ - 'name' => 'paragraph', - 'label' => 'Paragraph', - 'note' => 'Wrap footnote text with [ref]...[/ref]', - 'toolbarOptions' => [ - ['header' => 2], - ['header' => 3], - ['header' => 4], - 'bold', 'italic', 'underline', 'strike', 'link', 'list-ordered', 'list-unordered', - ['script' => 'super'], - ], -]) + diff --git a/resources/views/twill/blocks/quote.blade.php b/resources/views/twill/blocks/quote.blade.php index 1df1208c44..0ac4c1cb31 100644 --- a/resources/views/twill/blocks/quote.blade.php +++ b/resources/views/twill/blocks/quote.blade.php @@ -1,17 +1,15 @@ @twillBlockTitle('Quote') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'quote', - 'type' => 'textarea', - 'label' => 'Quote text', - 'rows' => 4 -]) + -@formField('wysiwyg', [ - 'name' => 'attribution', - 'label' => 'Attribution', - 'toolbarOptions' => [ - 'italic' - ], -]) + diff --git a/resources/views/twill/blocks/ranged_accordion.blade.php b/resources/views/twill/blocks/ranged_accordion.blade.php index 26725d2900..baca20ae57 100644 --- a/resources/views/twill/blocks/ranged_accordion.blade.php +++ b/resources/views/twill/blocks/ranged_accordion.blade.php @@ -1,12 +1,11 @@ @twillBlockTitle('Ranged Accordion') @twillBlockIcon('text') -@formField('radios', [ - 'name' => 'type', - 'label' => 'Type', - 'default' => true, - - 'options' => [ + - @formConnectedFields ([ - 'fieldName' => 'type', - 'fieldValues' => 'start', - 'renderForBlocks' => true, - ]) - @formField('input', [ - 'name' => 'title', - 'label' => 'Title', - 'type' => 'text', - ]) - @endcomponent \ No newline at end of file + + + diff --git a/resources/views/twill/blocks/search_bar.blade.php b/resources/views/twill/blocks/search_bar.blade.php index 7e4b8f2414..7ce9ef1c72 100644 --- a/resources/views/twill/blocks/search_bar.blade.php +++ b/resources/views/twill/blocks/search_bar.blade.php @@ -1,20 +1,20 @@ @twillBlockTitle('External search bar') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'header', - 'label' => 'Header', - 'note' => 'Not shown if omitted', -]) + -@formField('input', [ - 'name' => 'placeholder', - 'label' => 'Placeholder text', - 'note' => 'Shown inside search bar', -]) + -@formField('input', [ - 'name' => 'url_template', - 'label' => 'Search URL template', - 'note' => 'Use {query} to specify which part should be replaced', -]) + diff --git a/resources/views/twill/blocks/showcase.blade.php b/resources/views/twill/blocks/showcase.blade.php index adeda23049..13c74dbc79 100644 --- a/resources/views/twill/blocks/showcase.blade.php +++ b/resources/views/twill/blocks/showcase.blade.php @@ -20,28 +20,32 @@ @twillBlockTitle('Showcase') @twillBlockIcon('image') -@formField('select', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'default', - 'options' => collect($themes)->map(function($theme) { +@php + $options = collect($themes)->map(function($theme) { return [ 'value' => $theme, 'label' => ucfirst($theme), ]; - })->toArray(), -]) - -@formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'default', - 'renderForBlocks' => true, - ]) - - @formField('select', [ - 'name' => 'variation', - 'label' => 'Variation', - 'options' => [ + })->toArray(); +@endphp + + + + + + + + + + + - @formField('input', [ - 'name' => 'heading', - 'label' => 'Heading', - 'type' => 'text', - ]) -@endcomponent + + @if (count($mediaTypes) > 1) - @formField('select', [ - 'name' => 'media_type', - 'label' => 'Media Type', - 'required' => true, - 'unpack' => true, - 'options' => collect($mediaTypes)->map(function($media) { - return [ - 'value' => $media, - 'label' => ucfirst($media), - ]; - })->toArray(), - ]) - - @formConnectedFields([ - 'fieldName' => 'media_type', - 'fieldValues' => 'image', - 'renderForBlocks' => true, - ]) - @formField('medias', [ - 'name' => 'image', - 'label' => 'Image', - 'max' => 1, - 'withVideoUrl' => false, - 'required' => true, - ]) - @endcomponent - - @formConnectedFields([ - 'fieldName' => 'media_type', - 'fieldValues' => 'video', - 'renderForBlocks' => true, - ]) - @formField('medias', [ - 'name' => 'image', - 'label' => 'Video', - 'max' => 1, - 'withVideoUrl' => false, - 'required' => true, - ]) - @endcomponent + @php + $options = collect($mediaTypes)->map(function($media) { + return [ + 'value' => $media, + 'label' => ucfirst($media), + ]; + })->toArray(); + @endphp + + + + + + + + + + @else - @formField('medias', [ - 'name' => 'image', - 'label' => 'Image', - 'max' => 1, - 'withVideoUrl' => false, - 'required' => true, - ]) + @endif -@formField('input', [ - 'name' => 'tag', - 'label' => 'Tag', - 'type' => 'text', - 'maxlength' => 100, -]) - -@formField('wysiwyg', [ - 'name' => 'title', - 'label' => 'Title', - 'maxlength' => 100, - 'required' => true, - 'toolbarOptions' => [ - 'italic' - ], -]) - -@formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Description', - 'required' => true, -]) - -@formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'rlc', - 'renderForBlocks' => true, -]) - @formField('input', [ - 'name' => 'date', - 'label' => 'Date', - 'type' => 'text', - ]) -@endcomponent - -@component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'link_label', - 'label' => 'Link Label', - 'type' => 'text', - ]) - @endslot - @slot('right') - @formField('input', [ - 'name' => 'link_url', - 'label' => 'Link Url', - 'type' => 'text', - ]) - @endslot -@endcomponent + + + + + + + + + + + + + + + + + + diff --git a/resources/views/twill/blocks/showcase_multiple.blade.php b/resources/views/twill/blocks/showcase_multiple.blade.php index 335c8fdcd2..d23abcd6b2 100644 --- a/resources/views/twill/blocks/showcase_multiple.blade.php +++ b/resources/views/twill/blocks/showcase_multiple.blade.php @@ -9,30 +9,32 @@ default: $themes = ['default']; } -@endphp -@formField('select', [ - 'name' => 'theme', - 'label' => 'Theme', - 'default' => 'default', - 'options' => collect($themes)->map(function($theme) { + $options = collect($themes)->map(function($theme) { return [ 'value' => $theme, 'label' => ucfirst($theme), ]; - })->toArray(), -]) + })->toArray(); +@endphp -@formConnectedFields([ - 'fieldName' => 'theme', - 'fieldValues' => 'rlc', - 'renderForBlocks' => true, - ]) + - @formField('select', [ - 'name' => 'variation', - 'label' => 'Variation', - 'options' => [ + + + -@endcomponent + @twillBlockTitle('Showcase Multiple') @twillBlockIcon('image') -@formField('input', [ - 'name' => 'heading', - 'label' => 'Heading', - 'type' => 'text', -]) + -@formField('input', [ - 'name' => 'intro', - 'label' => 'Intro', - 'type' => 'text', -]) + -@formField('repeater', ['type' => 'showcase_item']) + diff --git a/resources/views/twill/blocks/split_block.blade.php b/resources/views/twill/blocks/split_block.blade.php index 1e32fe900a..6b7188056c 100644 --- a/resources/views/twill/blocks/split_block.blade.php +++ b/resources/views/twill/blocks/split_block.blade.php @@ -1,12 +1,12 @@ @twillBlockTitle('Split block') @twillBlockIcon('text') -@formField('radios', [ - 'name' => 'variation', - 'label' => 'Variation', - 'default' => 'quarter', - 'inline' => true, - 'options' => [ + -@formField('medias', [ - 'name' => 'image', - 'label' => 'Image', - 'max' => 1 -]) + -@formField('input', [ - 'name' => 'image_link', - 'label' => 'Link (optional)', - 'note' => 'Makes image clickable', -]) + {!! TwillBlocks::getBlockCollection()->findByName('paragraph')->renderForm() !!} diff --git a/resources/views/twill/blocks/stories_block.blade.php b/resources/views/twill/blocks/stories_block.blade.php index a779730c21..b0554a2194 100644 --- a/resources/views/twill/blocks/stories_block.blade.php +++ b/resources/views/twill/blocks/stories_block.blade.php @@ -1,46 +1,47 @@ @twillBlockTitle('Stories Block') @twillBlockIcon('Image') -@formField('input', [ - 'name' => 'stories_heading', - 'label' => 'Heading' -]) + -@component('twill::partials.form.utils._columns') - @slot('left') - @formField('input', [ - 'name' => 'browse_label', - 'label' => 'Browse More Label', - ]) - @endslot - @slot('right') - @formField('input', [ - 'name' => 'browse_link', - 'label' => 'Browse More Link', - ]) - @endslot -@endcomponent + + + + + + + + -@formField('browser', [ - 'name' => 'content', - 'label' => 'Stories', - 'max' => 5, - 'endpoints' => [ + diff --git a/resources/views/twill/blocks/table.blade.php b/resources/views/twill/blocks/table.blade.php index ae1693994d..02b10a1708 100644 --- a/resources/views/twill/blocks/table.blade.php +++ b/resources/views/twill/blocks/table.blade.php @@ -10,13 +10,18 @@
-@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 's'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 's'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('input', [ - 'name' => 'table_title', - 'label' => 'Title', - 'maxlength' => 60, - 'note' => 'Optional', -]) + -@formField('input', [ - 'type' => 'textarea', - 'name' => 'table_markdown', - 'label' => 'Table (Markdown)', - 'rows' => 4, - 'note' => 'Limited to one table per block', -]) + -@formField('wysiwyg', [ - 'name' => 'table_caption', - 'label' => 'Caption', - 'note' => 'Optional', - 'toolbarOptions' => [ - ['header' => 3], - 'bold', 'italic', 'underline', 'strike', 'link', 'list-ordered', 'list-unordered', - ['script' => 'super'], - ], -]) + -@formField('checkbox', [ - 'name' => 'has_side_header', - 'label' => 'Leftmost column is also a header', -]) + -@formField('checkbox', [ - 'name' => 'allow_word_wrap', - 'label' => 'Allow word wrap in table cells', -]) + -@formField('checkbox', [ - 'name' => 'hide_columns', - 'label' => 'Hide vertical cell borders', -]) + diff --git a/resources/views/twill/blocks/timeline.blade.php b/resources/views/twill/blocks/timeline.blade.php index 93013ce300..337cc807ca 100644 --- a/resources/views/twill/blocks/timeline.blade.php +++ b/resources/views/twill/blocks/timeline.blade.php @@ -1,4 +1,6 @@ @twillBlockTitle('Timeline') @twillBlockIcon('text') -@formField('repeater', ['type' => 'timeline_item']) + diff --git a/resources/views/twill/blocks/tombstone.blade.php b/resources/views/twill/blocks/tombstone.blade.php index 0cf38edcdf..57358c9062 100644 --- a/resources/views/twill/blocks/tombstone.blade.php +++ b/resources/views/twill/blocks/tombstone.blade.php @@ -1,17 +1,15 @@ @twillBlockTitle('Tombstone') @twillBlockIcon('text') -@formField('input', [ - 'name' => 'heading', - 'label' => 'Heading', - 'default' => 'Cat. ', -]) + -@formField('wysiwyg', [ - 'name' => 'text', - 'label' => 'Text', - 'placeholder' => 'Text', - 'toolbarOptions' => [ - 'bold', 'italic' - ], -]) + diff --git a/resources/views/twill/blocks/tour_stop.blade.php b/resources/views/twill/blocks/tour_stop.blade.php index a5a361b4bd..2e463ec493 100644 --- a/resources/views/twill/blocks/tour_stop.blade.php +++ b/resources/views/twill/blocks/tour_stop.blade.php @@ -1,21 +1,21 @@ @twillBlockTitle('Audio Tour Stop') @twillBlockIcon('image') -@formField('browser', [ - 'routePrefix' => 'general', - 'name' => 'tour_stop', - 'moduleName' => 'tourStops', - 'label' => 'Audio Tour Stop', - 'max' => 1 -]) + -@formField('input', [ - 'name' => 'title_display', - 'label' => 'Title override (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' -]) + -@formField('checkbox', [ - 'name' => 'hidePromoText', - 'label' => 'Hide promo text' -]) + diff --git a/resources/views/twill/blocks/video.blade.php b/resources/views/twill/blocks/video.blade.php index 841005654e..afc9d9030a 100644 --- a/resources/views/twill/blocks/video.blade.php +++ b/resources/views/twill/blocks/video.blade.php @@ -6,13 +6,18 @@ @twillBlockTitle('Video') @twillBlockIcon('image') -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => ($type === 'digitalPublications' ? 'l' : 'm'), - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $default = $type === 'digitalPublications' ? 'l' : 'm'; + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('radios', [ - 'name' => 'media_type', - 'label' => 'Media type', - 'default' => 'youtube', - 'inline' => true, - 'options' => [ + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'media_type', - 'fieldValues' => 'loop', - 'renderForBlocks' => true -]) - @formField('medias', [ - 'name' => 'image', - 'label' => 'Video loop' - ]) + + - @formField('radios', [ - 'name' => 'loop_or_once', - 'label' => 'Loop or play just once?', - 'default' => 'loop', - 'inline' => true, - 'options' => [ + -@endcomponent + -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'media_type', - 'fieldValues' => 'youtube', - 'renderForBlocks' => true -]) - @formField('medias', [ - 'name' => 'image', - 'label' => 'Thumbnail image' - ]) + +

For YouTube, we recommend using full URLs instead of shortened ones.

- @formField('input', [ - 'name' => 'url', - 'label' => 'Video URL', - 'type' => 'url' - ]) + -@endcomponent +
-@formField('checkbox', [ - 'name' => 'use_alt_background', - 'label' => 'Use white instead of gray to pillarbox the image', -]) + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 200, - 'note' => 'Max 200 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/blocks/vtour_embed.blade.php b/resources/views/twill/blocks/vtour_embed.blade.php index 1ef3988d5b..85aaa442d3 100644 --- a/resources/views/twill/blocks/vtour_embed.blade.php +++ b/resources/views/twill/blocks/vtour_embed.blade.php @@ -6,19 +6,23 @@ @twillBlockTitle('Virtual Tour Embed') @twillBlockIcon('image') -@formField('files', [ - 'name' => 'vtour_xml_file', - 'label' => 'Virtual tour XML file', - 'note' => 'Upload a .xml file' -]) + -@formField('select', [ - 'name' => 'size', - 'label' => 'Size', - 'placeholder' => 'Select size', - 'default' => 'l', - 'disabled' => ($type === 'digitalPublications' ? true : false), - 'options' => [ +@php + $disabled = $type === 'digitalPublications' ? true : false; +@endphp + + -@formField('wysiwyg', [ - 'name' => 'caption_title', - 'label' => 'Caption title', - 'toolbarOptions' => [ - 'italic', - ], -]) + -@formField('wysiwyg', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 300, - 'note' => 'Max 300 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], -]) + diff --git a/resources/views/twill/buildingClosures/create.blade.php b/resources/views/twill/buildingClosures/create.blade.php index 76cdc11e73..d1e76e3343 100644 --- a/resources/views/twill/buildingClosures/create.blade.php +++ b/resources/views/twill/buildingClosures/create.blade.php @@ -1,26 +1,25 @@ @if(!isset($item)) - @formField('select', [ - 'name' => "type", - 'label' => "Type", - 'native' => true, - 'options' => $typesList, - 'placeholder' => 'Select a type', - 'required' => true - ]) + - @formField('date_picker', [ - 'name' => 'date_start', - 'label' => 'Start date', - 'withTime' => false, - 'required' => true - ]) + - @formField('date_picker', [ - 'name' => 'date_end', - 'label' => 'End date', - 'withTime' => false, - 'required' => true - ]) +

For a 1 day closure, use the same start and end date.

@endif diff --git a/resources/views/twill/buildingClosures/form.blade.php b/resources/views/twill/buildingClosures/form.blade.php index ef8a0721ed..f296d039f0 100644 --- a/resources/views/twill/buildingClosures/form.blade.php +++ b/resources/views/twill/buildingClosures/form.blade.php @@ -1,38 +1,36 @@ @extends('twill::layouts.form', ['contentFieldsetLabel' => 'Edit closure']) @section('contentFields') - @formField('select', [ - 'name' => "type", - 'label' => "Type", - 'options' => $typesList, - 'placeholder' => 'Select a type', - 'required' => true - ]) + - @formField('date_picker', [ - 'name' => 'date_start', - 'label' => 'Start Date', - 'withTime' => false, - 'required' => true - ]) + - @formField('date_picker', [ - 'name' => 'date_end', - 'label' => 'End Date', - 'withTime' => false, - 'required' => true - ]) +

For a 1 day closure, use the same start and end date.

- @formField('wysiwyg', [ - 'name' => 'closure_copy', - 'label' => 'Closure Copy', - 'toolbarOptions' => [ - 'italic', 'link' - ], - 'maxlength' => 255 - ]) + @stop @push('vuexStore') diff --git a/resources/views/twill/categories/form.blade.php b/resources/views/twill/categories/form.blade.php index 018cacdd03..e181ed8318 100644 --- a/resources/views/twill/categories/form.blade.php +++ b/resources/views/twill/categories/form.blade.php @@ -1,8 +1,8 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'name', - 'label' => 'Name', - ]) + @stop diff --git a/resources/views/twill/categoryTerms/form.blade.php b/resources/views/twill/categoryTerms/form.blade.php index 3c2782779d..963681c266 100644 --- a/resources/views/twill/categoryTerms/form.blade.php +++ b/resources/views/twill/categoryTerms/form.blade.php @@ -1,28 +1,26 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'datahub_id', - 'label' => 'Datahub ID', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'title', - 'label' => 'API Title', - 'disabled' => true - ]) + + - @formField('input', [ - 'name' => 'subtype', - 'label' => 'Sub Type', - 'disabled' => true - ]) + - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Thumbnail Image', - 'name' => 'thumb', - 'note' => 'Minimum image width 1500px' - ]) + @stop diff --git a/resources/views/twill/collectionFeatures/form.blade.php b/resources/views/twill/collectionFeatures/form.blade.php index 95712ba1c9..12c2e563ac 100644 --- a/resources/views/twill/collectionFeatures/form.blade.php +++ b/resources/views/twill/collectionFeatures/form.blade.php @@ -10,12 +10,12 @@ } @endphp - @formField('radios', [ - 'name' => '_featureType', - 'label' => 'Feature type', - 'default' => $selectedFeature, - 'inline' => true, - 'options' => [ + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => '_featureType', - 'renderForBlocks' => false, - 'fieldValues' => 'articles' - ]) - @formField('browser', [ - 'routePrefix' => 'collection.articlesPublications', - 'moduleName' => 'articles', - 'name' => 'articles', - 'label' => 'Article' - ]) - @endcomponent + + + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => '_featureType', - 'renderForBlocks' => false, - 'fieldValues' => 'artworks' - ]) - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'artworks', - 'name' => 'artworks', - 'label' => 'Artworks' - ]) - @endcomponent + + + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => '_featureType', - 'renderForBlocks' => false, - 'fieldValues' => 'highlights' - ]) - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'highlights', - 'name' => 'highlights', - 'label' => 'Highlight' - ]) - @endcomponent + + + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => '_featureType', - 'renderForBlocks' => false, - 'fieldValues' => 'experiences' - ]) - @formField('browser', [ - 'routePrefix' => 'collection.interactiveFeatures', - 'moduleName' => 'experiences', - 'name' => 'experiences', - 'label' => 'Interactive Feature' - ]) - @endcomponent + + + @stop diff --git a/resources/views/twill/departments/form.blade.php b/resources/views/twill/departments/form.blade.php index c886dfda4d..c44ce43a39 100644 --- a/resources/views/twill/departments/form.blade.php +++ b/resources/views/twill/departments/form.blade.php @@ -2,44 +2,40 @@ @section('contentFields') - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Hero Image', - 'name' => 'hero', - 'note' => 'Minimum image width 2000px' - ]) - - @formField('input', [ - 'name' => 'caption', - 'label' => 'Caption', - 'maxlength' => 255 - ]) - - @formField('wysiwyg', [ - 'name' => 'intro', - 'label' => 'Intro', - 'toolbarOptions' => [ - 'italic', 'link', 'strike' - ], - ]) - - @formField('input', [ - 'name' => 'datahub_id', - 'label' => 'Datahub ID', - 'disabled' => true - ]) + + + + + + + @stop @section('fieldsets') - + - @formField('input', [ - 'name' => 'pinboard_title', - 'label' => 'Artwork Pinboard Title', - 'note' => 'Defaults to "Artworks" if empty', - ]) +

Use the field below to control which artworks are displayed on the page. The order specified here will be preserved. If there are no artworks selected here, we will filter artworks from CITI by departmental publish category and order the results by relevance.

@@ -47,86 +43,91 @@ $maxArtworks = \App\Http\Controllers\DepartmentController::ARTWORKS_PER_PAGE; @endphp - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'artworks', - 'name' => 'customRelatedArtworks', - 'label' => 'Artworks', - 'max' => $maxArtworks, - ]) +

You may select up to {{ $maxArtworks }} artworks, but you don't have to max out that number. If you select fewer than {{ $maxArtworks }} artworks, there are two options. First, we can do nothing and display only the artworks you select. Secondly, we can append artworks from CITI as described above, filtered by departmental category and ordered by relevance. Any artworks you select will be filtered out to prevent duplication. This second option is enabled by default to allow departments more time to select artworks to feature.

- @formField('checkbox', [ - 'name' => 'should_append_artworks', - 'label' => 'Automatically append artworks from CITI to this list', - 'default' => true, - ]) - - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'should_append_artworks', - 'renderForBlocks' => false, - 'fieldValues' => true - ]) - @formField('select', [ - 'name' => 'max_artworks', - 'label' => 'Max Artworks', - 'note' => 'Artworks will be appended until this number is reached', - 'default' => $maxArtworks, - 'options' => array_map(function($i) { - return [ - 'value' => $i, - 'label' => $i, - ]; - }, array_reverse(range(12, $maxArtworks))), - ]) - @endcomponent - -
- - + + + + + @php + $options = array_map(function($i) { + return [ + 'value' => $i, + 'label' => $i, + ]; + }, array_reverse(range(12, $maxArtworks))) + @endphp + + + + + + +

Use "Custom related items" to relate as many items as possible. No more than 12 will be shown on the department's detail page, but all of them will be used to augment search. See special note on exhibitions below.

- @formField('browser', [ - 'name' => 'related_items', - 'endpoints' => [ +

At this time, we are unable to use CITI data to determine which exhibitions are related to each department, so we cannot automatically add them to department pages. Feel free to relate historic exhibitions here.

-
+ @include('twill.partials.meta') diff --git a/resources/views/twill/digitalPublications/articles/form.blade.php b/resources/views/twill/digitalPublications/articles/form.blade.php index d0395e4600..c718effcbc 100644 --- a/resources/views/twill/digitalPublications/articles/form.blade.php +++ b/resources/views/twill/digitalPublications/articles/form.blade.php @@ -1,208 +1,187 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' - ]) - - @formField('date_picker', [ - 'name' => 'date', - 'label' => 'Display date', - 'required' => true, - 'withTime' => false, - 'note' => 'Required', - ]) - - @formField('select', [ - 'name' => 'article_type', - 'label' => 'Type', - 'placeholder' => 'Select a type', - 'default' => 'text', - 'options' => $types, - ]) - @formField('select', [ - 'name' => 'listing_display', - 'label' => 'Listing display', - 'placeholder' => 'Select a listing display', - 'default' => 'default', - 'options' => [ + + + + + + + + + + + + + + + + @stop @section('fieldsets') - @formFieldset([ - 'id' => 'editorial-content', - 'title' => 'Editorial Content', - ]) - @formConnectedFields([ - 'fieldName' => 'article_type', - 'fieldValues' => 'grouping', - 'renderForBlocks' => false, - ]) - @formField('wysiwyg', [ - 'name' => 'grouping_description', - 'label' => 'Description', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'toolbarOptions' => [ - 'italic', 'link', - ], - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Grouping image', - 'name' => 'grouping_hero', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Mobile grouping image', - 'name' => 'grouping_mobile_hero', - 'note' => 'Minimum image width 2000px' - ]) - @endformConnectedFields - - @formConnectedFields([ - 'fieldName' => 'article_type', - 'fieldValues' => 'entry', - 'renderForBlocks' => false, - ]) - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Listing image', - 'name' => 'hero', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Mobile listing image', - 'name' => 'mobile_hero', - 'note' => 'Minimum image width 2000px' - ]) - - @formField('input', [ - 'name' => 'author_display', - 'label' => 'Author display', - 'note' => 'On Entry type articles, authorship is prepended with "Entry by"', - ]) - - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'authors', - 'name' => 'authors', - 'label' => 'Authors', - 'max' => 10, - 'note' => 'On Entry type articles, authorship is prepended with "Entry by"', - ]) - @endformConnectedFields - - @formConnectedFields([ - 'fieldName' => 'article_type', - 'fieldValues' => ['about', 'text', 'work'], - 'renderForBlocks' => false, - ]) - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Hero image', - 'name' => 'hero', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'no_crop' => false, - 'label' => 'Mobile hero image', - 'name' => 'mobile_hero', - 'note' => 'Minimum image width 2000px' - ]) - - @formField('input', [ - 'name' => 'author_display', - 'label' => 'Author display', - ]) - - @formField('browser', [ - 'routePrefix' => 'collection', - 'moduleName' => 'authors', - 'name' => 'authors', - 'label' => 'Authors', - 'max' => 10, - ]) - @endformConnectedFields - - @formConnectedFields([ - 'fieldName' => 'article_type', - 'fieldValues' => 'grouping', - 'isEqual' => false, - 'renderForBlocks' => false, - ]) - @formField('input', [ - 'name' => 'label', - 'label' => 'Article label', - 'note' => 'Used in the "eyebrow" of cards on the publication page', - ]) - - @formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'List description', - 'maxlength' => 255, - 'note' => 'Max 255 characters. Will be used on the main landing, search, and social media.', - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'cite_as', - 'label' => 'How to Cite', - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'references', - 'label' => 'References', - 'toolbarOptions' => [ - 'italic', 'link', 'list-ordered', 'list-unordered', - ], - ]) - - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @php + $blocks = BlockHelpers::getBlocksForEditor([ '360_embed', '360_modal', '3d_embed', @@ -233,10 +212,15 @@ 'tombstone', 'tour_stop', 'video', - ]) - ]) - @endformConnectedFields - @endformFieldset + ]); + @endphp + + + + + @include('twill.partials.meta') @stop diff --git a/resources/views/twill/digitalPublications/form.blade.php b/resources/views/twill/digitalPublications/form.blade.php index 4a69f7e3c3..3fe735a6e0 100644 --- a/resources/views/twill/digitalPublications/form.blade.php +++ b/resources/views/twill/digitalPublications/form.blade.php @@ -16,27 +16,23 @@ - @formField('wysiwyg', [ - 'name' => 'header_subtitle_display', - 'label' => 'Subtitle for header', - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Hero image', - 'name' => 'listing', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Hero image, mobile', - 'name' => 'mobile_listing', - 'note' => 'Minimum image width 2000px', - ]) + + + + + @formField('color_select', [ 'name' => 'bgcolor', @@ -45,53 +41,45 @@ 'columns' => 3, ]) - @formField('wysiwyg', [ - 'type' => 'textarea', - 'name' => 'hero_caption', - 'label' => 'Hero image caption', - 'note' => 'Usually used for copyright', - 'maxlength' => 255, - 'toolbarOptions' => [ - 'italic', 'link', - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'listing_description', - 'label' => 'Listing description', - 'maxlength' => 300, - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('checkbox', [ - 'name' => 'is_dsc_stub', - 'label' => 'This page is a stub that links out to publications.artic.edu', - ]) + + + + + @stop @section('fieldsets') - @formConnectedFields([ - 'fieldName' => 'is_dsc_stub', - 'fieldValues' => true, - ]) - @formFieldset([ - 'id' => 'fields_for_dsc_stub', - 'title' => 'DSC Stub Fields', - ]) + +

This content is only shown when the page is a DSC stub.


- @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Banner image', - 'name' => 'banner', - 'note' => 'Minimum image width 3000px' - ]) + - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + @php + $blocks = BlockHelpers::getBlocksForEditor([ '3d_model', 'accordion', 'hr', @@ -105,48 +93,49 @@ 'split_block', 'timeline', 'video', - ]), - ]) - @endformFieldset - @endformConnectedFields - - @formFieldset([ - 'id' => 'fields_for_full_publication', - 'title' => 'Publication Fields', - ]) - @formField('wysiwyg', [ - 'name' => 'welcome_note_display', - 'label' => 'Welcome note text', - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('browser', [ - 'name' => 'welcome_note_section', - 'label' => 'Welcome note section', - 'endpoint' => route('twill.collection.articlesPublications.digitalPublications.articles.subbrowser',[ - 'digitalPublication' => $item->id, - ]), - 'max' => 1, - ]) - - @formField('wysiwyg', [ - 'name' => 'sponsor_display', - 'label' => 'Sponsors', - 'toolbarOptions' => [ - 'italic', - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'cite_as', - 'label' => 'How to Cite', - 'toolbarOptions' => [ - 'italic', - ], - ]) - @endformConnectedFields + ]); + @endphp + + + +
+
+ + + + + + + + + + + @include('twill.partials.related') diff --git a/resources/views/twill/educatorResources/form.blade.php b/resources/views/twill/educatorResources/form.blade.php index ce4b13bf58..84a794bfd3 100644 --- a/resources/views/twill/educatorResources/form.blade.php +++ b/resources/views/twill/educatorResources/form.blade.php @@ -1,55 +1,56 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Banner image', - 'name' => 'banner', - 'note' => 'Minimum image width 2000px' - ]) - - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Listing image', - 'name' => 'listing', - 'note' => 'Minimum image width 3000px' - ]) - - @formField('wysiwyg', [ - 'name' => 'listing_description', - 'label' => 'Listing description', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'toolbarOptions' => [ - 'italic' - ], - ]) - - @formField('input', [ - 'name' => 'short_description', - 'label' => 'Short description', - 'type' => 'textarea', - 'maxlength' => 255 - ]) - - @formField('multi_select', [ - 'name' => 'categories', - 'label' => 'Categories', - 'options' => $categoriesList, - 'placeholder' => 'Select some categories', - ]) - - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + + + + + + + + + + + + + @php + $blocks = BlockHelpers::getBlocksForEditor([ 'paragraph', 'image', 'hr', 'artwork', 'split_block', 'gallery_new', 'link', 'video', 'quote', 'tour_stop', 'accordion', 'media_embed', 'list', 'timeline', 'button', 'newsletter_signup_inline', 'audio_player', 'membership_banner', '3d_model', 'mobile_app', 'citiation' - ]) - ]) + ]); + @endphp + + @stop @section('fieldsets') diff --git a/resources/views/twill/emailSeries/form.blade.php b/resources/views/twill/emailSeries/form.blade.php index 6e22b6debd..3f3c538c8c 100644 --- a/resources/views/twill/emailSeries/form.blade.php +++ b/resources/views/twill/emailSeries/form.blade.php @@ -6,39 +6,39 @@ @section('contentFields') - @formField('input', [ - 'name' => 'id', - 'label' => 'Email Series ID', - 'disabled' => true - ]) - - @formField('input', [ - 'name' => 'timing_message', - 'label' => 'Timing information', - 'note' => 'Will be appended in parentheses to the label' - ]) + + +
- @formField('checkbox', [ - 'name' => 'show_affiliate', - 'label' => 'Show "Include affiliate-specific copy" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_member', - 'label' => 'Show "Include member-specific copy" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_luminary', - 'label' => 'Show "Include luminary-specific copy" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_nonmember', - 'label' => 'Show "Include nonmember-specific copy" option' - ]) +

The phrase "(overrides default copy)" will be appended to each option in the event form.

@@ -46,44 +46,42 @@
- @formField('wysiwyg', [ - 'name' => 'alert_message', - 'label' => 'General alert message', - 'note' => 'Will be displayed before the copy selection options', - 'toolbarOptions' => [ - 'bold', 'italic', 'link' - ], - ]) + @stop @section('fieldsets') - + - @formField('checkbox', [ - 'name' => 'show_affiliate_test', - 'label' => 'Show "Send affiliate test" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_member_test', - 'label' => 'Show "Send member test" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_luminary_test', - 'label' => 'Show "Send luminary test" option' - ]) + - @formField('checkbox', [ - 'name' => 'show_nonmember_test', - 'label' => 'Show "Send nonmember test" option' - ]) +

If only one option is selected here, we won't show it on the event form. We will assume that if the email series is selected for testing, then it should be sent only to the member group selected here.

-
+ @endsection diff --git a/resources/views/twill/eventPrograms/create.blade.php b/resources/views/twill/eventPrograms/create.blade.php index c3bb9a09a4..90237b522e 100644 --- a/resources/views/twill/eventPrograms/create.blade.php +++ b/resources/views/twill/eventPrograms/create.blade.php @@ -1,12 +1,12 @@ @include('twill.partials.create') -@formField('checkbox', [ - 'name' => 'is_affiliate_group', - 'label' => 'This program represents an affiliate group', -]) + -@formField('checkbox', [ - 'name' => 'is_event_host', - 'label' => 'This program represents an event host', -]) + diff --git a/resources/views/twill/events/form.blade.php b/resources/views/twill/events/form.blade.php index 572b4e17cc..07dccc4953 100644 --- a/resources/views/twill/events/form.blade.php +++ b/resources/views/twill/events/form.blade.php @@ -1,14 +1,14 @@ @extends('twill::layouts.form', [ 'disableContentFieldset' => true, 'additionalFieldsets' => [ - ['fieldset' => 'title_and_image', 'label' => 'Title and Image'], + ['fieldset' => 'title_and_image', 'label' => 'Title'], ['fieldset' => 'dates', 'label' => 'Date Rules'], - ['fieldset' => 'ticketing', 'label' => 'Ticketing Info'], - ['fieldset' => 'sales_site', 'label' => 'Sales Site'], + ['fieldset' => 'ticketing', 'label' => 'Ticketing'], + ['fieldset' => 'sales_site', 'label' => 'Sales'], ['fieldset' => 'content', 'label' => 'Content'], ['fieldset' => 'sponsors', 'label' => 'Sponsors'], ['fieldset' => 'related_elements', 'label' => 'Related'], - ['fieldset' => 'filters_and_types', 'label' => 'Filters and Types'], + ['fieldset' => 'filters_and_types', 'label' => 'Filters'], ['fieldset' => 'metadata', 'label' => 'Metadata'], ['fieldset' => 'event_series', 'label' => 'Email Series'], ] @@ -16,110 +16,109 @@ @section('fieldsets') - - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' - ]) + +
- @formField('select', [ - 'name' => 'layout_type', - 'label' => 'Hero type', - 'options' => $eventLayoutsList, - 'default' => '0' - ]) + @include('twill.partials.hero')

Note: Hero images are used by event listings, ticketing pages, and the mobile app.

-
- - - @formField('input', [ - 'name' => 'all_dates_cms', - 'label' => 'All computed dates', - 'note' => 'Dates built using all rules below.', - 'type' => 'textarea', - 'disabled' => true, - 'rows' => 2 - ]) - - @component('twill::partials.form.utils._columns') - @slot('left') - @formField('select', [ - 'name' => 'start_time', - 'label' => 'Start Time', - 'options' => DateHelpers::hoursSelectOptions(), - 'required' => true - ]) - - @formField('select', [ - 'name' => 'door_time', - 'label' => 'Door Time', - 'options' => DateHelpers::hoursSelectOptions() - ]) - @endslot - @slot('right') - @formField('select', [ - 'name' => 'end_time', - 'label' => 'End Time', - 'options' => DateHelpers::hoursSelectOptions(), - 'required' => true - ]) - @endslot - @endcomponent - - @formField('input', [ - 'name' => 'forced_date', - 'label' => 'Force the event to show this text as date', - 'note' => 'Optional, the event will show this instead of the automatic computed date', - 'type' => 'text' - ]) - - @formField('repeater', [ - 'type' => 'date_rule', - 'title' => 'Date rule', - ]) - - - + + + + + + + + + + + + + + + + + + + + + +

Select the "Ticketed Event" box when you want a "Buy Tickets" button to appear on the event page. If the event is associated with the ticketing system, the button will not appear until the ticketed event is on sale.

- @formField('checkbox', [ - 'name' => 'is_ticketed', - 'label' => 'Ticketed Event' - ]) - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'max' => 1, - 'moduleName' => 'ticketedEvents', - 'name' => 'ticketedEvent', - 'label' => 'Event from ticketing system' - ]) - - @formField('input', [ - 'name' => 'rsvp_link', - 'label' => 'Custom tickets link', - 'note' => 'Only use this field when using an alternate sales platform, e.g., Eventbrite.' - ]) - - @formField('input', [ - 'name' => 'buy_tickets_link', - 'label' => 'Button link preview', - 'readonly' => 'true', - 'note' => 'Save and refresh the page to see the link preview', - ]) - - @formField('radios', [ - 'name' => 'buy_button_text', - 'label' => 'Sales button text', - 'default' => 'Buy Tickets', - 'inline' => true, - 'options' => [ + + + + + + + + +
- @formField('wysiwyg', [ - 'name' => 'buy_button_caption', - 'label' => 'Pricing or attendance information', - 'note' => 'e.g. add cost of event or other relevant information', - 'toolbarOptions' => ['bold'] - ]) +

If you attach an event from the ticketing system, we will automatically display the date and time of when its registration opens above this text in the sidebar.

@@ -150,34 +149,34 @@

Event Tags
Will display a tag above the event title

- @formField('checkbox', [ - 'name' => 'is_member_exclusive', - 'label' => 'Member Exclusive', - ]) +

Event Labels
Will display a label beneath the event time

- @formField('checkbox', [ - 'name' => 'is_registration_required', - 'label' => 'Registration Required', - ]) + - @formField('checkbox', [ - 'name' => 'is_sold_out', - 'label' => 'Sold Out', - ]) + - @formField('checkbox', [ - 'name' => 'is_rsvp', - 'label' => 'RSVP', - ]) + - @formField('checkbox', [ - 'name' => 'is_free', - 'label' => 'Free', - ]) +

If you attach an event from the ticketing system, we will handle "Sold Out" for you automatically.

@@ -185,219 +184,230 @@

Private
Does not generate any labels or tags, only excludes the event from the listing

- @formField('checkbox', [ - 'name' => 'is_private', - 'label' => 'Is Private', - ]) - - @formField('checkbox', [ - 'name' => 'is_sales_button_hidden', - 'label' => 'Hide Sales Button', - ]) -
- - - @formField('checkbox', [ - 'name' => 'is_admission_required', - 'label' => 'Is Admission Required', - ]) - - @formField('checkbox', [ - 'name' => 'is_after_hours', - 'label' => 'Is After Hours', - ]) - - @formField('select', [ - 'name' => 'entrance', - 'label' => 'Entrance', - 'options' => $eventEntrancesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]'), - 'default' => \App\Models\Event::NULL_OPTION, // No effect? - ]) - - @formField('checkbox', [ - 'name' => 'is_virtual_event', - 'label' => 'Is Virtual Event', - ]) - - @formField('input', [ - 'name' => 'virtual_event_url', - 'label' => 'Virtual event URL', - ]) - - @formField('input', [ - 'name' => 'virtual_event_passcode', - 'label' => 'Virtual event passcode', - ]) - - - + + + + + + + + + + + @php + $eventEntrancesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]'); + @endphp + + + + + + + + + + +

Note: For the following three fields, please keep character count below 255.

- @formField('wysiwyg', [ - 'name' => 'description', - 'label' => 'Header', - 'maxlength' => 255, - 'note' => 'Used by website, displayed above main content', - 'toolbarOptions' => [ - 'italic' - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'short_description', - 'label' => 'Short description (required)', - 'note' => 'Used by Sales Site and for event emails', - 'required' => true, - 'toolbarOptions' => [ - 'italic' - ], - ]) - - @formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'Listing description', - 'maxlength' => 255, - 'note' => 'Used by website and Mobile App for listings', - 'required' => true, - 'toolbarOptions' => [ - 'italic' - ], - ]) + + + + +
- @formField('input', [ - 'name' => 'location', - 'label' => 'Location', - 'note' => 'Displayed in left sidebar', - ]) + - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + @php + $blocks = BlockHelpers::getBlocksForEditor([ 'paragraph', 'image', 'hr', 'artwork', 'split_block', 'gallery_new', 'link', 'video', 'quote', 'tour_stop', 'media_embed', 'list', 'timeline', 'button', 'newsletter_signup_inline', 'audio_player', '3d_model', 'mobile_app' - ]) - ]) -
- - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'sponsors', - 'name' => 'sponsors', - 'label' => 'Sponsors', - 'note' => 'Display content blocks from this sponsor', - 'max' => 1 - ]) - - - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'events', - 'name' => 'events', - 'label' => 'Related events', - 'note' => 'Show up to 4 events at bottom of page', - 'max' => 4 - ]) - - - - @formField('select', [ - 'name' => 'event_type', - 'label' => 'Event type (preferred)', - 'options' => $eventTypesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]'), - 'default' => \App\Models\Event::NULL_OPTION, // No effect? - ]) - - @formField('multi_select', [ - 'name' => 'alt_types', - 'label' => 'Event type (alternative)', - 'note' => 'Used to enhance filtering', - 'options' => $eventTypesList, - ]) - - @formField('select', [ - 'name' => 'audience', - 'label' => 'Event audience (preferred)', - 'options' => $eventAudiencesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]'), - 'default' => \App\Models\Event::NULL_OPTION, // No effect? - ]) - - @formField('multi_select', [ - 'name' => 'alt_audiences', - 'label' => 'Event audience (alternative)', - 'note' => 'Used to enhance filtering', - 'options' => $eventAudiencesList, - ]) - - @formField('multi_select', [ - 'name' => 'programs', - 'label' => 'Programs', - 'note' => 'To view program URLS, select programs below, update event, and refresh the page', - 'options' => $eventProgramsList, - ]) - - @formField('input', [ - 'name' => 'program_urls', - 'label' => 'Program URLs', - 'type' => 'textarea', - 'rows' => $item->programs->count(), - 'readonly' => 'true', - ]) - + ]); + @endphp + + + + + + + + + + + + + + @php + $eventTypesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]'); + $eventAudiencesList->put(strval(\App\Models\Event::NULL_OPTION), '[None]') + @endphp + + + + + + + + + + + + + {{-- WEB-2236: Use 'twill.partials.meta' as a component --}} - - @formField('input', [ - 'name' => 'meta_title', - 'label' => 'Metadata Title' - ]) + + - @formField('input', [ - 'name' => 'meta_description', - 'label' => 'Metadata Description', - 'type' => 'textarea' - ]) + - @formField('input', [ - 'name' => 'search_tags', - 'label' => 'Internal Search Tags', - 'type' => 'textarea' - ]) +

Comma-separatated list of words or phrases. Don't worry about grammar or similar word variations. This field is intended to assist our internal search engine in finding your content. These tags will not be shown to website users and will have no effect on external search engines, e.g. Google.

-
+ @if (config('aic.show_event_series_emails')) - +

Please review the documentation for email series before proceeding.

- @formField('checkbox', [ - 'name' => 'add_to_event_email_series', - 'label' => 'Add to event email series', - ]) + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'add_to_event_email_series', - 'renderForBlocks' => false, - 'fieldValues' => true - ]) +
- @formField('select', [ - 'name' => 'event_host_id', - 'label' => 'Event Host', - 'options' => $eventHostsList->put( - // TODO: Use new null option! - strval(\App\Models\Event::NULL_OPTION_EVENT_HOST), '[None]' - ), - 'default' => \App\Models\Event::NULL_OPTION_EVENT_HOST, // No effect? - 'note' => 'This field is mandatory and will be used to determine audience list for email send', - 'required' => true, - ]) - + @php + // TODO: Use new null option! + $options = $eventHostsList->put(strval(\App\Models\Event::NULL_OPTION_EVENT_HOST), '[None]'); + @endphp + +

Please select the emails you wish to opt-in to:

@@ -413,16 +423,17 @@ } @endphp - @formField('checkbox', [ - 'name' => $currentSeriesName, - 'label' => $currentSeriesTitle, - ]) - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => $currentSeriesName, - 'renderForBlocks' => false, - 'fieldValues' => true - ]) + + +
@@ -444,54 +455,57 @@ @foreach ($enabledSubFields as $subFieldName => $subFieldLabel) - @formField('checkbox', [ - 'name' => $currentSeriesName . '_' . $subFieldName . '_override', - 'label' => ($useShortLabel ? - 'Override default copy' : - 'Include ' . $subFieldLabel . '-specific copy (overrides default copy)' - ), - ]) + @php + $name = $currentSeriesName . '_' . $subFieldName . '_override'; + $label = $useShortLabel ? 'Override default copy' : 'Include ' . $subFieldLabel . '-specific copy (overrides default copy)'; + @endphp + + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => $currentSeriesName . '_' . $subFieldName . '_override', - 'renderForBlocks' => false, - 'fieldValues' => true - ]) +
- @formField('wysiwyg', [ - 'name' => $currentSeriesName . '_' . $subFieldName . '_copy', - 'label' => '', - 'toolbarOptions' => [ - 'bold', 'italic', 'link' - ], - ]) + @php + $name = $currentSeriesName . '_' . $subFieldName . '_copy'; + @endphp -
+ - @endcomponent +
+
@endforeach - @endcomponent +
@endforeach
- @formField('input', [ - 'name' => 'join_url', - 'label' => 'Join URL' - ]) + - @formField('input', [ - 'name' => 'survey_url', - 'label' => 'Questionnaire Survey URL', - 'note' => 'Sent 1 day after user registers if URL is populated', - ]) +
@@ -499,31 +513,32 @@
- @formField('checkbox', [ - 'name' => 'send_test_emails', - 'label' => 'Send test emails after save', - ]) + - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'send_test_emails', - 'renderForBlocks' => false, - 'fieldValues' => true - ]) +

By default, test emails will be sent to the Email Marketing Manager and to any addresses specified in the list that is associated with this event's host in Salesforce. Use this field to add your email to the list of recipients.

- @formField('input', [ - 'name' => 'test_emails', - 'label' => 'Extra Email Addresses', - 'note' => 'One or more comma-separated email addresses', - ]) +

Please select which test emails you'd like to send:

+ @foreach ( \App\Models\EmailSeries::ordered()->get() as $series) @php @@ -535,16 +550,20 @@ } @endphp - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => $currentSeriesName, - 'renderForBlocks' => false, - 'fieldValues' => true - ]) + - @formField('checkbox', [ - 'name' => $currentSeriesName . '_test', - 'label' => $currentSeriesTitle, - ]) + @php + $name = $currentSeriesName . '_test'; + @endphp + + @php $subFields = \App\Models\EmailSeries::$memberTypes; @@ -562,38 +581,47 @@ @elseif(count($enabledSubFields) > 1) - @component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => $currentSeriesName . '_test', - 'renderForBlocks' => false, - 'fieldValues' => true - ]) + @php + $name = $currentSeriesName . '_test'; + @endphp + +
@foreach ($enabledSubFields as $subFieldName => $subFieldLabel) - @formField('checkbox', [ - 'name' => $currentSeriesName . '_test_' . $subFieldName, - 'label' => 'Send ' . $subFieldLabel . ' test', - ]) + @php + $name = $currentSeriesName . '_test_' . $subFieldName; + $label = 'Send ' . $subFieldLabel . ' test'; + @endphp + @endforeach
- @endcomponent +
@endif - @endcomponent +
+ @endforeach - @endcomponent +
- @endcomponent + -
+ @endif diff --git a/resources/views/twill/exhibitionPressRooms/form.blade.php b/resources/views/twill/exhibitionPressRooms/form.blade.php index 1a50fe70d2..326ac87a91 100644 --- a/resources/views/twill/exhibitionPressRooms/form.blade.php +++ b/resources/views/twill/exhibitionPressRooms/form.blade.php @@ -1,42 +1,45 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics. e.g. Nighthawks' - ]) + - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Banner image', - 'name' => 'banner', - 'note' => 'Minimum image width 2000px' - ]) + - @formField('medias', [ - 'with_multiple' => false, - 'label' => 'Listing image', - 'name' => 'listing', - 'note' => 'Minimum image width 3000px' - ]) + - @formField('input', [ - 'name' => 'listing_description', - 'label' => 'Listing description', - 'type' => 'textarea', - 'maxlength' => 255 - ]) + - @formField('input', [ - 'name' => 'short_description', - 'label' => 'Short description', - 'type' => 'textarea', - 'maxlength' => 255 - ]) - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + + + @php + $blocks = BlockHelpers::getBlocksForEditor([ 'paragraph', 'image', 'hr', 'split_block', 'link', 'video', 'accordion', 'media_embed', 'list', 'timeline', 'button', 'newsletter_signup_inline', 'membership_banner', '3d_model' - ]) - ]) + ]); + @endphp + + @stop diff --git a/resources/views/twill/exhibitions/form.blade.php b/resources/views/twill/exhibitions/form.blade.php index 86b6541e83..8c5b4bbfc7 100644 --- a/resources/views/twill/exhibitions/form.blade.php +++ b/resources/views/twill/exhibitions/form.blade.php @@ -10,217 +10,217 @@ ]) @section('contentFields') - @formField('input', [ - 'name' => 'title_display', - 'label' => 'Title formatting (optional)', - 'note' => 'Use tag to add italics, e.g. Nighthawks' - ]) + - @formField('select', [ - 'name' => 'cms_exhibition_type', - 'label' => 'Exhibition layout', - 'options' => $exhibitionTypesList, - 'default' => '0', - 'note' => '"Special" crop is used for "Special exhibition" layout', - ]) + @include('twill.partials.hero') - @component('twill::partials.form.utils._columns') - @slot('left') - @formField('date_picker', [ - 'name' => 'public_start_date', - 'label' => 'Public Start Date', - 'withTime' => false, - 'placeholder' => isset($item) && $item->aic_start_at ? (new \Carbon\Carbon($item->aic_start_at))->toFormattedDateString() : null, - ]) - @endslot - @slot('right') - @formField('date_picker', [ - 'name' => 'public_end_date', - 'label' => 'Public End Date', - 'withTime' => false, - 'placeholder' => isset($item) && $item->aic_end_at ? (new \Carbon\Carbon($item->aic_end_at))->toFormattedDateString() : null, - ]) - @endslot - @endcomponent + + + + + + + + - @component('twill::partials.form.utils._columns') - @slot('left') - @formField('date_picker', [ - 'name' => 'member_preview_start_date', - 'label' => 'Member Preview Start Date', - 'withTime' => false, - 'placeholder' => '', - ]) - @endslot - @slot('right') - @formField('date_picker', [ - 'name' => 'member_preview_end_date', - 'label' => 'Member Preview End Date', - 'withTime' => false, - 'placeholder' => '', - ]) - @endslot - @endcomponent + + + + + + + + - @formField('input', [ - 'name' => 'date_display_override', - 'label' => 'Date display override', - 'maxlength' => 255, - 'note' => 'Override exhibition start and end dates with custom text' - ]) + - @formField('wysiwyg', [ - 'name' => 'header_copy', - 'label' => 'Header', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'toolbarOptions' => [ - 'italic' - ], - ]) + - @formField('wysiwyg', [ - 'name' => 'list_description', - 'label' => 'Listing description', - 'maxlength' => 255, - 'note' => 'Max 255 characters', - 'required' => true, - 'toolbarOptions' => [ - 'italic' - ], - ]) + - @formField('wysiwyg', [ - 'name' => 'exhibition_message', - 'label' => 'Pricing or attendance information', - 'toolbarOptions' => ['bold'] - ]) + - @formField('input', [ - 'name' => 'exhibition_location', - 'label' => 'Exhibition location', - 'note' => 'Override CITI gallery location' - ]) + - @formField('select', [ - 'name' => 'status_override', - 'label' => 'Exhibition status', - 'note' => 'Override exhibition status flag', - 'options' => $exhibitionStatusesList, - ]) + - @formField('input', [ - 'name' => 'type_override', - 'label' => 'Exhibition eyebrow', - 'note' => 'Override exhibition eyebrow', - 'type' => 'text', - ]) + - @formField('block_editor', [ - 'blocks' => BlockHelpers::getBlocksForEditor([ + @php + $blocks = BlockHelpers::getBlocksForEditor([ 'paragraph', 'image', 'hr', 'artwork', 'split_block', 'gallery_new', 'link', 'video', 'quote', 'tour_stop', 'accordion', 'media_embed', 'list', 'timeline', 'button', 'newsletter_signup_inline', 'audio_player', '360_embed', 'vtour_embed', 'mirador_embed', 'event', 'feature_2x', 'layered_image_viewer', '3d_model', 'feature_4x', 'mobile_app', 'mirador_modal', '360_modal' - ]) - ]) + ]); + @endphp + + @stop @section('fieldsets') - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'sponsors', - 'name' => 'sponsors', - 'label' => 'Sponsors', - 'note' => 'Display content blocks from this sponsor', - 'max' => 1 - ]) - + + + - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'waitTimes', - 'name' => 'waitTimes', - 'label' => 'Wait Time', - 'note' => 'Select a queue to display the wait time for', - 'max' => 1 - ]) + + - @formField('wysiwyg', [ - 'name' => 'wait_time_override', - 'label' => 'Wait time copy', - 'maxlength' => 255, - 'note' => 'Content will display below wait time data', - 'toolbarOptions' => [ - 'italic' - ], - ]) - + + - - @formField('input', [ - 'name' => 'datahub_id', - 'label' => 'Datahub ID', - 'disabled' => true - ]) + + - @formField('multi_select', [ - 'name' => 'siteTags', - 'label' => 'Tags', - 'options' => $siteTagsList, - 'placeholder' => 'Select some tags', - ]) - - - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'max' => 4, - 'name' => 'exhibitions', - 'label' => 'Related exhibitions' - ]) + + + + - @formField('browser', [ - 'routePrefix' => 'exhibitionsEvents', - 'moduleName' => 'events', - 'name' => 'events', - 'label' => 'Related events', - 'note' => 'Select related events', - 'max' => 20 - ]) - + + - - @formField('repeater', ['type' => 'offers']) + +
- @formField('input', [ - 'name' => 'product_section_title', - 'label' => 'Shop section title', - 'note' => 'Defaults to "Related Products" if blank' - ]) + - @formField('input', [ - 'name' => 'product_section_title_link_label', - 'label' => 'Shop link label', - 'note' => 'Defaults to "Explore the shop" if blank' - ]) + - @formField('input', [ - 'name' => 'product_section_title_link_href', - 'label' => 'Shop link URL', - 'note' => 'Defaults to "https://shop.artic.edu" if blank' - ]) + - @formField('browser', [ - 'routePrefix' => 'general', - 'name' => 'shopItems', - 'moduleName' => 'shopItems', - 'label' => 'Shop items', - 'max' => 5, - ]) -
+ + @component('twill.partials.featured-related', ['form_fields' => $form_fields, 'autoRelated' => $autoRelated]) @slot('routePrefix', 'exhibitionsEvents') @@ -231,78 +231,78 @@ @include('twill.partials.meta') - - @formField('input', [ - 'name' => 'title', - 'label' => 'Title', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'description', - 'label' => 'Description', - 'type' => 'textarea', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'short_description', - 'label' => 'Short description', - 'type' => 'textarea', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'status', - 'label' => 'Status', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'lake_guid', - 'label' => 'DAMS GUID', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'department_id', - 'label' => 'Department ID', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'gallery_title', - 'label' => 'Gallery', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'gallery_id', - 'label' => 'Gallery ID', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'type', - 'label' => 'Type', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'updated_at', - 'label' => 'Updated at', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'artwork_ids', - 'label' => 'Artwork IDs', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'venue_ids', - 'label' => 'Venue IDs', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'site_ids', - 'label' => 'Site IDs', - 'disabled' => true - ]) - @formField('input', [ - 'name' => 'event_ids', - 'label' => 'Event IDs', - 'disabled' => true - ]) - + + + + + + + + + + + + + + + + @stop diff --git a/resources/views/twill/experienceImages/form.blade.php b/resources/views/twill/experienceImages/form.blade.php index 2a22637c02..4899d1a651 100644 --- a/resources/views/twill/experienceImages/form.blade.php +++ b/resources/views/twill/experienceImages/form.blade.php @@ -1,9 +1,9 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'description', - 'label' => 'Description', - 'maxlength' => 100 - ]) + @stop diff --git a/resources/views/twill/experienceModals/form.blade.php b/resources/views/twill/experienceModals/form.blade.php index 2a22637c02..4899d1a651 100644 --- a/resources/views/twill/experienceModals/form.blade.php +++ b/resources/views/twill/experienceModals/form.blade.php @@ -1,9 +1,9 @@ @extends('twill::layouts.form') @section('contentFields') - @formField('input', [ - 'name' => 'description', - 'label' => 'Description', - 'maxlength' => 100 - ]) + @stop diff --git a/resources/views/twill/experiences/create.blade.php b/resources/views/twill/experiences/create.blade.php index 94bc569a85..9dd1abc6b3 100644 --- a/resources/views/twill/experiences/create.blade.php +++ b/resources/views/twill/experiences/create.blade.php @@ -1,8 +1,14 @@ @include('twill.partials.create') -@formField('select', [ - 'name' => 'interactive_feature_id', - 'label' => 'Grouping', - 'placeholder' => 'Select an grouping', - 'options' => $groupingsList, -]) +@php + $groupingsList = App\Models\InteractiveFeature::all()->map(function (App\Models\InteractiveFeature $item) { + return ['value' => $item->id, 'label' => $item->title]; + })->toArray(); +@endphp + + diff --git a/resources/views/twill/experiences/form.blade.php b/resources/views/twill/experiences/form.blade.php index 4477a4fd43..4baaf43d93 100644 --- a/resources/views/twill/experiences/form.blade.php +++ b/resources/views/twill/experiences/form.blade.php @@ -20,62 +20,67 @@

Kiosk URL: {{ $kiosk_url }}


Bundle ID: {{ $item->id }}

- @formField('select', [ - 'name' => 'interactive_feature_id', - 'label' => 'Grouping', - 'placeholder' => 'Select an grouping', - 'options' => $groupingsList, - ]) + @php + $groupingsList = App\Models\InteractiveFeature::all()->map(function (App\Models\InteractiveFeature $item) { + return ['value' => $item->id, 'label' => $item->title]; + })->toArray(); + @endphp - @formField('medias', [ - 'name' => 'thumbnail', - 'label' => 'Thumbnail', - 'max' => 1, - ]) + - @formField('input', [ - 'name' => 'subtitle', - 'label' => 'Subtitle', - 'maxlength' => 300 - ]) + - @formField('wysiwyg', [ - 'name' => 'listing_description', - 'label' => 'Listing Description', - 'type' => 'textarea', - 'maxlength' => 225, - 'note' => 'Used in listings and for social media', - 'toolbarOptions' => [ - 'italic' - ], - ]) + + + @include('twill.partials.authors') - @formField('checkbox', [ - 'name' => 'archived', - 'label' => 'Archived' - ]) + - @formField('checkbox', [ - 'name' => 'kiosk_only', - 'label' => 'Kiosk only', - ]) + - @formField('checkbox', [ - 'name' => 'is_unlisted', - 'label' => "Don't show this experience in listings", - ]) + - @formField('checkbox', [ - 'name' => 'is_in_magazine', - 'label' => 'Assume this experience is featured in a magazine issue', - ]) + - @formField('multi_select', [ - 'name' => 'categories', - 'label' => 'Categories', - 'options' => $categoriesList, - 'placeholder' => 'Select some categories', - ]) + @stop diff --git a/resources/views/twill/experiences/slides/_3dtour.blade.php b/resources/views/twill/experiences/slides/_3dtour.blade.php index 2b8bee7a1e..870dbac51a 100644 --- a/resources/views/twill/experiences/slides/_3dtour.blade.php +++ b/resources/views/twill/experiences/slides/_3dtour.blade.php @@ -1,10 +1,10 @@ -@component('twill::partials.form.utils._connected_fields', [ - 'fieldName' => 'module_type', - 'fieldValues' => '3dtour', - 'keepAlive' => true, -]) + -@endcomponent + @push('vuexStore') @php($model3d = $item->model3d) diff --git a/resources/views/twill/experiences/slides/_asset_type.blade.php b/resources/views/twill/experiences/slides/_asset_type.blade.php index f999e2e7c0..27005fa21b 100644 --- a/resources/views/twill/experiences/slides/_asset_type.blade.php +++ b/resources/views/twill/experiences/slides/_asset_type.blade.php @@ -1,10 +1,10 @@ @unless(in_array($item->module_type, ['attract', 'end'])) - @formField('radios', [ - 'name' => 'asset_type', - 'label' => 'Asset Type', - 'default' => 'standard', - 'inline' => true, - 'options' => [ + @push('extra_js')