mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-26 18:10:54 +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"> | ||||
|       <label for="backup-target-b2-user" class="col-sm-2 control-label">B2 Application KeyID</label> | ||||
|       <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 class="form-group backup-target-b2"> | ||||
|       <label for="backup-target-b2-pass" class="col-sm-2 control-label">B2 Application Key</label> | ||||
|       <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 class="form-group backup-target-b2"> | ||||
|       <label for="backup-target-b2-bucket" class="col-sm-2 control-label">B2 Bucket</label> | ||||
|       <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()"> | ||||
|       </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> | ||||
|       <input type="text" placeholder="B2 Bucket" class="form-control" rows="1" id="backup-target-b2-bucket"> | ||||
|       </div> | ||||
|   </div> | ||||
|   <!-- Common --> | ||||
| @ -285,7 +279,6 @@ function show_custom_backup() { | ||||
|           $("#backup-target-b2-user").val(b2_application_keyid); | ||||
|           $("#backup-target-b2-pass").val(b2_applicationkey); | ||||
|           $("#backup-target-b2-bucket").val(b2_bucket); | ||||
|           compute_b2_url(); | ||||
|         } | ||||
|         toggle_form() | ||||
|       }) | ||||
| @ -306,7 +299,8 @@ function set_custom_backup() { | ||||
|                                                                 + "/" + $("#backup-target-rsync-path").val(); | ||||
|     target_user = ''; | ||||
|   } 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_pass = ''; | ||||
|   } | ||||
| @ -348,13 +342,4 @@ function init_inputs(target_type) { | ||||
|     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> | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user