{% extends "commerce/_layouts/cp" %} {% do view.registerAssetBundle('craft\\web\\assets\\admintable\\AdminTableAsset') -%} {% do view.registerTranslations('commerce', [ 'Couldn’t reorder rules.', 'Description', 'No shipping rules exist yet.', 'Rules reordered.', 'Shipping Rule', ]) %} {% set crumbs = [ { label: "Shipping"|t('commerce'), url: url('commerce/shipping') }, { label: "Shipping Methods"|t('commerce'), url: url('commerce/shipping/shippingmethods') }, ] %} {% set selectedSubnavItem = 'shipping' %} {% set fullPageForm = true %} {% import "_includes/forms" as forms %} {% block saveButton %} {% endblock %} {% block content %} {{ redirectInput('commerce/shipping/shippingmethods/{id}#rules') }} {% if shippingMethod.id %} {% endif %} {{ forms.textField({ first: true, label: "Name"|t('commerce'), id: 'name', name: 'name', value: shippingMethod.getName(), errors: shippingMethod.getErrors('name'), autofocus: true, required: true, }) }} {{ forms.textField({ first: true, label: "Handle"|t('commerce'), instructions: "How this shipping method will be referred to in templates and forms."|t('commerce'), id: 'handle', class: 'code', name: 'handle', value: shippingMethod.handle, errors: shippingMethod.getErrors('handle'), required: true, }) }} {{ forms.lightSwitchField({ label: "Enable this shipping method on the front end"|t('commerce'), id: 'enabled', name: 'enabled', on: shippingMethod.enabled, errors: shippingMethod.getErrors('enabled') }) }} {% if shippingMethod.id %}