Skip to content

Commit

Permalink
CRM: Resolves 3399 - make KB links consistent in settings (#34695)
Browse files Browse the repository at this point in the history
* Adjust wording to clarify all fields can show in Woo My Account

* Add KB link

* Use consistent UI to link to KB from settings

* Simplify wording

* Remove stray end tag

* Remove errant colspan attribute

* Add changelog

* Only contact fields
  • Loading branch information
tbradsha authored Dec 18, 2023
1 parent c65fbe5 commit 79b426b
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 30 deletions.
16 changes: 10 additions & 6 deletions projects/plugins/crm/admin/settings/client-portal.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@
<tbody>

<tr>
<td class="wfieldname"><label for="wpzbscrm_portalpage"><?php esc_html_e( 'Client Portal page', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( 'Select the page with your client portal shortcode.', 'zero-bs-crm' ); ?>
<td class="wfieldname">

<?php ##WLREMOVE ?>
<a href="<?php echo esc_url( $zbs->urls['kbclientportal'] ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'zero-bs-crm' ); ?></a>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['kbclientportal'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_portalpage"><?php esc_html_e( 'Client Portal page', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( 'Select the page with your client portal shortcode.', 'zero-bs-crm' ); ?>
</td>
<td>
<?php
Expand Down Expand Up @@ -248,10 +250,11 @@
</tr>

<tr>
<td class="wfieldname"><label for="wpzbscrm_easyaccesslinks"><?php esc_html_e( 'Allow Easy-Access links', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( 'Tick to allow logged-out users to view quotes and invoices via a secure hash URL.', 'zero-bs-crm' ); ?>
<td class="wfieldname">
<?php ##WLREMOVE ?>
<a href="<?php echo esc_url( $zbs->urls['kbeasyaccess'] ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'zero-bs-crm' ); ?></a>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['kbeasyaccess'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_easyaccesslinks"><?php esc_html_e( 'Allow Easy-Access links', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( 'Tick to allow logged-out users to view quotes and invoices via a secure hash URL.', 'zero-bs-crm' ); ?>
</td>
<td style="width:540px"><input type="checkbox" class="winput form-control" name="wpzbscrm_easyaccesslinks" id="wpzbscrm_easyaccesslinks" value="1"
<?php
Expand Down Expand Up @@ -302,10 +305,11 @@


<tr>
<td class="wfieldname"><label for="wpzbscrm_portalusers"><?php esc_html_e( 'Generate WordPress users for new contacts', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( "By default this will automatically email the new contact a welcome email as soon as they're added. If you prefer to not have this email sent, you can disable this email template.", 'zero-bs-crm' ); ?>
<td class="wfieldname">
<?php ##WLREMOVE ?>
<a href="<?php echo esc_url( $zbs->urls['kbdisablewelcome'] ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'zero-bs-crm' ); ?></a>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['kbdisablewelcome'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_portalusers"><?php esc_html_e( 'Generate WordPress users for new contacts', 'zero-bs-crm' ); ?></label><br /><?php esc_html_e( "By default this will automatically email the new contact a welcome email as soon as they're added. If you prefer to not have this email sent, you can disable this email template.", 'zero-bs-crm' ); ?>
</td>
<td style="width:540px"><input type="checkbox" class="winput form-control" name="wpzbscrm_portalusers" id="wpzbscrm_portalusers" value="1"
<?php
Expand Down
2 changes: 1 addition & 1 deletion projects/plugins/crm/admin/settings/forms.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<tbody>

<tr>
<td colspan="2" class="wmid"><button type="submit" class="ui button primary"><?php esc_html_e( 'Save Settings', 'zero-bs-crm' ); ?></button></td>
<td class="wmid"><button type="submit" class="ui button primary"><?php esc_html_e( 'Save Settings', 'zero-bs-crm' ); ?></button></td>
</tr>

</tbody>
Expand Down
21 changes: 13 additions & 8 deletions projects/plugins/crm/admin/settings/general.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@

?>

<p id="sbDescOLD"><?php echo wp_kses( sprintf( __( 'From this page you can choose global settings for your CRM, and using the tabs above you can set up different <a href="%s" target="_blank">Extensions</a>', 'zero-bs-crm' ), esc_url( $zbs->urls['products'] ) ), $zbs->acceptable_restricted_html ); ?></p>
<p id="sbDescOLD"><?php esc_html_e( 'From this page you can choose global settings for your CRM.', 'zero-bs-crm' ); ?></p>

<?php
if ( isset( $sbupdated ) ) {
Expand Down Expand Up @@ -274,7 +274,12 @@
<tbody>

<tr>
<td class="wfieldname"><label for="wpzbscrm_menulayout"><?php esc_html_e( 'Menu Layout', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'How do you want your WordPress Admin Menu to Display?', 'zero-bs-crm' ); ?></td>
<td class="wfieldname">
<?php ##WLREMOVE ?>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['kbshowwpmenus'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_menulayout"><?php esc_html_e( 'Menu Layout', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'How do you want your WordPress Admin Menu to Display?', 'zero-bs-crm' ); ?>
</td>
<td style="width:540px">
<select class="winput" name="wpzbscrm_menulayout" id="wpzbscrm_menulayout">
<!-- common currencies first -->
Expand All @@ -300,10 +305,7 @@
<br />
<div>
<?php esc_html_e( 'Are you looking for your other WordPress menu items? (e.g.', 'zero-bs-crm' ); ?> <a href="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>"><?php esc_html_e( 'Plugins', 'zero-bs-crm' ); ?></a>, <?php esc_html_e( 'or', 'zero-bs-crm' ); ?> <a href="<?php echo esc_url( admin_url( 'users.php' ) ); ?>"><?php esc_html_e( 'Users', 'zero-bs-crm' ); ?></a>)?<br />
<?php esc_html_e( "If you can't see these, (and you want to), select 'Slimline' or 'Full' from the above menu, then make sure 'Override WordPress (For All WP Users):' is disabled below", 'zero-bs-crm' ); ?> (<a href="#override-allusers"><?php esc_html_e( 'here', 'zero-bs-crm' ); ?></a>).<br />
<?php ##WLREMOVE ?>
<a href="<?php echo esc_url( $zbs->urls['kbshowwpmenus'] ); ?>" target="_blank"><?php esc_html_e( 'View Guide', 'zero-bs-crm' ); ?></a>
<?php ##/WLREMOVE ?>
<?php esc_html_e( "If you can't see these, (and you want to), select 'Slimline' or 'Full' from the above menu, then make sure 'Override WordPress (For All WP Users):' is disabled below", 'zero-bs-crm' ); ?> (<a href="#override-allusers"><?php esc_html_e( 'here', 'zero-bs-crm' ); ?></a>).
</div>
</td>
</tr>
Expand Down Expand Up @@ -570,8 +572,11 @@

<?php ##WLREMOVE ?>
<tr>
<td class="wfieldname"><label for="wpzbscrm_shareessentials"><?php esc_html_e( 'Usage Tracking', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Share CRM usage with us. No contact or sensitive CRM data is shared.', 'zero-bs-crm' ); ?>
<a href="<?php echo esc_url( $zbs->urls['usageinfo'] ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'zero-bs-crm' ); ?>.</a>
<td class="wfieldname">
<?php ##WLREMOVE ?>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['usageinfo'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_shareessentials"><?php esc_html_e( 'Usage Tracking', 'zero-bs-crm' ); ?>:</label><br /><?php esc_html_e( 'Share CRM usage with us. No contact or sensitive CRM data is shared.', 'zero-bs-crm' ); ?>
</td>
<td style="width:540px"><input type="checkbox" class="winput form-control" name="wpzbscrm_shareessentials" id="wpzbscrm_shareessentials" value="1"
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@
<?php ##WLREMOVE ?>
<a class="item" href="<?php echo jpcrm_esc_link( $zbs->slugs['extensions'] ); ?>"><i class="ui orange puzzle piece icon"></i> <?php echo esc_html__( 'Extensions', 'zero-bs-crm' ); ?></a>
<?php ##/WLREMOVE ?>
<a class="item" href="<?php echo jpcrm_esc_link( wp_nonce_url( $zbs->slugs['settings'] . '&resetsettings=1' ) ); ?> "></i> <?php echo esc_html__( 'Restore default settings', 'zero-bs-crm' ); ?></a>
<a class="item" href="<?php echo jpcrm_esc_link( wp_nonce_url( $zbs->slugs['settings'] . '&resetsettings=1' ) ); ?> "> <?php echo esc_html__( 'Restore default settings', 'zero-bs-crm' ); ?></a>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Settings: Make KB links more consistent.
1 change: 1 addition & 0 deletions projects/plugins/crm/includes/ZeroBSCRM.Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ private function setupUrlsSlugsEtc() {
$this->urls['kb-pre-v5-migration-todo'] = 'https://kb.jetpackcrm.com/knowledge-base/upgrading-to-jetpack-crm-v5-0/';
$this->urls['kb-mailpoet'] = 'https://kb.jetpackcrm.com/knowledge-base/mailpoet-crm-sync/';
$this->urls['kb-automations'] = 'https://kb.jetpackcrm.com/knowledge-base/automations/';
$this->urls['kb-contact-fields'] = 'https://kb.jetpackcrm.com/knowledge-base/contact-field-list/';

// coming soon
$this->urls['soon'] = 'https://jetpackcrm.com/coming-soon/';
Expand Down
22 changes: 11 additions & 11 deletions projects/plugins/crm/modules/mailpoet/admin/settings/main.page.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,18 @@ function jpcrm_settings_page_html_mailpoet_main(){
</tbody>
</table>

<table class="table table-bordered table-striped wtab">
<tbody>
<table class="table table-bordered table-striped wtab">
<tbody>

<tr>
<td colspan="2" class="wmid"><button type="submit" class="button button-primary button-large"><?php esc_html_e('Save Settings','zero-bs-crm'); ?></button></td>
</tr>

</tbody>
</table>
<tr>
<td class="wmid"><button type="submit" class="button button-primary button-large"><?php esc_html_e( 'Save Settings', 'zero-bs-crm' ); ?></button></td>
</tr>

</form>
</tbody>
</table>

</div><?php
</form>

}
</div>
<?php
}
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,14 @@ function jpcrm_settings_page_html_woosync_main() {

<tr>
<td class="wfieldname">
<?php ##WLREMOVE ?>
<div class="ui teal label right floated"><i class="circle info icon link"></i> <a href="<?php echo esc_url( $zbs->urls['kb-contact-fields'] ); ?>" target="_blank"><?php esc_html_e( 'Read more', 'zero-bs-crm' ); ?></a></div>
<?php ##/WLREMOVE ?>
<label for="wpzbscrm_port"><?php esc_html_e( 'WooCommerce My Account', 'zero-bs-crm' ); ?>:</label><br />
<?php esc_html_e( 'Enter a comma-separated list of Jetpack CRM custom fields to let customers edit these via WooCommerce My Account (e.g. custom-field-1,other-custom-field)', 'zero-bs-crm' ); ?>
<?php esc_html_e( 'Enter a comma-separated list of Jetpack CRM contact fields to let customers edit these via WooCommerce My Account.', 'zero-bs-crm' ); ?>
</td>
<td style="width:540px">
<input type="text" class="winput form-control" name="wpzbscrm_wcport" id="wpzbscrm_port" value="<?php echo ( ! empty( $settings['wcport'] ) ? esc_attr( $settings['wcport'] ) : '' ); ?>" />
<input type="text" class="winput form-control" name="wpzbscrm_wcport" id="wpzbscrm_port" value="<?php echo ( ! empty( $settings['wcport'] ) ? esc_attr( $settings['wcport'] ) : '' ); ?>" placeholder="e.g. addr1,custom-field-1" />
</td>
</tr>
<tr>
Expand Down Expand Up @@ -384,7 +387,7 @@ function jpcrm_settings_page_html_woosync_main() {
<tbody>

<tr>
<td colspan="2" class="wmid"><button type="submit" class="button button-primary button-large"><?php esc_html_e( 'Save Settings', 'zero-bs-crm' ); ?></button></td>
<td class="wmid"><button type="submit" class="button button-primary button-large"><?php esc_html_e( 'Save Settings', 'zero-bs-crm' ); ?></button></td>
</tr>

</tbody>
Expand Down

0 comments on commit 79b426b

Please sign in to comment.