Add warning to Export page

This commit is contained in:
Amine Ben hammou
2019-01-17 16:56:40 +01:00
parent 00764ff3e9
commit 29da613481
2 changed files with 7 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ class ImportExportFactory {
$data['maxPostSizeBytes'] = Helpers::getMaxPostSize('bytes');
$data['maxPostSize'] = Helpers::getMaxPostSize();
}
$data['zipExtensionLoaded'] = extension_loaded('zip');
return $data;
}
}

View File

@@ -6,6 +6,11 @@
<%= __('Export') %>
<a class="page-title-action" href="?page=mailpoet-subscribers#/"><%= __('Back to Subscribers') %></a>
</h1>
<%if not zipExtensionLoaded %>
<div class="error">
<p><%= __('ZIP extension is required to create Excel files. Please refer to the [link]official PHP ZIP installation guide[/link] or contact your hosting providers technical support for instructions on how to install and load the ZIP extension.' | replaceLinkTags('http://php.net/manual/en/zip.installation.php')) %></p>
</div>
<%endif%>
<% if segments is empty %>
<div class="error">
<p><%= __("Yikes! Couldn't find any subscribers") %></p>
@@ -72,7 +77,7 @@
&nbsp;
<label>
<input type="radio" name="option_format"
value="xlsx"><%= __('Excel file') %>
value="xlsx" <%if not zipExtensionLoaded %> disabled="disabled" <%endif%>><%= __('Excel file') %>
</label>
</td>
</tr>