{% extends 'hyper/_layouts/settings' %} {% import '_includes/forms' as forms %} {% import 'verbb-base/_macros' as macros %} {% set selectedNavItem = 'linkit' %} {% set fullPageForm = response is not defined %} {% set settings = craft.hyper.plugin.settings %} {% block actionButton %}{% endblock %} {% block blockContent %} {{ redirectInput('hyper/settings/migrate/linkit') }}

{{ 'Migrate Linkit Fields' | t('hyper') }}

{% if response is not defined %}

{{ 'Migrate your Linkit fields and content to Hyper fields.' | t('hyper') }}

{{ 'This will **permanently** modify all your Linkit fields and cannot be reverted. We‘ll make a backup before the migration is run if you need to restore back to it.' | t('hyper') | md }} {{ 'This is a 2-step process. First, to migrate your fields. Second, to migrate your content.' | t('hyper') | md }}
{{ forms.checkbox({ name: 'createBackup', id: 'create-backup', label: 'Create backup' | t('hyper'), checked: settings.backupOnMigrate, }) }}

{{ 'Step 1. Migrate Fields' | t('hyper') }}

{{ 'You should first migrate your fields over in an environment with `allowAdminChanges` set to `true`. Once migrated successfully, you can then migrate the content for those fields.' | t('hyper') | md }}

{{ 'Step 2. Migrate Content' | t('hyper') }}

{{ 'Once your fields have been migrated, the content for that field used in elements must be converted. You should run this in your local development environment to test everything migrates correctly. You can then deploy your field changes as run this as many times as you like on other environments. As content is stored per-environment, you‘ll need to run this step on each environment.' | t('hyper') | md }} {% else %} {% for formId, output in response %} {{ output | raw }} {% endfor %}
{{ 'Done' | t('hyper') }} {% endif %} {% endblock %}