mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-25 16:13:17 +03:00
Removed unnecessary validation from general settings
This commit is contained in:
parent
c40f2c7004
commit
37c46c7286
1 changed files with 0 additions and 24 deletions
|
@ -81,30 +81,6 @@ class General_settings extends EA_Controller {
|
|||
|
||||
$settings = request('general_settings', []);
|
||||
|
||||
// Check if phone number settings are valid.
|
||||
|
||||
$phone_number_required = FALSE;
|
||||
|
||||
$phone_number_shown = FALSE;
|
||||
|
||||
foreach ($settings as $setting)
|
||||
{
|
||||
if ($setting['name'] === 'require_phone_number')
|
||||
{
|
||||
$phone_number_required = $setting['value'];
|
||||
}
|
||||
|
||||
if ($setting['name'] === 'show_phone_number')
|
||||
{
|
||||
$phone_number_shown = $setting['value'];
|
||||
}
|
||||
}
|
||||
|
||||
if ($phone_number_required && ! $phone_number_shown)
|
||||
{
|
||||
throw new RuntimeException('You cannot hide the phone number in the booking form while it\'s also required!');
|
||||
}
|
||||
|
||||
foreach ($settings as $setting)
|
||||
{
|
||||
$existing_setting = $this->settings_model->query()->where('name', $setting['name'])->get()->row_array();
|
||||
|
|
Loading…
Reference in a new issue