mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-20 02:52:11 +00:00
removed unnecessary, readonly field in b2 config
This commit is contained in:
parent
8085246fed
commit
aa5ba9999e
@ -122,25 +122,19 @@
|
|||||||
<div class="form-group backup-target-b2">
|
<div class="form-group backup-target-b2">
|
||||||
<label for="backup-target-b2-user" class="col-sm-2 control-label">B2 Application KeyID</label>
|
<label for="backup-target-b2-user" class="col-sm-2 control-label">B2 Application KeyID</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" rows="1" id="backup-target-b2-user" onchange="compute_b2_url()">
|
<input type="text" class="form-control" rows="1" id="backup-target-b2-user">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group backup-target-b2">
|
<div class="form-group backup-target-b2">
|
||||||
<label for="backup-target-b2-pass" class="col-sm-2 control-label">B2 Application Key</label>
|
<label for="backup-target-b2-pass" class="col-sm-2 control-label">B2 Application Key</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" rows="1" id="backup-target-b2-pass" onchange="compute_b2_url()">
|
<input type="text" class="form-control" rows="1" id="backup-target-b2-pass">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group backup-target-b2">
|
<div class="form-group backup-target-b2">
|
||||||
<label for="backup-target-b2-bucket" class="col-sm-2 control-label">B2 Bucket</label>
|
<label for="backup-target-b2-bucket" class="col-sm-2 control-label">B2 Bucket</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" placeholder="B2 Bucket" class="form-control" rows="1" id="backup-target-b2-bucket" onchange="compute_b2_url()">
|
<input type="text" placeholder="B2 Bucket" class="form-control" rows="1" id="backup-target-b2-bucket">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group backup-target-b2">
|
|
||||||
<label for="backup-target-b2-url" class="col-sm-2 control-label">B2 Backup URL</label>
|
|
||||||
<div class="col-sm-8">
|
|
||||||
<input type="text" placeholder="Will be filled automatically" class="form-control" rows="1" id="backup-target-b2-url" disabled>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Common -->
|
<!-- Common -->
|
||||||
@ -285,7 +279,6 @@ function show_custom_backup() {
|
|||||||
$("#backup-target-b2-user").val(b2_application_keyid);
|
$("#backup-target-b2-user").val(b2_application_keyid);
|
||||||
$("#backup-target-b2-pass").val(b2_applicationkey);
|
$("#backup-target-b2-pass").val(b2_applicationkey);
|
||||||
$("#backup-target-b2-bucket").val(b2_bucket);
|
$("#backup-target-b2-bucket").val(b2_bucket);
|
||||||
compute_b2_url();
|
|
||||||
}
|
}
|
||||||
toggle_form()
|
toggle_form()
|
||||||
})
|
})
|
||||||
@ -306,7 +299,8 @@ function set_custom_backup() {
|
|||||||
+ "/" + $("#backup-target-rsync-path").val();
|
+ "/" + $("#backup-target-rsync-path").val();
|
||||||
target_user = '';
|
target_user = '';
|
||||||
} else if (target_type == "b2") {
|
} else if (target_type == "b2") {
|
||||||
target = $('#backup-target-b2-url').val();
|
target = 'b2://' + $('#backup-target-b2-user').val() + ':' + $('#backup-target-b2-pass').val()
|
||||||
|
+ '@' + $('#backup-target-b2-bucket').val()
|
||||||
target_user = '';
|
target_user = '';
|
||||||
target_pass = '';
|
target_pass = '';
|
||||||
}
|
}
|
||||||
@ -348,13 +342,4 @@ function init_inputs(target_type) {
|
|||||||
set_host($('#backup-target-s3-host-select').val());
|
set_host($('#backup-target-s3-host-select').val());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function compute_b2_url(){
|
|
||||||
if ($('#backup-target-b2-user').val() && $('#backup-target-b2-pass').val() && $('#backup-target-b2-bucket').val()){
|
|
||||||
$('#backup-target-b2-url').val('b2://' + $('#backup-target-b2-user').val() + ':' + $('#backup-target-b2-pass').val()
|
|
||||||
+ '@' + $('#backup-target-b2-bucket').val());
|
|
||||||
}else{
|
|
||||||
$('#backup-target-b2-url').val('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user