Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/plugins/crm/admin/contact/add-file.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function zeroBSCRM_render_add_or_edit_file() {

if ( isset( $upload['error'] ) && $upload['error'] != 0 ) {
echo "<div class='ui message red' style='margin-right:20px'><i class='icon info'></i> ";
/* translators: %s: Upload error message. */
printf( esc_html__( 'There was an error uploading your file: %s', 'zero-bs-crm' ), esc_html( $upload['error'] ) );
echo '</div>';
$error_while_adding = true;
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/crm/admin/system/system-status.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ function zeroBSCRM_render_systemstatus_page() {

// hard-check database tables & report

global $ZBSCRM_t, $wpdb;
global $ZBSCRM_t;
$missingTables = array();

// then we cycle through our tables :) - means all keys NEED to be kept up to date :)
foreach ( $ZBSCRM_t as $tableKey => $tableName ) {
foreach ( $ZBSCRM_t as $tableName ) {
$tablesExist = $wpdb->get_results( "SHOW TABLES LIKE '" . $tableName . "'" );
if ( count( $tablesExist ) < 1 ) {
$missingTables[] = $tableName;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Fix some unreleased regressions introduced in #46809.


2 changes: 1 addition & 1 deletion projects/plugins/crm/includes/ZeroBSCRM.List.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public function drawListView() {
var zbsDrawListViewColUpdateBlocker = false;
var zbsDrawListViewColUpdateAJAXBlocker = false;

var zbsObjectEmailLinkPrefix = '<?php echo jpcrm_esc_link( 'email', -1, 'zerobs_customer', true ); // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentBeforeOpen,Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- this assumes is contact for now, just sends to prefill - perhaps later add mailto: optional (wh wants lol) ?>';
var zbsObjectEmailLinkPrefix = '<?php echo jpcrm_esc_link( 'email', -1, 'zerobs_customer', true ); /* this assumes is contact for now, just sends to prefill - perhaps later add mailto: optional (wh wants lol) */ ?>';
var zbsObjectViewLinkPrefixCustomer = '<?php echo jpcrm_esc_link( 'view', -1, 'zerobs_customer', true ); ?>';
var zbsObjectViewLinkPrefixCompany = '<?php echo jpcrm_esc_link( 'view', -1, 'zerobs_company', true ); ?>';
var zbsObjectViewLinkPrefixQuote = '<?php echo jpcrm_esc_link( 'edit', -1, 'zerobs_quote', true ); ?>';
Expand Down
33 changes: 12 additions & 21 deletions projects/plugins/crm/includes/ZeroBSCRM.MetaBoxes3.Contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,21 +739,9 @@ public function html( $contact, $metabox ) {
<div class="item zbs-contact-action" id="zbs-contact-action-<?php echo esc_attr( $actKey ); ?>"
<?php
// if url isset, pass that data-action, otherwise leave for js to attach to
if ( isset( $action['url'] ) && ! empty( $action['url'] ) ) {
if ( ! empty( $action['url'] ) ) {
?>
data-action="
<?php
if ( isset( $action['url'] ) ) {
echo 'url';
}
?>
" data-url="
<?php
if ( isset( $action['url'] ) ) {
echo esc_attr( $action['url'] );
}
?>
"
data-action="url" data-url="<?php echo esc_attr( $action['url'] ); ?>"
<?php
}

Expand Down Expand Up @@ -1862,7 +1850,7 @@ public function html( $contact, $metabox ) {
?>
<div class="zbs-social-acc <?php echo esc_attr( $socialAccType['slug'] ); ?>" title="<?php echo esc_attr( $socialAccType['name'] ); ?>">
<?php
if ( is_array( $zbsSocials ) && isset( $zbsSocials[ $socialKey ] ) && ! empty( $zbsSocials[ $socialKey ] ) ) {
if ( ! empty( $zbsSocials[ $socialKey ] ) ) {

// got acc? link to it
$socialLink = zeroBSCRM_getSocialLink( $socialKey, $zbsSocials );
Expand All @@ -1872,12 +1860,15 @@ public function html( $contact, $metabox ) {
<?php } else { ?>
<i class="fa <?php echo esc_attr( $socialAccType['fa'] ); ?>" aria-hidden="true"></i>
<?php } ?>
<input type="text" class="zbs-social-acc-input zbs-dc" title="<?php echo esc_attr( $socialAccType['name'] ); ?>" name="zbs-social-<?php echo esc_attr( $socialAccType['slug'] ); ?>" id="zbs-social-<?php echo esc_attr( $socialAccType['slug'] ); ?>" value="
<?php
if ( is_array( $zbsSocials ) && isset( $zbsSocials[ $socialKey ] ) && ! empty( $zbsSocials[ $socialKey ] ) ) {
echo esc_attr( $zbsSocials[ $socialKey ] );}
?>
" placeholder="<?php echo esc_attr( $socialAccType['placeholder'] ); ?>" />
<input
type="text"
class="zbs-social-acc-input zbs-dc"
title="<?php echo esc_attr( $socialAccType['name'] ); ?>"
name="zbs-social-<?php echo esc_attr( $socialAccType['slug'] ); ?>"
id="zbs-social-<?php echo esc_attr( $socialAccType['slug'] ); ?>"
value="<?php echo ! empty( $zbsSocials[ $socialKey ] ) ? esc_attr( $zbsSocials[ $socialKey ] ) : ''; ?>"
placeholder="<?php echo esc_attr( $socialAccType['placeholder'] ); ?>"
/>
</div>
<?php

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,7 @@ function zeroBSCRMJS_showContactLinkIf(contactID){
<h3><?php esc_html_e( 'Publish this Quote', 'zero-bs-crm' ); ?></h3>
<p><?php esc_html_e( 'Do you want to use the Quote Builder to publish this quote? (This lets you email it to a client directly, for approval)', 'zero-bs-crm' ); ?></p>

<input type="hidden" name="zbs_quote_template_id_used" id="zbs_quote_template_id_used" value="
<?php
if ( isset( $templateUsed ) && ! empty( $templateUsed ) ) {
echo esc_attr( $templateUsed );}
?>
" />
<input type="hidden" name="zbs_quote_template_id_used" id="zbs_quote_template_id_used" value="<?php echo ! empty( $templateUsed ) ? esc_attr( $templateUsed ) : ''; ?>" />
<select class="form-control" name="zbs_quote_template_id" id="zbs_quote_template_id">
<option value="" disabled="disabled"><?php esc_html_e( 'Select a template', 'zero-bs-crm' ); ?>:</option>
<?php
Expand Down
2 changes: 2 additions & 0 deletions projects/plugins/crm/includes/class-encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function check_cipher_and_fallback() {
$this->ready_to_encrypt = false;

// error loading encryption
/* translators: %s: Encryption cipher method name. */
echo zeroBSCRM_UI2_messageHTML( 'warning', __( 'Unable to load encryption method', 'zero-bs-crm' ), sprintf( __( 'CRM was unable to load the required encryption method (%s). Until this is method is available to your PHP your sensitive data may not be encrypted properly.', 'zero-bs-crm' ), $this->cipher ) );

return;
Expand Down Expand Up @@ -82,6 +83,7 @@ public function check_cipher_and_fallback() {
$zbs->settings->update( 'enc_fallback_blocked', 1 );

// error loading encryption
/* translators: %s: Encryption cipher method name. */
echo zeroBSCRM_UI2_messageHTML( 'warning', __( 'Unable to load encryption method', 'zero-bs-crm' ), sprintf( __( 'CRM was unable to load the required encryption method (%s). Until this is method is available to your PHP your sensitive data may not be encrypted properly.', 'zero-bs-crm' ), $this->cipher ) );

}
Expand Down
32 changes: 20 additions & 12 deletions projects/plugins/crm/modules/mailpoet/admin/settings/main.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ function jpcrm_settings_page_html_mailpoet_main() {

<tr>
<td class="wfieldname"><label for="jpcrm_tag_list_prefix"><?php esc_html_e( 'List tag prefix', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Enter a tag prefix for List tags (e.g. MailPoet List: )', 'zero-bs-crm' ); ?></td>
<td style='width:540px'><input type="text" class="winput form-control" name="jpcrm_tag_list_prefix" id="jpcrm_tag_list_prefix" value="
<?php
if ( isset( $settings['tag_list_prefix'] ) && ! empty( $settings['tag_list_prefix'] ) ) {
echo esc_attr( $settings['tag_list_prefix'] );}
?>
" placeholder="<?php esc_html_e( "e.g. 'MailPoet List: '", 'zero-bs-crm' ); ?>" /></td>
<td style='width:540px'>
<input
type="text"
class="winput form-control"
name="jpcrm_tag_list_prefix"
id="jpcrm_tag_list_prefix"
value="<?php echo ! empty( $settings['tag_list_prefix'] ) ? esc_attr( $settings['tag_list_prefix'] ) : ''; ?>"
placeholder="<?php esc_html_e( "e.g. 'MailPoet List: '", 'zero-bs-crm' ); ?>"
/>
</td>
</tr>

<?php
Expand All @@ -131,12 +135,16 @@ function jpcrm_settings_page_html_mailpoet_main() {

<tr>
<td class="wfieldname"><label for="jpcrm_tag_tag_prefix"><?php esc_html_e( 'List tag prefix', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Enter a tag prefix for Subscriber tags (e.g. MailPoet Tag: )', 'zero-bs-crm' ); ?></td>
<td style='width:540px'><input type="text" class="winput form-control" name="jpcrm_tag_tag_prefix" id="jpcrm_tag_tag_prefix" value="
<?php
if ( isset( $settings['tag_tag_prefix'] ) && ! empty( $settings['tag_tag_prefix'] ) ) {
echo esc_attr( $settings['tag_tag_prefix'] );}
?>
" placeholder="<?php esc_attr_e( "e.g. 'MailPoet Tag: '", 'zero-bs-crm' ); ?>" /></td>
<td style='width:540px'>
<input
type="text"
class="winput form-control"
name="jpcrm_tag_tag_prefix"
id="jpcrm_tag_tag_prefix"
value="<?php echo ! empty( $settings['tag_tag_prefix'] ) ? esc_attr( $settings['tag_tag_prefix'] ) : ''; ?>"
placeholder="<?php esc_attr_e( "e.g. 'MailPoet Tag: '", 'zero-bs-crm' ); ?>"
/>
</td>
</tr>

<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,8 @@ function jpcrm_settings_page_html_woosync_connection_edit() {
?>
<tr style="display:none">
<td colspan="2">
<input type="hidden" name="woosync_key" id="woosync_key" value="
<?php
if ( isset( $sync_site['key'] ) && ! empty( $sync_site['key'] ) ) {
echo esc_attr( $sync_site['key'] );}
?>
" />
<input type="hidden" name="woosync_secret" id="woosync_secret" value="
<?php
if ( isset( $sync_site['secret'] ) && ! empty( $sync_site['secret'] ) ) {
echo esc_attr( $sync_site['secret'] );}
?>
" />
<input type="hidden" name="woosync_key" id="woosync_key" value="<?php echo ! empty( $sync_site['key'] ) ? esc_attr( $sync_site['key'] ) : ''; ?>" />
<input type="hidden" name="woosync_secret" id="woosync_secret" value="<?php echo ! empty( $sync_site['secret'] ) ? esc_attr( $sync_site['secret'] ) : ''; ?>" />
</td>
</tr>

Expand All @@ -165,21 +155,29 @@ function jpcrm_settings_page_html_woosync_connection_edit() {
?>
<tr>
<td class="wfieldname"><label for="woosync_key"><?php esc_html_e( 'API Key', 'zero-bs-crm' ); ?>:</label></td>
<td style="width:540px"><input type="text" class="winput form-control" name="woosync_key" id="woosync_key" value="
<?php
if ( isset( $sync_site['key'] ) && ! empty( $sync_site['key'] ) ) {
echo esc_attr( $sync_site['key'] );}
?>
" placeholder="e.g. ck_99966f77a8e9ace9efb689a6fa7f5334ac9ea645" /></td>
<td style="width:540px">
<input
type="text"
class="winput form-control"
name="woosync_key"
id="woosync_key"
value="<?php echo ! empty( $sync_site['key'] ) ? esc_attr( $sync_site['key'] ) : ''; ?>"
placeholder="e.g. ck_99966f77a8e9ace9efb689a6fa7f5334ac9ea645"
/>
</td>
</tr>
<tr>
<td class="wfieldname"><label for="woosync_secret"><?php esc_html_e( 'API Secret', 'zero-bs-crm' ); ?>:</label></td>
<td style="width:540px"><input type="text" class="winput form-control" name="woosync_secret" id="woosync_secret" value="
<?php
if ( isset( $sync_site['secret'] ) && ! empty( $sync_site['secret'] ) ) {
echo esc_attr( $sync_site['secret'] );}
?>
" placeholder="e.g. cs_9994bcfb20e188073b609650487736196d841015" /></td>
<td style="width:540px">
<input
type="text"
class="winput form-control"
name="woosync_secret"
id="woosync_secret"
value="<?php echo ! empty( $sync_site['secret'] ) ? esc_attr( $sync_site['secret'] ) : ''; ?>"
placeholder="e.g. cs_9994bcfb20e188073b609650487736196d841015"
/>
</td>
</tr>

<?php
Expand All @@ -190,12 +188,16 @@ function jpcrm_settings_page_html_woosync_connection_edit() {
?>
<tr>
<td class="wfieldname"><label for="woosync_prefix"><?php esc_html_e( 'Order Prefix', 'zero-bs-crm' ); ?>:</label></td>
<td style="width:540px"><input type="text" class="winput form-control" name="woosync_prefix" id="woosync_prefix" value="
<?php
if ( isset( $sync_site['prefix'] ) && ! empty( $sync_site['prefix'] ) ) {
echo esc_attr( $sync_site['prefix'] );}
?>
" placeholder="e.g. example_" /></td>
<td style="width:540px">
<input
type="text"
class="winput form-control"
name="woosync_prefix"
id="woosync_prefix"
value="<?php echo ! empty( $sync_site['prefix'] ) ? esc_attr( $sync_site['prefix'] ) : ''; ?>"
placeholder="e.g. example_"
/>
</td>
</tr>
</tbody>
<tfoot>
Expand Down
Loading