| @@ -864,8 +864,18 @@ | ||
| 864 | 864 | </div> |
| 865 | 865 | <?php endif; ?> |
| 866 | 866 | <?php endif; ?> |
| 867 | 867 | |
| 868 | + <div id="ei-offline-add" class="mb-5 rounded-lg border border-dashed border-gray-300 bg-white p-4"> | |
| 869 | + <div class="flex flex-col sm:flex-row sm:items-end gap-3"> | |
| 870 | + <div class="flex-1"> | |
| 871 | + <label for="ei-offline-add-title" class="block text-sm font-medium text-gray-900"><?php esc_html_e('Add an offline payment method', 'easy-invoice'); ?></label> | |
| 872 | + <p class="mt-0.5 text-xs text-gray-500"><?php esc_html_e('For money you receive outside a card gateway — ACH, wire transfer, mobile money, a second bank account. Each method gets its own instructions, an optional reference field and a receipt upload; clients pick it on the invoice and you confirm the payment on the Payments screen.', 'easy-invoice'); ?></p> | |
| 873 | + <input type="text" id="ei-offline-add-title" maxlength="60" placeholder="<?php esc_attr_e('e.g. ACH, Wire transfer', 'easy-invoice'); ?>" class="mt-2 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 text-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> | |
| 874 | + </div> | |
| 875 | + <button type="button" id="ei-offline-add-btn" class="inline-flex items-center justify-center rounded-md bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"><?php esc_html_e('Add method', 'easy-invoice'); ?></button> | |
| 876 | + </div> | |
| 877 | + </div> | |
| 868 | 878 | <div id="sortable-gateways" class="space-y-5"> |
| 869 | 879 | <?php foreach ($all_gateways_sorted as $gateway_id => $gateway) : ?> |
| 870 | 880 | <div class="gateway-item bg-gray-50 p-5 rounded-lg border border-gray-200 cursor-move" data-gateway-id="<?php echo esc_attr($gateway_id); ?>"> |
| 871 | 881 | <div class="flex items-center mb-3 space-x-3"> |
| @@ -922,8 +932,11 @@ | ||
| 922 | 932 | <?php endif; ?> |
| 923 | 933 | </div> |
| 924 | 934 | |
| 925 | 935 | <input type="hidden" class="gateway-order-input" name="settings[easy_invoice_gateway_order][]" value="<?php echo esc_attr($gateway_id); ?>"> |
| 936 | + <?php if ($gateway instanceof \EasyInvoice\Gateways\OfflineGateway && $gateway->isCustom()) : ?> | |
| 937 | + <p class="mt-3 text-xs text-gray-500"><?php esc_html_e('Added by you.', 'easy-invoice'); ?> <button type="button" class="ei-offline-remove font-medium text-red-600 hover:text-red-800" data-method-id="<?php echo esc_attr($gateway_id); ?>" data-method-title="<?php echo esc_attr($gateway->getTitle()); ?>"><?php esc_html_e('Remove this method', 'easy-invoice'); ?></button> <span class="text-gray-400">· <?php esc_html_e('Payments already recorded keep it.', 'easy-invoice'); ?></span></p> | |
| 938 | + <?php endif; ?> | |
| 926 | 939 | </div> |
| 927 | 940 | <?php endforeach; ?> |
| 928 | 941 | </div> |
| 929 | 942 | </div> |