mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
76 lines
3.3 KiB
Plaintext
76 lines
3.3 KiB
Plaintext
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel
|
|
@{
|
|
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Service");
|
|
}
|
|
|
|
@section PageFootContent {
|
|
<script>
|
|
delegate('click', '.serviceSettings', e => {
|
|
document.getElementById('ServiceUrl').value = e.target.dataset.url;
|
|
});
|
|
</script>
|
|
}
|
|
|
|
<h2 class="mb-4">@ViewData["Title"]</h2>
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
}
|
|
<form method="post">
|
|
<div class="form-group">
|
|
<input type="hidden" asp-for="Modify"/>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.ServiceUrl" class="form-label"></label>
|
|
<input id="ServiceUrl" asp-for="Settings.ServiceUrl" class="form-control" placeholder="Url"/>
|
|
<p class="form-text text-muted">
|
|
Well-known Dynamic DNS providers are:
|
|
@for (int i = 0; i < Model.KnownServices.Length; i++)
|
|
{
|
|
<a href="#" class="serviceSettings" data-url="@Model.KnownServices[i].Url">@Model.KnownServices[i].Name</a>
|
|
<span>@(i == Model.KnownServices.Length - 1 ? "" : ",")</span>
|
|
}
|
|
</p>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Hostname" class="form-label"></label>
|
|
@if (Model.Modify)
|
|
{
|
|
<input asp-for="Settings.Hostname" class="form-control" readonly placeholder="Hostname"/>
|
|
<p class="form-text text-muted">
|
|
<span>The DNS record has been refreshed: </span>
|
|
@if (Model.LastUpdated != null)
|
|
{
|
|
<span>@Model.LastUpdated</span>
|
|
}
|
|
</p>
|
|
}
|
|
else
|
|
{
|
|
<input asp-for="Settings.Hostname" class="form-control" placeholder="Hostname"/>
|
|
<span asp-validation-for="Settings.Hostname" class="text-danger"></span>
|
|
}
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Login" class="form-label"></label>
|
|
<input asp-for="Settings.Login" class="form-control" placeholder="Login"/>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Password" class="form-label"></label>
|
|
<input asp-for="Settings.Password" class="form-control" placeholder="Password"/>
|
|
</div>
|
|
@if (Model.Modify)
|
|
{
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Enabled" class="form-label"></label>
|
|
<input asp-for="Settings.Enabled" disabled type="checkbox" class="btcpay-toggle ms-2" />
|
|
</div>
|
|
}
|
|
<button name="command" class="btn btn-primary" type="submit" value="Save">Save</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|