{% extends "_layouts/cp" %} {% set selectedSubnavItem = 'tokens' %} {% set fullPageForm = true %} {% set crumbs = [ { label: "GraphQL Tokens"|t('app'), url: url('graphql/tokens') } ] %} {% import "_includes/forms" as forms %} {% block content %} {{ redirectInput('graphql/tokens') }} {% if token.id %}{% endif %} {{ forms.textField({ first: true, label: "Name"|t('app'), instructions: "What this token will be called in the control panel."|t('app'), id: 'name', name: 'name', value: token.name, errors: token.getErrors('name'), autofocus: true, required: true, }) }} {% set schemaInput = schemaOptions ? forms.selectField({ name: 'schema', id: 'schema', options: schemaOptions, value: token.schemaId, }) : tag('p', { class: ['warning', 'with-icon'], text: 'No schemas exist yet to assign to this token.'|t('app'), }) %} {{ forms.field({ id: 'schema', label: 'GraphQL Schema', instructions: 'Choose which GraphQL schema this token has access to.', }, schemaInput) }}