Added form - need to add CORS to db code
This commit is contained in:
parent
8498029cd9
commit
a52e905155
|
@ -19,6 +19,20 @@
|
|||
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
|
||||
</div>
|
||||
<input class="form-control" type="hidden" name="generalErr" id="generalErr" aria-describedby="helpBlock"/>
|
||||
<p>The CORS URL can be setup during install if you are accessing your LibreTime instance behind a Proxy.
|
||||
This is common with docker setups. If you have a reverse proxy setup enter the URL below, otherwise you
|
||||
can safely ignore this.
|
||||
</p>
|
||||
<div id="corsSlideToggle">
|
||||
<span><strong>CORS URL </strong></span><span id="corsCaret" class="caret"></span><hr/>
|
||||
</div>
|
||||
<div id="corsFormBody">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="corsURL">CORS URLs</label>
|
||||
<textarea class="form-control" id="corsURL" rows="4" cols="50">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" formtarget="generalSettingsForm" class="btn btn-primary btn-next" value="Next ❱"/>
|
||||
|
@ -27,6 +41,10 @@
|
|||
</form>
|
||||
|
||||
<script>
|
||||
$("#corsSlideToggle").click(function() {
|
||||
$("#corsFormBody").slideToggle(500);
|
||||
$("#corsCaret").toggleClass("caret-up");
|
||||
});
|
||||
$("#generalSettingsForm").submit(function(e) {
|
||||
submitForm(e, "GeneralSetup");
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<body>
|
||||
<div class="header">
|
||||
<h3 class="logo">
|
||||
<img src="css/images/airtime_logo_jp.png" id="airtimeLogo" /><br/>
|
||||
<img src="css/images/libretime_logo_jp.png" id="LibreTimeLogo" /><br/>
|
||||
<strong>Setup</strong>
|
||||
</h3>
|
||||
<strong>Step <span id="stepCount">1</span> of 5</strong>
|
||||
|
|
|
@ -15,8 +15,8 @@ class GeneralSetup extends Setup {
|
|||
|
||||
// Constant form field names for passing errors back to the front-end
|
||||
const GENERAL_PORT = "generalPort",
|
||||
GENERAL_HOST = "generalHost";
|
||||
|
||||
GENERAL_HOST = "generalHost",
|
||||
CORS_URL = "corsURL";
|
||||
// Array of key->value pairs for airtime.conf
|
||||
protected static $_properties;
|
||||
|
||||
|
@ -30,6 +30,7 @@ class GeneralSetup extends Setup {
|
|||
"api_key" => $this->generateRandomString(),
|
||||
"base_url" => $settings[self::GENERAL_HOST],
|
||||
"base_port" => $settings[self::GENERAL_PORT],
|
||||
"cors_url" => $settings[self::CORS_URL]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue