Bind the selected webhook and avoid clearing from database
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user