Add new limit_customer_visibility setting (#1199)

This commit is contained in:
Alex Tselegidis 2022-05-26 15:55:20 +02:00
parent e09647d01f
commit 9b9888df47
31 changed files with 115 additions and 0 deletions

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Enllaç de reserva';
$lang['add_new_event'] = 'Afegeix un nou esdeveniment'; $lang['add_new_event'] = 'Afegeix un nou esdeveniment';
$lang['what_kind_of_event'] = 'Quin tipus d\'esdeveniment voleu afegir?'; $lang['what_kind_of_event'] = 'Quin tipus d\'esdeveniment voleu afegir?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Broneeringu link';
$lang['add_new_event'] = 'Lisa uus sündmus'; $lang['add_new_event'] = 'Lisa uus sündmus';
$lang['what_kind_of_event'] = 'Mis laadi sündmust soovid lisada?'; $lang['what_kind_of_event'] = 'Mis laadi sündmust soovid lisada?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -364,4 +364,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link';
$lang['add_new_event'] = 'Add New Event'; $lang['add_new_event'] = 'Add New Event';
$lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?';
$lang['theme'] = 'Theme'; $lang['theme'] = 'Theme';
$lang['limit_customer_visibility'] = 'Limit Customer Visibility';
$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.';
// End // End

View file

@ -0,0 +1,41 @@
<?php defined('BASEPATH') or exit('No direct script access allowed');
/* ----------------------------------------------------------------------------
* Easy!Appointments - Online Appointment Scheduler
*
* @package EasyAppointments
* @author A.Tselegidis <alextselegidis@gmail.com>
* @copyright Copyright (c) Alex Tselegidis
* @license https://opensource.org/licenses/GPL-3.0 - GPLv3
* @link https://easyappointments.org
* @since v1.4.0
* ---------------------------------------------------------------------------- */
class Migration_Add_limit_customer_visibility_setting extends EA_Migration {
/**
* Upgrade method.
*/
public function up()
{
if ( ! $this->db->get_where('settings', ['name' => 'limit_customer_visibility'])->num_rows())
{
$this->db->insert('settings', [
'create_datetime' => date('Y-m-d H:i:s'),
'update_datetime' => date('Y-m-d H:i:s'),
'name' => 'limit_customer_visibility',
'value' => '0'
]);
}
}
/**
* Downgrade method.
*/
public function down()
{
if ($this->db->get_where('settings', ['name' => 'limit_customer_visibility'])->num_rows())
{
$this->db->delete('settings', ['name' => 'limit_customer_visibility']);
}
}
}

View file

@ -239,6 +239,22 @@
</div> </div>
</div> </div>
<div class="mb-3">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="limit-customer-visibility"
data-field="limit_customer_visibility">
<label class="form-check-label" for="limit-customer-visibility">
<?= lang('limit_customer_visibility') ?>
</label>
</div>
<div class="form-text text-muted">
<small>
<?= lang('limit_customer_visibility_hint') ?>
</small>
</div>
</div>
<div class="mb-3"> <div class="mb-3">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="require-captcha" <input class="form-check-input" type="checkbox" id="require-captcha"