Make setup show external DB parameters automaticaly when selecting postgres

Before, the "external postgres" options were not shown, even though
"extrnal" was pre-selected. This fixes the mechanics surrounding the
picker.
master
Dario Ernst 4 years ago
parent 7b27d0dd4e
commit 7483ea1d49

@ -51,7 +51,12 @@ $(document).ready(function() {
} else if (this.value == 'postgresql') { } else if (this.value == 'postgresql') {
$("#postgres_db").show(); $("#postgres_db").show();
$("#external_db").hide(); $("#external_db").hide();
$("#external_db").prop('checked', false); $("#external_psql").prop('checked', true);
$("#external_db").show();
$("#db_user").prop('required',true);
$("#db_pw").prop('required',true);
$("#db_url").prop('required',true);
$("#db_name").prop('required',true);
} else if (this.value == 'mysql') { } else if (this.value == 'mysql') {
$("#postgres_db").hide(); $("#postgres_db").hide();
$("#external_db").show(); $("#external_db").show();

@ -20,7 +20,7 @@
</label> </label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="radio" name="postgresql" value="external" id="external_psql" checked> <input class="form-check-input" type="radio" name="postgresql" value="external" id="external_psql">
<label class="form-check-label" for="external_psql"> <label class="form-check-label" for="external_psql">
I want to connect to an external database I want to connect to an external database
</label> </label>

Loading…
Cancel
Save