Skip to content

Commit

Permalink
Add global constant to disable all external modules #662
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed Feb 5, 2024
1 parent e7d55b3 commit 8e48178
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/AdminCabinet/Controllers/GeneralSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ private function updatePBXSettings(array $data):array
case 'UseWebRTC':
case PbxSettingsConstants::SSH_DISABLE_SSH_PASSWORD:
case 'PBXAllowGuestCalls':
case PbxSettingsConstants::DISABLE_ALL_MODULES:
case '***ALL CHECK BOXES ABOVE***':
$newValue = ($data[$key] === 'on') ? '1' : '0';
break;
Expand Down
1 change: 1 addition & 0 deletions src/AdminCabinet/Forms/GeneralSettingsEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public function initialize($entity = null, $options = null): void
case 'RedirectToHttps':
case 'PBXSplitAudioThread':
case 'PBXAllowGuestCalls':
case PbxSettingsConstants::DISABLE_ALL_MODULES:
case PbxSettingsConstants::SSH_DISABLE_SSH_PASSWORD:
case '***ALL CHECK BOXES ABOVE***':
$cheskarr = ['value' => null];
Expand Down
5 changes: 4 additions & 1 deletion src/AdminCabinet/Views/GeneralSettings/features.volt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<label>{{ t._('gs_PBXCallParkingSlotRange') }}</label>
</div>


<div class="inline field">
{{ form.render('PBXFeatureAttendedTransfer') }}
<label>{{ t._('gs_PBXFeatureAttendedTransfer') }}</label>
Expand All @@ -24,4 +23,8 @@
<div class="inline field">
{{ form.render('PBXFeatureAtxferNoAnswerTimeout') }}
<label>{{ t._('gs_PBXFeatureAtxferNoAnswerTimeout') }}</label>
</div>
<div class="inline field">
{{ form.render('PBXFeatureDigitTimeout') }}
<label>{{ t._('gs_PBXFeatureDigitTimeout') }}</label>
</div>
14 changes: 8 additions & 6 deletions src/AdminCabinet/Views/GeneralSettings/general.volt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
{{ form.render('PBXInternalExtensionLength') }}
</div>
</div>
<div class="field">
<label>{{ t._('gs_PBXFeatureDigitTimeout') }}</label>
<div class="field max-width-100">
{{ form.render('PBXFeatureDigitTimeout') }}
</div>
</div>
<div class="field">
<div class="ui segment">
<div class="ui toggle checkbox">
Expand All @@ -50,4 +44,12 @@
{{ form.render('SendMetrics') }}
</div>
</div>
</div>
<div class="field">
<div class="ui segment">
<div class="ui toggle checkbox">
<label>{{ t._('gs_DisableAllModules') }}</label>
{{ form.render('DisableAllModules') }}
</div>
</div>
</div>
1 change: 1 addition & 0 deletions src/Common/Messages/ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
'gs_Store3YearsOfRecords' => '3 года',
'gs_PBXRecordSavePeriodLabel' => 'Период хранения записей разговоров',
'gs_StoreAllPossibleRecords' => '',
'gs_DisableAllModules'=>'Отключить маркетплейс',
'pr_AddSIPProvider' => 'Подключить SIP',
'pr_AddIAXProvider' => 'Подключить IAX',
'pr_QualifyInstructionsIAX' => 'При включение этой опции Asterisk будет отправлять SIP Options пакеты. Это необходимо для поддержки NAT туннелирования на вашем маршрутизаторе.',
Expand Down

0 comments on commit 8e48178

Please sign in to comment.