2019-04-20 21:15:00 +00:00
< ! DOCTYPE html >
2018-12-09 20:23:51 +00:00
< html lang = " en " >
2018-09-16 12:38:00 +00:00
< head >
< script src = " {{ base_url}}static/jquery/jquery-latest.min.js " > < / script >
< script src = " {{ base_url}}static/semantic/semantic.min.js " > < / script >
< script src = " {{ base_url}}static/jquery/tablesort.js " > < / script >
< link rel = " stylesheet " href = " {{ base_url}}static/semantic/semantic.min.css " >
< link rel = " apple-touch-icon " sizes = " 120x120 " href = " {{ base_url}}static/apple-touch-icon.png " >
< link rel = " icon " type = " image/png " sizes = " 32x32 " href = " {{ base_url}}static/favicon-32x32.png " >
< link rel = " icon " type = " image/png " sizes = " 16x16 " href = " {{ base_url}}static/favicon-16x16.png " >
< link rel = " manifest " href = " {{ base_url}}static/manifest.json " >
< link rel = " mask-icon " href = " {{ base_url}}static/safari-pinned-tab.svg " color = " #5bbad5 " >
< link rel = " shortcut icon " href = " {{ base_url}}static/favicon.ico " >
< meta name = " msapplication-config " content = " {{ base_url}}static/browserconfig.xml " >
< meta name = " theme-color " content = " #ffffff " >
< title > Settings - Bazarr < / title >
< style >
body {
background - color : #272727;
}
#fondblanc {
background - color : #ffffff;
2018-12-09 20:23:51 +00:00
border - radius : 0 ;
box - shadow : 0 0 5 px 5 px #ffffff;
2018-09-16 12:38:00 +00:00
margin - top : 32 px ;
margin - bottom : 3 em ;
padding : 1 em ;
}
. ui . tabular . menu > . disabled . item {
opacity : 0.45 ! important ;
pointer - events : none ! important ;
}
2018-10-31 17:45:16 +00:00
[ data - tooltip ] : after {
z - index : 2 ;
}
2018-09-16 12:38:00 +00:00
< / style >
< / head >
< body >
< div id = ' loader ' class = " ui page dimmer " >
2019-01-12 04:23:53 +00:00
< div id = " loader_text " class = " ui indeterminate text loader " > Saving settings . . . < / div >
2018-09-16 12:38:00 +00:00
< / div >
% include ( ' menu.tpl ' )
< div id = " fondblanc " class = " ui container " >
2020-01-29 02:41:02 +00:00
< form name = " settings_form " id = " settings_form " action = " {{ base_url}}save_settings " method = " post " class = " ui form " autocomplete = " off " enctype = " multipart/form-data " >
2018-09-16 12:38:00 +00:00
< div id = " form_validation_error " class = " ui error message " >
< p > Some fields are in error and you can ' t save settings until you have corrected them. Be sure to check in every tabs.</p>
< / div >
< div class = " ui top attached tabular menu " >
< a class = " tabs item active " data - tab = " general " > General < / a >
< a class = " tabs item " id = " sonarr_tab " data - tab = " sonarr " > Sonarr < / a >
< a class = " tabs item " id = " radarr_tab " data - tab = " radarr " > Radarr < / a >
2019-05-30 03:45:33 +00:00
< a class = " tabs item " data - tab = " subtitles " > Subtitles < / a >
2018-09-16 12:38:00 +00:00
< a class = " tabs item " data - tab = " notifier " > Notifications < / a >
< / div >
< div class = " ui bottom attached tab segment active " data - tab = " general " >
< div class = " ui container " > < button class = " submit ui blue right floated button " type = " submit " value = " Submit " form = " settings_form " > Save < / button > < / div >
2019-05-30 03:45:33 +00:00
% include ( ' settings_general.tpl ' )
2018-09-16 12:38:00 +00:00
< / div >
< div class = " ui bottom attached tab segment " data - tab = " sonarr " >
< div class = " ui container " > < button class = " submit ui blue right floated button " type = " submit " value = " Submit " form = " settings_form " > Save < / button > < / div >
2019-05-30 03:45:33 +00:00
% include ( ' settings_sonarr.tpl ' )
2018-09-16 12:38:00 +00:00
< / div >
< div class = " ui bottom attached tab segment " data - tab = " radarr " >
< div class = " ui container " > < button class = " submit ui blue right floated button " type = " submit " value = " Submit " form = " settings_form " > Save < / button > < / div >
2019-05-30 03:45:33 +00:00
% include ( ' settings_radarr.tpl ' )
2018-09-16 12:38:00 +00:00
< / div >
2019-05-30 03:45:33 +00:00
< div class = " ui bottom attached tab segment " data - tab = " subtitles " >
2018-09-16 12:38:00 +00:00
< div class = " ui container " > < button class = " submit ui blue right floated button " type = " submit " value = " Submit " form = " settings_form " > Save < / button > < / div >
2019-05-30 03:45:33 +00:00
% include ( ' settings_subtitles.tpl ' )
2018-09-16 12:38:00 +00:00
< / div >
< div class = " ui bottom attached tab segment " data - tab = " notifier " >
< div class = " ui container " > < button class = " submit ui blue right floated button " type = " submit " value = " Submit " form = " settings_form " > Save < / button > < / div >
2019-05-30 03:45:33 +00:00
% include ( ' settings_notifications.tpl ' )
2018-09-16 12:38:00 +00:00
< / div >
< / form >
< / div >
% include ( ' footer.tpl ' )
< / body >
< / html >
2019-05-30 03:45:33 +00:00
< script src = " {{ base_url}}static/js/settings_validation.js " > < / script >
2018-09-16 12:38:00 +00:00
< script >
2019-01-12 04:23:53 +00:00
function getQueryVariable ( variable )
{
var query = window . location . search . substring ( 1 ) ;
var vars = query . split ( " & " ) ;
for ( var i = 0 ; i < vars . length ; i + + ) {
var pair = vars [ i ] . split ( " = " ) ;
if ( pair [ 0 ] == variable ) { return pair [ 1 ] ; }
}
return ( false ) ;
}
if ( getQueryVariable ( " saved " ) == ' true ' ) {
new Noty ( {
text : ' Settings saved. ' ,
timeout : 5000 ,
progressBar : false ,
animation : {
open : null ,
close : null
} ,
killer : true ,
type : ' info ' ,
layout : ' bottomRight ' ,
theme : ' semanticui '
} ) . show ( ) ;
}
2018-09-16 12:38:00 +00:00
$ ( ' .menu .item ' )
. tab ( )
;
2019-11-27 03:12:16 +00:00
$ ( ' a:not(.tabs), button:not(.cancel, .test, .no_loader) ' ) . on ( ' click ' , function ( ) {
2018-09-16 12:38:00 +00:00
$ ( ' #loader ' ) . addClass ( ' active ' ) ;
2018-12-09 20:23:51 +00:00
} ) ;
2018-09-16 12:38:00 +00:00
2018-12-09 20:23:51 +00:00
$ ( ' a[target= " _blank " ] ' ) . on ( ' click ' , function ( ) {
2018-09-16 12:38:00 +00:00
$ ( ' #loader ' ) . removeClass ( ' active ' ) ;
2018-12-09 20:23:51 +00:00
} ) ;
2018-09-16 12:38:00 +00:00
2019-05-30 03:45:33 +00:00
$ ( function ( ) {
$ ( ' .form ' ) . form ( ' validate form ' ) ;
$ ( ' #loader ' ) . removeClass ( ' active ' ) ;
2018-09-16 12:38:00 +00:00
} ) ;
2019-05-30 03:45:33 +00:00
$ ( " .form :input " ) . on ( ' change paste keyup focusout ' , function ( ) {
$ ( ' .form ' ) . form ( ' validate form ' ) ;
$ ( ' #loader ' ) . removeClass ( ' active ' ) ;
2018-09-16 12:38:00 +00:00
} ) ;
< / script >
< script >
2019-05-30 03:45:33 +00:00
/ / Don ' t move this part to settings_general.tpl as #settings_form is undefined in this template
2018-12-09 20:23:51 +00:00
if ( $ ( ' #settings_proxy_type ' ) . val ( ) == = " None " ) {
2018-09-16 12:38:00 +00:00
$ ( ' .proxy_option ' ) . hide ( ) ;
2018-12-09 20:23:51 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_url ' , ' empty ' ) ;
2019-05-30 10:33:35 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_port ' , ' empty ' ) ;
2018-12-09 20:23:51 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_port ' , ' integer[1..65535] ' ) ;
2019-05-30 03:45:33 +00:00
} else {
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_url ' , { rules : [ { type : ' empty ' , prompt : ' " General / Proxy settings / Hostname " must have a value ' } ] } ) ;
2019-05-30 10:33:35 +00:00
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_port ' , { rules : [ { type : ' empty ' , prompt : ' " General / Proxy settings / Port " must have a value ' } ] } ) ;
2019-05-30 03:45:33 +00:00
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_port ' , { rules : [ { type : ' integer[1..65535] ' , prompt : ' " General / Proxy settings / Port " must be an integer between 1 and 65535 ' } ] } ) ;
2018-12-09 20:23:51 +00:00
}
2018-09-16 12:38:00 +00:00
2019-05-30 03:45:33 +00:00
/ / Don ' t move this part to settings_general.tpl as #settings_form is undefined in this template
2018-09-16 12:38:00 +00:00
$ ( ' #settings_proxy_type ' ) . dropdown ( ' setting ' , ' onChange ' , function ( ) {
2018-12-09 20:23:51 +00:00
if ( $ ( ' #settings_proxy_type ' ) . val ( ) == = " None " ) {
2018-09-16 12:38:00 +00:00
$ ( ' .proxy_option ' ) . hide ( ) ;
2018-12-09 20:23:51 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_url ' , ' empty ' ) ;
2019-05-30 10:33:35 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_port ' , ' empty ' ) ;
2018-12-09 20:23:51 +00:00
$ ( ' #settings_form ' ) . form ( ' remove rule ' , ' settings_proxy_port ' , ' integer[1..65535] ' ) ;
2019-05-30 03:45:33 +00:00
$ ( ' .form ' ) . form ( ' validate form ' ) ;
$ ( ' #loader ' ) . removeClass ( ' active ' ) ;
2018-09-16 12:38:00 +00:00
} else {
2019-05-30 03:45:33 +00:00
$ ( ' .proxy_option ' ) . show ( ) ;
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_url ' , { rules : [ { type : ' empty ' , prompt : ' " General / Proxy settings / Hostname " must have a value ' } ] } ) ;
2019-05-30 10:33:35 +00:00
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_port ' , { rules : [ { type : ' empty ' , prompt : ' " General / Proxy settings / Port " must have a value ' } ] } ) ;
2019-05-30 03:45:33 +00:00
$ ( ' #settings_form ' ) . form ( ' add rule ' , ' settings_proxy_port ' , { rules : [ { type : ' integer[1..65535] ' , prompt : ' " General / Proxy settings / Port " must be an integer between 1 and 65535 ' } ] } ) ;
$ ( ' .form ' ) . form ( ' validate form ' ) ;
$ ( ' #loader ' ) . removeClass ( ' active ' ) ;
2018-09-16 12:38:00 +00:00
}
2018-12-09 20:23:51 +00:00
} ) ;
2018-09-16 12:38:00 +00:00
< / script >