mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
Various web UI fixes
- fixed user field being shadowed ; - fixed settings reading comparaison ; - fixed forgotten min-age field. Signed-off-by: Bernard `Guyzmo` Pratz <guyzmo+github@m0g.net>
This commit is contained in:
parent
49cdbe8c8f
commit
560122cbc3
@ -56,9 +56,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group backup-target-rsync">
|
<div class="form-group backup-target-rsync">
|
||||||
<label for="backup-target-user" class="col-sm-2 control-label">Username</label>
|
<label for="backup-target-rsync-user" class="col-sm-2 control-label">Username</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control" rows="1" id="backup-target-user">
|
<input type="text" class="form-control" rows="1" id="backup-target-rsync-user">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- S3 BACKUP -->
|
<!-- S3 BACKUP -->
|
||||||
@ -96,7 +96,8 @@
|
|||||||
<input type="text" class="form-control" rows="1" id="backup-target-pass">
|
<input type="text" class="form-control" rows="1" id="backup-target-pass">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group backup-target-local backup-target-s3">
|
<!-- Common -->
|
||||||
|
<div class="form-group backup-target-local backup-target-rsync backup-target-s3">
|
||||||
<label for="min-age" class="col-sm-2 control-label">Days:</label>
|
<label for="min-age" class="col-sm-2 control-label">Days:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="number" class="form-control" rows="1" id="min-age">
|
<input type="number" class="form-control" rows="1" id="min-age">
|
||||||
@ -212,11 +213,11 @@ function show_custom_backup() {
|
|||||||
$("#backup-target-type").val("local");
|
$("#backup-target-type").val("local");
|
||||||
} else if (r.target == "off") {
|
} else if (r.target == "off") {
|
||||||
$("#backup-target-type").val("off");
|
$("#backup-target-type").val("off");
|
||||||
} else if (r.target.substring(0, 5) == "rsync://") {
|
} else if (r.target.substring(0, 8) == "rsync://") {
|
||||||
$("#backup-target-type").val("rsync");
|
$("#backup-target-type").val("rsync");
|
||||||
var path = r.target.substring(8).split('//');
|
var path = r.target.substring(8).split('//');
|
||||||
var [ user, host ] = path.shift().split('@');
|
var [ user, host ] = path.shift().split('@');
|
||||||
$("#backup-target-rsync").val(user);
|
$("#backup-target-rsync-user").val(user);
|
||||||
$("#backup-target-rsync-host").val(host);
|
$("#backup-target-rsync-host").val(host);
|
||||||
$("#backup-target-rsync-path").val('/'+path);
|
$("#backup-target-rsync-path").val('/'+path);
|
||||||
} else if (r.target.substring(0, 5) == "s3://") {
|
} else if (r.target.substring(0, 5) == "s3://") {
|
||||||
@ -241,7 +242,7 @@ function set_custom_backup() {
|
|||||||
else if (target_type == "s3")
|
else if (target_type == "s3")
|
||||||
target = "s3://" + $("#backup-target-s3-host").val() + "/" + $("#backup-target-s3-path").val();
|
target = "s3://" + $("#backup-target-s3-host").val() + "/" + $("#backup-target-s3-path").val();
|
||||||
else if (target_type == "rsync") {
|
else if (target_type == "rsync") {
|
||||||
target = "rsync://" + $("#backup-target-user").val() + "@" + $("#backup-target-rsync-host").val()
|
target = "rsync://" + $("#backup-target-rsync-user").val() + "@" + $("#backup-target-rsync-host").val()
|
||||||
+ "/" + $("#backup-target-rsync-path").val();
|
+ "/" + $("#backup-target-rsync-path").val();
|
||||||
target_user = '';
|
target_user = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user