mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Cleaned up auth settings
This commit is contained in:
parent
e046d2c680
commit
0c5827fb41
11 changed files with 112 additions and 105 deletions
|
@ -6,7 +6,7 @@
|
|||
<label class="control-label">Port Number</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" placeholder="8989" name="port"/>
|
||||
<input type="number" placeholder="8989" name="port"/>
|
||||
<span>
|
||||
<i class="icon-form-danger" title="Requires restart to take effect"/>
|
||||
</span>
|
||||
|
@ -38,33 +38,36 @@
|
|||
|
||||
<fieldset>
|
||||
<legend>Security</legend>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Authentication</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="authenticationType">
|
||||
<option value="anonymous">Anonymous</option>
|
||||
<option value="basic">Basic</option>
|
||||
</select>
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" class='x-auth' name="authenticationEnabled"/>
|
||||
<p>
|
||||
<span>On</span>
|
||||
<span>Off</span>
|
||||
</p>
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Require Username and Password to access Nzbdrone"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Username</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" placeholder="Username" name="basicAuthUsername"/>
|
||||
<div class='x-auth-options'>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Username</label>
|
||||
<div class="controls">
|
||||
<input type="text" placeholder="Username" name="username"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Password</label>
|
||||
<div class="controls">
|
||||
<input type="password" name="password"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Password</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="password" name="basicAuthPassword"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,43 @@
|
|||
'use strict';
|
||||
define(['marionette', 'Mixins/AsModelBoundView'], function (Marionette, AsModelBoundView) {
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate'
|
||||
}
|
||||
);
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'Mixins/AsModelBoundView'
|
||||
], function (Marionette, AsModelBoundView) {
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate',
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
events: {
|
||||
'change .x-auth': '_setAuthOptionsVisibility'
|
||||
},
|
||||
|
||||
ui: {
|
||||
authToggle : '.x-auth',
|
||||
authOptions: '.x-auth-options'
|
||||
},
|
||||
|
||||
|
||||
onRender: function(){
|
||||
if(!this.ui.authToggle.prop('checked')){
|
||||
this.ui.authOptions.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_setAuthOptionsVisibility: function () {
|
||||
|
||||
var showAuthOptions = this.ui.authToggle.prop('checked');
|
||||
|
||||
if (showAuthOptions) {
|
||||
this.ui.authOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.authOptions.slideUp();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
'use strict';
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
|
@ -9,32 +9,28 @@ define(
|
|||
template: 'Settings/MediaManagement/Naming/ViewTemplate',
|
||||
|
||||
ui: {
|
||||
namingOptions : '.x-naming-options',
|
||||
renameEpisodesCheckbox : '.x-rename-episodes'
|
||||
namingOptions : '.x-naming-options',
|
||||
renameEpisodesCheckbox: '.x-rename-episodes'
|
||||
},
|
||||
|
||||
events: {
|
||||
'change .x-rename-episodes': '_toggleNamingOptions'
|
||||
'change .x-rename-episodes': '_setNamingOptionsVisibility'
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
var renameEpisodes = this.model.get('renameEpisodes');
|
||||
this._setNamingOptionsVisibility(renameEpisodes);
|
||||
onRender: function(){
|
||||
if(!this.model.get('renameEpisodes')){
|
||||
this.ui.namingOptions.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_toggleNamingOptions: function() {
|
||||
_setNamingOptionsVisibility: function () {
|
||||
var checked = this.ui.renameEpisodesCheckbox.prop('checked');
|
||||
this._setNamingOptionsVisibility(checked);
|
||||
},
|
||||
|
||||
_setNamingOptionsVisibility: function (showNamingOptions) {
|
||||
|
||||
if (showNamingOptions) {
|
||||
this.ui.namingOptions.show();
|
||||
if (checked) {
|
||||
this.ui.namingOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.namingOptions.hide();
|
||||
this.ui.namingOptions.slideUp();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="span12" id="quality-profile"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!--<div class="row">
|
||||
<div class="span12" id="quality-size"/>
|
||||
</div>
|
||||
</div>-->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue