});
});// End delete Boxcar config
- $("[name='global-config-check']").bootstrapSwitch('offColor','danger');
- $('input[name="global-config-check"]').on('switchChange.bootstrapSwitch', function(event, state) {
- event.preventDefault();
- var config_id = $(this).data("config_id");
- $.ajax({
- type: 'POST',
- url: 'ajax_form.php',
- data: {type: "update-config-item", config_id: config_id, config_value: state},
- dataType: "json",
- success: function (data) {
- if (data.status == 'ok') {
- } else {
- $("#message").html('
' + data.message + '
');
- }
- },
- error: function () {
- $("#message").html('
An error occurred.
');
- }
- });
- });
- $(document).on('blur', 'input[name="global-config-input"]', function(event) {
- event.preventDefault();
- var $this = $(this);
- var config_id = $this.data("config_id");
- var config_value = $this.val();
- $.ajax({
- type: 'POST',
- url: 'ajax_form.php',
- data: {type: "update-config-item", config_id: config_id, config_value: config_value},
- dataType: "json",
- success: function (data) {
- if (data.status == 'ok') {
- $this.closest('.form-group').addClass('has-success');
- $this.next().addClass('glyphicon-ok');
- setTimeout(function(){
- $this.closest('.form-group').removeClass('has-success');
- $this.next().removeClass('glyphicon-ok');
- }, 2000);
- } else {
- $(this).closest('.form-group').addClass('has-error');
- $this.next().addClass('glyphicon-remove');
- setTimeout(function(){
- $this.closest('.form-group').removeClass('has-error');
- $this.next().removeClass('glyphicon-remove');
- }, 2000);
- }
- },
- error: function () {
- $("#message").html('
An error occurred.
');
- }
- });
- });
$( 'select[name="global-config-select"]').change(function(event) {
event.preventDefault();
var $this = $(this);
diff --git a/html/pages/settings/external.inc.php b/html/pages/settings/external.inc.php
new file mode 100644
index 0000000000..2960b2e259
--- /dev/null
+++ b/html/pages/settings/external.inc.php
@@ -0,0 +1,32 @@
+ 'oxidized.enabled',
+ 'descr' => 'Enable Oxidized support',
+ 'type' => 'checkbox',
+ ),
+ array('name' => 'oxidized.url',
+ 'descr' => 'URL to your Oxidized API',
+ 'type' => 'text',
+ ),
+ array('name' => 'oxidized.features.versioning',
+ 'descr' => 'Enable config versioning access',
+ 'type' => 'checkbox',
+ ),
+);
+
+echo '
+
+
+
+';
diff --git a/sql-schema/074.sql b/sql-schema/074.sql
new file mode 100644
index 0000000000..2b086026b5
--- /dev/null
+++ b/sql-schema/074.sql
@@ -0,0 +1 @@
+INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('oxidized.enabled','false','false','Enable Oxidized support','external',0,'oxidized',0,'0','0'),('oxidized.url','','','Oxidized API url','external',0,'oxidized',0,'0','0'),('oxidized.features.versioning','false','false','Enable Oxidized config versioning','external',0,'oxidized',0,'0','0');