Skip to content

Commit

Permalink
3.0.0-alpha-20171214
Browse files Browse the repository at this point in the history
  • Loading branch information
benkeen committed Dec 15, 2017
1 parent c7f774c commit 115d0fc
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ modules/hello_tabs
modules/hello_database
modules/submission_pre_parser
modules/form_builder
modules/form_backup
modules/submission_id_manager
modules/js_error_logs
1 change: 1 addition & 0 deletions admin/forms/edit/page_edit_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
$page_vars["admin_info"] = $admin_info;
$page_vars["file_field_text"] = $file_field_text;
$page_vars["columns"] = $columns;
$page_vars["edit_email_advanced_settings"] = Sessions::getWithFallback("edit_email_advanced_settings", "");
$page_vars["js_messages"] = array("validation_invalid_email", "validation_no_custom_recipient_email",
"validation_no_test_email_recipient", "validation_no_test_email_submission_id", "word_cc_c", "word_bcc_c",
"word_from_c", "word_reply_to_c", "word_subject_c", "phrase_form_email_field_b_c", "phrase_form_email_fields",
Expand Down
2 changes: 1 addition & 1 deletion admin/forms/submissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
$submissions_to_delete = "all";
$omit_list = Sessions::get("form_{$form_id}_all_submissions_selected_omit_list");
}
list($success, $message) = Submissions::deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields, true);
list($success, $message) = Submissions::deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields);
}
}

Expand Down
2 changes: 1 addition & 1 deletion clients/forms/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
$submissions_to_delete = "all";
$omit_list = Sessions::get("form_{$form_id}_all_submissions_selected_omit_list");
}
list($g_success, $g_message) = Submissions::deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields, true);
list($g_success, $g_message) = Submissions::deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields);
}
}

Expand Down
2 changes: 1 addition & 1 deletion global/code/Core.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Core {
/**
* The release date: YYYYMMDD
*/
private static $releaseDate = "20171128";
private static $releaseDate = "20171214";

/**
* The minimum required PHP version needed to run Form Tools.
Expand Down
2 changes: 1 addition & 1 deletion global/code/Submissions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public static function deleteSubmission($form_id, $view_id, $submission_id, $is_
* [0]: true/false (success / failure)<br/>
* [1]: message string<br/>
*/
public static function deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields, $is_admin)
public static function deleteSubmissions($form_id, $view_id, $submissions_to_delete, $omit_list, $search_fields)
{
$db = Core::$db;
$LANG = Core::$L;
Expand Down
8 changes: 4 additions & 4 deletions global/code/User.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function login($info, $login_as_client = false)
$login_url = "$root_url{$login_url}";

if (!$login_as_client) {
$this->updateLastLoggedIn();
$this->updateLastLoggedIn($account_info["account_id"]);
}

General::redirect($login_url);
Expand Down Expand Up @@ -225,22 +225,22 @@ public function getEmail() {
/**
* Updates the last logged in date for the currently logged in user.
*/
private function updateLastLoggedIn()
private function updateLastLoggedIn($account_id)
{
$db = Core::$db;

$db->query("
UPDATE {PREFIX}accounts
SET last_logged_in = :now
WHERE account_id = :account_id
");
$db->bindAll(array(
"now" => General::getCurrentDatetime(),
"account_id" => $this->accountId
"account_id" => $account_id
));
$db->execute();
}


/**
* Redirects a logged in user to their login page.
*/
Expand Down
9 changes: 8 additions & 1 deletion global/smarty_plugins/function.forms_dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ function smarty_function_forms_dropdown($params, &$smarty)
$hide_incomplete_forms = (isset($params["hide_incomplete_forms"])) ? $params["hide_incomplete_forms"] : true;
$omit_forms = (isset($params["omit_forms"])) ? $params["omit_forms"] : array(); // a list of forms to omit from the list

// option to limit the forms to a particular status (online/offline). Pass empty string to return all
$form_status = (isset($params["form_status"])) ? $params["form_status"] : "online";

// if this option is set, it only shows those form in the array
$only_show_forms = (isset($params["only_show_forms"])) ? $params["only_show_forms"] : array();

// this option tells the function that if there's only a single form, display it as straight text
// rather than in a dropdown. Only compatible with the non-multiple dropdown list
$display_single_form_as_text = (isset($params["display_single_form_as_text"])) ? $params["display_single_form_as_text"] : false;

$forms = Forms::getForms();
$forms = Forms::searchForms(array(
"is_admin" => true,
"status" => $form_status
));

$rows = array();

foreach ($forms as $form_info) {
Expand Down
Empty file.
Empty file.
32 changes: 16 additions & 16 deletions themes/default/admin/clients/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<select name="status">
<option value="" {if $search_criteria.status == ""}selected{/if}>{$LANG.phrase_all_statuses}</option>
<option value="active" {if $search_criteria.status == "active"}selected{/if}>{$LANG.word_active}</option>
<option value="pending" {if $search_criteria.status == "pending"}selected{/if}>{$LANG.word_pending}</option>
<option value="disabled" {if $search_criteria.status == "disabled"}selected{/if}>{$LANG.word_disabled}</option>
<option value="pending" {if $search_criteria.status == "pending"}selected{/if}>{$LANG.word_pending}</option>
<option value="disabled" {if $search_criteria.status == "disabled"}selected{/if}>{$LANG.word_disabled}</option>
</select>
</td>
<td>
Expand Down Expand Up @@ -86,10 +86,10 @@
{assign var="up_down" value=""}
{if $order == "client_id-DESC"}
{assign var=sort_order value="order=client_id-ASC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{elseif $order == "client_id-ASC"}
{assign var=sort_order value="order=client_id-DESC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{else}
{assign var=sort_order value="order=client_id-DESC"}
{/if}
Expand All @@ -100,10 +100,10 @@
{assign var="up_down" value=""}
{if $order == "first_name-DESC"}
{assign var=sort_order value="order=first_name-ASC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{elseif $order == "first_name-ASC"}
{assign var=sort_order value="order=first_name-DESC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{else}
{assign var=sort_order value="order=first_name-DESC"}
{/if}
Expand All @@ -128,10 +128,10 @@
{assign var="up_down" value=""}
{if $order == "email-DESC"}
{assign var=sort_order value="order=email-ASC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{elseif $order == "email-ASC"}
{assign var=sort_order value="order=email-DESC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{else}
{assign var=sort_order value="order=email-DESC"}
{/if}
Expand All @@ -142,10 +142,10 @@
{assign var="up_down" value=""}
{if $order == "status-DESC"}
{assign var=sort_order value="order=status-ASC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_down.gif\" />"}
{elseif $order == "status-ASC"}
{assign var=sort_order value="order=status-DESC"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{assign var=up_down value="<img src=\"`$theme_url`/images/sort_up.gif\" />"}
{else}
{assign var=sort_order value="order=status-DESC"}
{/if}
Expand Down Expand Up @@ -180,16 +180,16 @@
<td class="pad_left_small"><a href="mailto:{$client_info.email}">{$client_info.email}</a></td>
<td align="center">
{if $client_info.account_status == "active"}
<span class="light_green">{$LANG.word_active}</span>
<span class="light_green">{$LANG.word_active}</span>
{elseif $client_info.account_status == "disabled"}
<span style="color: red">{$LANG.word_disabled}</span>
{elseif $client_info.account_status == "pending"}
<span style="color: orange">{$LANG.word_pending}</span>
<span style="color: red">{$LANG.word_disabled}</span>
{elseif $client_info.account_status == "pending"}
<span style="color: orange">{$LANG.word_pending}</span>
{/if}
</td>
<td class="pad_left_small">
{if $client_info.last_logged_in != ""}
{$client_info.last_logged_in|custom_format_date:$SESSION.account.timezone_offset:$SESSION.account.date_format}
{$client_info.last_logged_in|custom_format_date:$account.timezone_offset:$account.date_format}
{else}
<span class="medium_grey">{$LANG.word_never}</span>
{/if}
Expand Down Expand Up @@ -224,4 +224,4 @@
</p>
</form>

{ft_include file="footer.tpl"}
{ft_include file="footer.tpl"}
46 changes: 23 additions & 23 deletions themes/default/admin/clients/tab_main.tpl
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{ft_include file='messages.tpl'}

<form method="post" name="add_client" id="add_client" action="{$same_page}" onsubmit="return rsv.validate(this, rules)">
<form method="post" name="add_client" id="add_client" action="{$same_page}" onsubmit="return rsv.validate(this, rules)">
<input type="hidden" name="client_id" value="{$client_id}" />
<input type="hidden" name="update_client" value="1" />

{template_hook location="admin_edit_client_main_top"}

{template_hook location="admin_edit_client_main_top"}

<table class="list_table" cellpadding="0" cellspacing="1">
<tr>
<td width="15"> </td>
<td class="pad_left_small">{$LANG.phrase_last_logged_in}</td>
<td class="pad_left_small medium_grey">
{if $client_info.last_logged_in != ""}
{$client_info.last_logged_in|custom_format_date:$SESSION.account.timezone_offset:$SESSION.account.date_format}
{$client_info.last_logged_in|custom_format_date:$account.timezone_offset:$account.date_format}
{else}
{$LANG.word_never}
{/if}
</td>
</tr>
<tr>
<td width="15" align="center" class="red">*</td>
<td width="15" align="center" class="red">*</td>
<td class="pad_left_small">{$LANG.word_status}</td>
<td>
<input type="radio" name="account_status" id="as1" value="active" {if $client_info.account_status == "active"}checked{/if} />
<label for="as1" class="light_green">{$LANG.word_active}</label>
<input type="radio" name="account_status" id="as2" value="pending" {if $client_info.account_status == "pending"}checked{/if} />
<label for="as2" class="orange">{$LANG.word_pending}</label>
<input type="radio" name="account_status" id="as3" value="disabled" {if $client_info.account_status == "disabled"}checked{/if} />
<label for="as3" class="red">{$LANG.word_disabled}</label>
<input type="radio" name="account_status" id="as3" value="disabled" {if $client_info.account_status == "disabled"}checked{/if} />
<label for="as3" class="red">{$LANG.word_disabled}</label>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -57,21 +57,21 @@
</tr>
</table>

{template_hook location="admin_edit_client_main_middle"}

{template_hook location="admin_edit_client_main_middle"}

<p class="subtitle">{$LANG.phrase_change_login_info}</p>

{if $has_extra_password_requirements}
<div class="grey_box margin_bottom_large">
{$LANG.phrase_password_requirements_c}
<ul class="margin_bottom_small margin_top_small">
{if $has_min_password_length}<li>{$phrase_password_min}</li>{/if}
{if "uppercase"|in_array:$required_password_chars}<li>{$LANG.phrase_password_one_uppercase}</li>{/if}
{if "number"|in_array:$required_password_chars}<li>{$LANG.phrase_password_one_number}</li>{/if}
{if "special_char"|in_array:$required_password_chars}<li>{$password_special_char}</li>{/if}
</ul>
</div>
{/if}

{if $has_extra_password_requirements}
<div class="grey_box margin_bottom_large">
{$LANG.phrase_password_requirements_c}
<ul class="margin_bottom_small margin_top_small">
{if $has_min_password_length}<li>{$phrase_password_min}</li>{/if}
{if "uppercase"|in_array:$required_password_chars}<li>{$LANG.phrase_password_one_uppercase}</li>{/if}
{if "number"|in_array:$required_password_chars}<li>{$LANG.phrase_password_one_number}</li>{/if}
{if "special_char"|in_array:$required_password_chars}<li>{$password_special_char}</li>{/if}
</ul>
</div>
{/if}

<table class="list_table" cellpadding="0" cellspacing="1">
<tr>
Expand All @@ -91,8 +91,8 @@
</tr>
</table>

{template_hook location="admin_edit_client_main_bottom"}

{template_hook location="admin_edit_client_main_bottom"}

<p>
<input type="submit" name="submit" value="{$LANG.word_update}" />
</p>
Expand Down
2 changes: 1 addition & 1 deletion themes/default/admin/forms/edit/tab_edit_email_tab1.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<a href="#" onclick="return emails_ns.toggle_advanced_settings()">{$LANG.phrase_advanced_settings_rightarrow}</a>
</div>

<div {if !isset($SESSION.edit_email_advanced_settings) || $SESSION.edit_email_advanced_settings == "false"}style="display:none"{/if} id="advanced_settings">
<div {if $edit_email_advanced_settings == "false"}style="display:none"{/if} id="advanced_settings">
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
<td valign="top" width="180">{$LANG.phrase_when_sent}</td>
Expand Down

0 comments on commit 115d0fc

Please sign in to comment.