mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
wip
This commit is contained in:
parent
6862081165
commit
5c4d1a811c
2 changed files with 23 additions and 10 deletions
|
@ -35,6 +35,7 @@
|
||||||
<div>
|
<div>
|
||||||
<h1>Name Servers</h1>
|
<h1>Name Servers</h1>
|
||||||
|
|
||||||
|
<!-- TODO: move this to the right -->
|
||||||
<button type="button" class="usa-button" id="nameserver-add-form">
|
<button type="button" class="usa-button" id="nameserver-add-form">
|
||||||
Add name servers
|
Add name servers
|
||||||
</button>
|
</button>
|
||||||
|
@ -114,14 +115,14 @@
|
||||||
<td>{{ form.ip.value }}</td>
|
<td>{{ form.ip.value }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="tablet:display-flex tablet:flex-row">
|
<div class="tablet:display-flex tablet:flex-row">
|
||||||
<button class='usa-button usa-button--unstyled margin-right-2'>
|
<button type="button" class='usa-button usa-button--unstyled margin-right-2'>
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="/public/img/sprite.svg#edit"></use>
|
<use xlink:href="/public/img/sprite.svg#edit"></use>
|
||||||
</svg>
|
</svg>
|
||||||
Edit <span class="usa-sr-only">{{ form.server }}</span>
|
Edit <span class="usa-sr-only">{{ form.server }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<a
|
||||||
role="button"
|
role="button"
|
||||||
id="button-trigger-delete-{{ form.server.value }}"
|
id="button-trigger-delete-{{ form.server.value }}"
|
||||||
class="usa-button usa-button--unstyled text-no-underline late-loading-modal-trigger margin-top-2 line-height-sans-5 text-secondary visible-mobile-flex"
|
class="usa-button usa-button--unstyled text-no-underline late-loading-modal-trigger margin-top-2 line-height-sans-5 text-secondary visible-mobile-flex"
|
||||||
|
@ -130,7 +131,7 @@
|
||||||
<use xlink:href="/public/img/sprite.svg#delete"></use>
|
<use xlink:href="/public/img/sprite.svg#delete"></use>
|
||||||
</svg>
|
</svg>
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</a>
|
||||||
|
|
||||||
<div class="usa-accordion usa-accordion--more-actions margin-right-2 hidden-mobile-flex">
|
<div class="usa-accordion usa-accordion--more-actions margin-right-2 hidden-mobile-flex">
|
||||||
<div class="usa-accordion__heading">
|
<div class="usa-accordion__heading">
|
||||||
|
@ -166,9 +167,24 @@
|
||||||
<td>{{ form.server }}</td>
|
<td>{{ form.server }}</td>
|
||||||
<td>{{ form.ip }}</td>
|
<td>{{ form.ip }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="usa-button usa-button--unstyled display-block">Save</button>
|
<button class="usa-button usa-button--unstyled display-block" type="submit">Save</button>
|
||||||
<button class="usa-button usa-button--unstyled display-block">Cancel</button>
|
|
||||||
<button class="usa-button usa-button--unstyled text-secondary display-block">Delete</button>
|
<!-- TODO: cancel buttons should trigger JS, submit cancel buttons should be nested in modal -->
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="usa-button usa-button--unstyled display-block"
|
||||||
|
name="btn-cancel-click"
|
||||||
|
aria-label="Reset the data in the name server form to the registry state (undo changes)"
|
||||||
|
>Cancel
|
||||||
|
</button>
|
||||||
|
<a
|
||||||
|
role="button"
|
||||||
|
href="#toggle-delete-nameserver"
|
||||||
|
class="usa-button usa-button--unstyled text-secondary display-block"
|
||||||
|
aria-controls="toggle-delete-nameserver"
|
||||||
|
data-open-modal>
|
||||||
|
Delete
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -232,7 +248,7 @@
|
||||||
class="usa-button"
|
class="usa-button"
|
||||||
>Save
|
>Save
|
||||||
</button>
|
</button>
|
||||||
|
<!-- TODO: cancel buttons should trigger JS, submit cancel buttons should be nested in modal -->
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="usa-button usa-button--outline"
|
class="usa-button usa-button--outline"
|
||||||
|
|
|
@ -770,7 +770,6 @@ class DomainNameserversView(DomainFormBaseView):
|
||||||
"""Adjust context from FormMixin for formsets."""
|
"""Adjust context from FormMixin for formsets."""
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
# use "formset" instead of "form" for the key
|
# use "formset" instead of "form" for the key
|
||||||
print(context)
|
|
||||||
context["formset"] = context.pop("form")
|
context["formset"] = context.pop("form")
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
@ -796,8 +795,6 @@ class DomainNameserversView(DomainFormBaseView):
|
||||||
self._get_domain(request)
|
self._get_domain(request)
|
||||||
formset = self.get_form()
|
formset = self.get_form()
|
||||||
|
|
||||||
logger.debug("got formet")
|
|
||||||
|
|
||||||
if "btn-cancel-click" in request.POST:
|
if "btn-cancel-click" in request.POST:
|
||||||
url = self.get_success_url()
|
url = self.get_success_url()
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue