mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-26 20:00:27 +03:00
add: Manage template from global settings form
This commit is contained in:
parent
c9a7bdf018
commit
25de639727
4 changed files with 44 additions and 3 deletions
|
@ -61,6 +61,16 @@ Global Settings
|
|||
name="config_file_path" placeholder="E.g. /etc/wireguard/wg0.conf"
|
||||
value="{{ .globalSettings.ConfigFilePath }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email_subject">Email Subject</label>
|
||||
<input type="text" class="form-control" id="email_subject"
|
||||
name="email_subject" placeholder="Your new wireguard configuration"
|
||||
value="{{ .globalSettings.EmailSubject }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email_content">Email Content</label>
|
||||
<textarea class="form-control" id="email_content" name="email_content" placeholder="<p>Html email template</p>" rows="3"> {{ .globalSettings.EmailContent }} </textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
|
||||
|
@ -142,7 +152,17 @@ Global Settings
|
|||
const mtu = $("#mtu").val();
|
||||
const persistent_keepalive = $("#persistent_keepalive").val();
|
||||
const config_file_path = $("#config_file_path").val();
|
||||
const data = {"endpoint_address": endpoint_address, "dns_servers": dns_servers, "mtu": mtu, "persistent_keepalive": persistent_keepalive, "config_file_path": config_file_path};
|
||||
const email_subject = $("#email_subject").val();
|
||||
const email_content = $("#email_content").val();
|
||||
const data = {
|
||||
"endpoint_address": endpoint_address,
|
||||
"dns_servers": dns_servers,
|
||||
"mtu": mtu,
|
||||
"persistent_keepalive": persistent_keepalive,
|
||||
"config_file_path": config_file_path,
|
||||
"email_subject": email_subject,
|
||||
"email_content": email_content
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
|
@ -255,4 +275,4 @@ Global Settings
|
|||
});
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue