Bind the selected webhook and avoid clearing from database

This commit is contained in:
Marcus Moore
2025-05-20 11:40:44 -07:00
parent e3ffe79c4c
commit 7a79fd18f0
2 changed files with 1 additions and 20 deletions
-1
View File
@@ -191,7 +191,6 @@ class SlackSettingsForm extends Component
$this->setting->webhook_endpoint = '';
$this->setting->webhook_channel = '';
$this->setting->webhook_botname = '';
$this->setting->webhook_selected = '';
$this->setting->save();
@@ -72,6 +72,7 @@
:options="['slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook'),'google' => trans('admin/settings/general.google_workspaces'), 'microsoft' => trans('admin/settings/general.ms_teams')]"
:selected="old('webhook_selected', $webhook_selected)"
:disabled="Helper::isDemoMode()"
:for-livewire="true"
data-minimum-results-for-search="-1"
class="form-control"
style="width:100%"
@@ -174,22 +175,3 @@
</div> <!-- /.row -->
</form>
</div> <!-- /livewire div -->
@section('moar_scripts')
<script>
$(document).ready(function () {
$('#select2').select2();
$('#select2').on('change', function (e) {
var data = $('#select2').select2("val");
@this.set('webhook_selected', data);
});
});
</script>
@endsection