Skip to content

Commit

Permalink
3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
benkeen committed Mar 17, 2019
1 parent eccdbfd commit 10a7117
Show file tree
Hide file tree
Showing 9 changed files with 432 additions and 403 deletions.
10 changes: 5 additions & 5 deletions code/Module.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class Module extends FormToolsModule
protected $author = "Ben Keen";
protected $authorEmail = "ben.keen@gmail.com";
protected $authorLink = "https://formtools.org";
protected $version = "3.0.5";
protected $date = "2018-01-28";
protected $version = "3.0.6";
protected $date = "2018-03-27";
protected $originLanguage = "en_us";
protected $jsFiles = array(
"{MODULEROOT}/scripts/admin.js",
Expand Down Expand Up @@ -176,7 +176,6 @@ public function displayExportOptions($template_name, $params)

private function addHtmlExportGroup()
{
$LANG = Core::$L;
$L = $this->getLangStrings();

$smarty_template =<<< END
Expand Down Expand Up @@ -223,7 +222,7 @@ private function addHtmlExportGroup()
{/if}
{/if}
<input type="button" onclick="window.close()" value="{\$LANG.word_close}" />
<input type="button" onclick="window.print()" value="{\$LANG.word_print}" />
<input type="button" onclick="window.print()" value="{\$L.word_print}" />
</span>
<span id="export_group_name">{eval var=\$export_group_name}</span>
</div>
Expand Down Expand Up @@ -327,7 +326,7 @@ private function addHtmlExportGroup()
{/foreach}
</table>
{if !\$smarty.foreach.row.last}
<div class="no_print"><i>- {\$LANG.phrase_new_page} -</i></div>
<div class="no_print"><i>- {\$L.phrase_new_page} -</i></div>
<br class="page_break" />
{/if}
{/foreach}
Expand Down Expand Up @@ -680,6 +679,7 @@ public function export ($params)
$placeholders["export_types"] = $export_types;
$placeholders["export_type_smarty_template"] = $export_type_smarty_template;

$placeholders["L"] = $L;
$page = CoreGeneral::evalSmartyString($template, $placeholders);

if ($export_group_info["action"] == "new_window" || $export_group_info["action"] == "popup") {
Expand Down
24 changes: 14 additions & 10 deletions lang/en_us.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@
$L["module_description"] = "Define your own ways of exporting form submission data for view / download. Excel, Printer-friendly HTML, XML and CSV are included by default.";

// custom fields
$L["word_action"] = "Action";
$L["word_all"] = "all";
$L["word_csv"] = "CSV";
$L["word_display"] = "Display";
$L["word_download"] = "Download";
$L["word_help"] = "Help";
$L["word_excel"] = "Excel";
$L["word_export"] = "Export";
$L["word_filename"] = "Filename";
$L["word_generate"] = "Generate";
$L["word_headers"] = "Headers";
$L["word_height_c"] = "Height";
$L["word_help"] = "Help";
$L["word_hide"] = "Hide";
$L["word_icon"] = "Icon";
$L["word_none"] = "None";
$L["word_action"] = "Action";
$L["word_headers"] = "Headers";
$L["word_excel"] = "Excel";
$L["word_generate"] = "Generate";
$L["word_welcome"] = "Welcome!";
$L["word_csv"] = "CSV";
$L["word_xml"] = "XML";
$L["word_print"] = "Print";
$L["word_selected"] = "selected";
$L["word_settings"] = "Settings";
$L["word_visibility"] = "Visibility";
$L["word_height_c"] = "Height";
$L["word_welcome"] = "Welcome!";
$L["word_width_c"] = "Width";
$L["word_export"] = "Export";
$L["word_xml"] = "XML";

$L["phrase_html_printer_friendly"] = "HTML / Printer-friendly";
$L["phrase_add_export_type"] = "Add Export Type";
Expand Down Expand Up @@ -59,6 +62,7 @@
$L["phrase_generate_files_folder_url"] = "Generated files folder URL";
$L["phrase_cache_multi_select_fields"] = "Cache multi-select field values for duration of session";
$L["phrase_reset_defaults"] = "Reset to Defaults";
$L["phrase_new_page"] = "new page";

$L["notify_no_export_groups"] = "There are currently no export groups. Click the button below to add a new one.";
$L["notify_no_export_types"] = "There are currently no export types defined in the database. Click the button below to add a new one.";
Expand Down
94 changes: 47 additions & 47 deletions templates/export_groups/add.tpl
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
{ft_include file='modules_header.tpl'}

<table cellpadding="0" cellspacing="0" class="margin_bottom_large">
<tr>
<td width="45"><a href="../"><img src="../images/icon_export.gif" border="0" width="34" height="34" /></a></td>
<td class="title">
<a href="../../../admin/modules">{$LANG.word_modules}</a>
<span class="joiner">&raquo;</span>
<a href="../">{$L.module_name}</a>
<span class="joiner">&raquo;</span>
{$L.phrase_add_export_group}
</td>
</tr>
</table>

<div class="margin_bottom_large">
<table cellpadding="0" cellspacing="0" class="margin_bottom_large">
<tr>
<td width="45"><a href="../"><img src="../images/icon_export.gif" border="0" width="34" height="34"/></a></td>
<td class="title">
<a href="../../../admin/modules">{$LANG.word_modules}</a>
<span class="joiner">&raquo;</span>
<a href="../">{$L.module_name}</a>
<span class="joiner">&raquo;</span>
{$L.phrase_add_export_group}
</td>
</tr>
</table>

<div class="margin_bottom_large">
{$L.text_export_group_summary}
</div>
</div>

{ft_include file='messages.tpl'}
{ft_include file='messages.tpl'}

<form action="../" method="post" onsubmit="return rsv.validate(this, rules)">
<form action="../" method="post" onsubmit="return rsv.validate(this, rules)">

<table border="0" width="500" class="add_export_group_table">
<tr>
<td width="130" class="medium_grey">{$L.phrase_export_group_name}</td>
<td>
<input type="text" name="group_name" value="" style="width:200px" maxlength="50" />
</td>
</tr>
<tr>
<td class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1" checked />
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2" />
<label for="st2" class="red">{$LANG.word_hide}</label>
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_icon}</td>
<td>
<input type="hidden" name="icon" id="icon" value="" />
<ul class="icon_list">
<li class="no_icon selected"></li>
{foreach from=$icons item=icon name=i}
{assign var=index value=$smarty.foreach.i.iteration}
<li><img src="{$g_root_url}/modules/export_manager/images/icons/{$icon}" /></li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td width="130" class="medium_grey">{$L.phrase_export_group_name}</td>
<td>
<input type="text" name="group_name" value="" style="width:200px" maxlength="50"/>
</td>
</tr>
<tr>
<td class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1" checked/>
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2"/>
<label for="st2" class="red">{$L.word_hide}</label>
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_icon}</td>
<td>
<input type="hidden" name="icon" id="icon" value=""/>
<ul class="icon_list">
<li class="no_icon selected"></li>
{foreach from=$icons item=icon name=i}
{assign var=index value=$smarty.foreach.i.iteration}
<li><img src="{$g_root_url}/modules/export_manager/images/icons/{$icon}"/></li>
{/foreach}
</ul>
</td>
</tr>
</table>

<p>
<input type="submit" name="add_export_group" value="{$L.phrase_add_export_group}" />
<input type="submit" name="add_export_group" value="{$L.phrase_add_export_group}"/>
</p>

</form>
</form>

{ft_include file='modules_footer.tpl'}
69 changes: 35 additions & 34 deletions templates/export_groups/tab_add_export_type.tpl
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
{ft_include file='messages.tpl'}
{ft_include file='messages.tpl'}

<form action="{$same_page}" method="post" onsubmit="return rsv.validate(this, page_ns.rules)">
<input type="hidden" name="page" value="export_types" />
<input type="hidden" name="export_group_id" value="{$export_group_id}" />
<form action="{$same_page}" method="post" onsubmit="return rsv.validate(this, page_ns.rules)">
<input type="hidden" name="page" value="export_types"/>
<input type="hidden" name="export_group_id" value="{$export_group_id}"/>

<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td width="120" class="medium_grey">{$L.phrase_export_type_name}</td>
<td>
<input type="text" name="export_type_name" value="" style="width:200px" maxlength="50" />
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1" checked />
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2" />
<label for="st2" class="red">{$LANG.word_hide}</label>

<div class="light_grey">{$L.notify_export_type_visibility}</div>
</td>
</tr>
<tr>
<td class="medium_grey">{$L.word_filename}</td>
<td>
<input type="text" name="filename" value="{literal}submissions-{$M}.{$j}.html{/literal}" style="width:200px" maxlength="50" />
<a href="http://modules.formtools.org/export_manager/documentation.php?page=filename_placeholders">{$L.phrase_view_available_placeholders}</a>
</td>
</tr>
<tr>
<td width="120" class="medium_grey">{$L.phrase_export_type_name}</td>
<td>
<input type="text" name="export_type_name" value="" style="width:200px" maxlength="50"/>
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1" checked/>
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2"/>
<label for="st2" class="red">{$L.word_hide}</label>

<div class="light_grey">{$L.notify_export_type_visibility}</div>
</td>
</tr>
<tr>
<td class="medium_grey">{$L.word_filename}</td>
<td>
<input type="text" name="filename" value="{literal}submissions-{$M}.{$j}.html{/literal}"
style="width:200px" maxlength="50"/>
<a href="http://modules.formtools.org/export_manager/documentation.php?page=filename_placeholders">{$L.phrase_view_available_placeholders}</a>
</td>
</tr>
</table>
<p class="bold">{$L.phrase_smarty_template}</p>
<div class="editor_wrapper" style="width: 100%">
<textarea name="smarty_template" id="smarty_template"></textarea>
<textarea name="smarty_template" id="smarty_template"></textarea>
</div>
<script type="text/javascript">
var html_editor = new CodeMirror.fromTextArea(document.getElementById("smarty_template"), {literal}{{/literal}
mode: "smarty"
{literal}});{/literal}
var html_editor = new CodeMirror.fromTextArea(document.getElementById("smarty_template"), {literal}{{/literal}
mode: "smarty"
{literal}});{/literal}
</script>
<p>
<input type="submit" name="add_export_type" value="{$L.phrase_add_export_type}" />
<input type="submit" name="add_export_type" value="{$L.phrase_add_export_type}"/>
</p>
</form>
</form>
77 changes: 40 additions & 37 deletions templates/export_groups/tab_edit_export_type.tpl
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
{ft_include file='messages.tpl'}
{ft_include file='messages.tpl'}

<form action="{$same_page}" method="post" onsubmit="return rsv.validate(this, page_ns.rules)">
<input type="hidden" name="export_type_id" value="{$export_type.export_type_id}" />
<input type="hidden" name="export_group_id" value="{$export_type.export_group_id}" />
<input type="hidden" name="page" value="edit_export_type" />
<form action="{$same_page}" method="post" onsubmit="return rsv.validate(this, page_ns.rules)">
<input type="hidden" name="export_type_id" value="{$export_type.export_type_id}"/>
<input type="hidden" name="export_group_id" value="{$export_type.export_group_id}"/>
<input type="hidden" name="page" value="edit_export_type"/>

<table cellspacing="1" cellpadding="2" border="0">
<tr>
<td width="120" class="medium_grey">{$L.phrase_export_type_name}</td>
<td>
<input type="text" name="export_type_name" value="{$export_type.export_type_name}" style="width:100%" maxlength="255" />
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1" {if $export_type.export_type_visibility == "show"}checked{/if} />
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2" {if $export_type.export_type_visibility == "hide"}checked{/if} />
<label for="st2" class="red">{$LANG.word_hide}</label>
<div class="light_grey">{$L.notify_export_type_visibility}</div>
</td>
</tr>
<tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_filename}</td>
<td>
<input type="text" name="filename" value="{$export_type.filename}" style="width:100%" maxlength="50" />
<div class="light_grey">
{$L.notify_filename_explanation}
</div>
</td>
</tr>
<tr>
<td width="120" class="medium_grey">{$L.phrase_export_type_name}</td>
<td>
<input type="text" name="export_type_name" value="{$export_type.export_type_name}" style="width:100%"
maxlength="255"/>
</td>
</tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_visibility}</td>
<td>
<input type="radio" name="visibility" value="show" id="st1"
{if $export_type.export_type_visibility == "show"}checked{/if} />
<label for="st1" class="green">{$LANG.word_show}</label>
<input type="radio" name="visibility" value="hide" id="st2"
{if $export_type.export_type_visibility == "hide"}checked{/if} />
<label for="st2" class="red">{$L.word_hide}</label>
<div class="light_grey">{$L.notify_export_type_visibility}</div>
</td>
</tr>
<tr>
<tr>
<td valign="top" class="medium_grey">{$L.word_filename}</td>
<td>
<input type="text" name="filename" value="{$export_type.filename}" style="width:100%" maxlength="50"/>
<div class="light_grey">
{$L.notify_filename_explanation}
</div>
</td>
</tr>
</table>

<p class="bold">{$L.phrase_smarty_template}</p>

<div class="editor_wrapper" style="width: 100%">
<textarea name="smarty_template" id="smarty_template">{$export_type.export_type_smarty_template}</textarea>
<textarea name="smarty_template" id="smarty_template">{$export_type.export_type_smarty_template}</textarea>
</div>

<script>
var html_editor = new CodeMirror.fromTextArea(document.getElementById("smarty_template"), {literal}{{/literal}
mode: "smarty"
{literal}});{/literal}
var html_editor = new CodeMirror.fromTextArea(document.getElementById("smarty_template"), {literal}{{/literal}
mode: "smarty"
{literal}});{/literal}
</script>
<p>
<input type="submit" name="update_export_type" value="{$LANG.word_update}" />
<input type="submit" name="update_export_type" value="{$LANG.word_update}"/>
</p>
</form>
</form>
Loading

0 comments on commit 10a7117

Please sign in to comment.