export.html
110 lines
| 1 | <% extends 'layout.html' %> |
| 2 | |
| 3 | <% block content %> |
| 4 | <div id="mailpoet_subscribers_export" class="wrap"> |
| 5 | <div class="mailpoet-top-bar"> |
| 6 | <a href="?page=mailpoet-subscribers#/" role="button" class="mailpoet-top-bar-logo" title="Back to section root" tabindex="0"> |
| 7 | <img src="<%= cdn_url('logo-orange.svg') %>" alt="MailPoet logo" /> |
| 8 | </a> |
| 9 | <style>#wpbody-content { padding-top: 64px; } .wrap { margin-top: 20px; }</style> |
| 10 | </div> |
| 11 | |
| 12 | <div class="mailpoet-page-header"> |
| 13 | <div class="mailpoet-back-button"> |
| 14 | <a href="?page=mailpoet-subscribers#/" aria-label="Navigate to the lists page" class="components-button is-small has-icon"> |
| 15 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">><path d="M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"></path></svg> |
| 16 | </a> |
| 17 | </div> |
| 18 | <h1 class="wp-heading-inline"><%= __('Export subscribers') %></h1> |
| 19 | </div> |
| 20 | <% if segments is empty %> |
| 21 | <div class="error"> |
| 22 | <p><%= __("Yikes! Couldn't find any subscribers") %></p> |
| 23 | </div> |
| 24 | <% endif %> |
| 25 | <div id="mailpoet-export" class="mailpoet-tab-content"> |
| 26 | <!-- Template data --> |
| 27 | </div> |
| 28 | </div> |
| 29 | <script id="mailpoet_subscribers_export_template" type="text/x-handlebars-template"> |
| 30 | <div id="export_result_notice" class="updated mailpoet_hidden"> |
| 31 | <!-- Result message --> |
| 32 | </div> |
| 33 | <div class="mailpoet-settings-grid"> |
| 34 | <% if not segments is empty %> |
| 35 | <div class="mailpoet-settings-label"> |
| 36 | <label for="export_lists"> |
| 37 | <%= __('Pick one or multiple lists') %> |
| 38 | </label> |
| 39 | </div> |
| 40 | <div class="mailpoet-settings-inputs"> |
| 41 | <div class="mailpoet-form-select mailpoet-form-input"> |
| 42 | <select id="export_lists" data-placeholder="<%= _x('Select', 'Verb') %>" multiple="multiple"></select> |
| 43 | </div> |
| 44 | </div> |
| 45 | <% endif %> |
| 46 | |
| 47 | <div class="mailpoet-settings-label"> |
| 48 | <label for="export_columns"> |
| 49 | <%= __('List of fields to export') %> |
| 50 | <p class="description"> |
| 51 | <a href="https://kb.mailpoet.com/article/245-what-is-the-subscriber-global-status" target="_blank"> |
| 52 | <%= _x('Read about the Global status.', 'Link to a documentation page in the knowledge base about what is the subscriber global status') %> |
| 53 | </a> |
| 54 | </p> |
| 55 | </label> |
| 56 | </div> |
| 57 | <div class="mailpoet-settings-inputs"> |
| 58 | <div class="mailpoet-form-select mailpoet-form-input"> |
| 59 | <select id="export_columns" data-placeholder="<%= _x('Select', 'Verb') %>" multiple="multiple"></select> |
| 60 | </div> |
| 61 | </div> |
| 62 | |
| 63 | <div class="mailpoet-settings-label"> |
| 64 | <%= __('Format') %> |
| 65 | </div> |
| 66 | <div class="mailpoet-settings-inputs"> |
| 67 | <div class="mailpoet-settings-inputs-row"> |
| 68 | <label class="mailpoet-form-radio"> |
| 69 | <input type="radio" name="option_format" id="export-format-csv" value="csv" checked> |
| 70 | <span class="mailpoet-form-radio-control"></span> |
| 71 | </label> |
| 72 | <label for="export-format-csv"><%= __('CSV file') %></label> |
| 73 | </div> |
| 74 | <div class="mailpoet-settings-inputs-row<%if not zipExtensionLoaded %> mailpoet-disabled<%endif%>"> |
| 75 | <label class="mailpoet-form-radio"> |
| 76 | <input type="radio" name="option_format" id="export-format-xlsx" value="xlsx"<%if not zipExtensionLoaded %> disabled<%endif%>> |
| 77 | <span class="mailpoet-form-radio-control"></span> |
| 78 | </label> |
| 79 | <label for="export-format-xlsx"><%= __('Excel file') %></label> |
| 80 | </div> |
| 81 | <%if not zipExtensionLoaded %> |
| 82 | <div class="inline notice notice-warning"> |
| 83 | <p><%= __('ZIP extension is required to create Excel files. Please refer to the [link]official PHP ZIP installation guide[/link] or contact your hosting provider’s technical support for instructions on how to install and load the ZIP extension.' | replaceLinkTags('http://php.net/manual/en/zip.installation.php')) %></p> |
| 84 | </div> |
| 85 | <%endif%> |
| 86 | </div> |
| 87 | |
| 88 | <div class="mailpoet-settings-save"> |
| 89 | <a href="javascript:;" class="mailpoet-button mailpoet-disabled button-primary" id="mailpoet-export-button"> |
| 90 | <%= __('Export') %> |
| 91 | </a> |
| 92 | </div> |
| 93 | </div> |
| 94 | </script> |
| 95 | |
| 96 | <script type="text/javascript"> |
| 97 | var |
| 98 | segments = JSON.parse("<%=segments|escape('js')%>"), |
| 99 | subscriberFieldsSelect2 = JSON.parse("<%=subscriberFieldsSelect2|escape('js')%>"), |
| 100 | exportData = { |
| 101 | segments: segments.length || null |
| 102 | }; |
| 103 | </script> |
| 104 | |
| 105 | <%= localize({ |
| 106 | 'serverError': __('Server error:'), |
| 107 | 'exportMessage': __('%1$s subscribers were exported. Get the exported file [link]here[/link].') |
| 108 | }) %> |
| 109 | <% endblock %> |
| 110 |