mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 05:29:43 +02:00
Change all <a> buttons to <button>
This commit is contained in:
parent
0e09e5720b
commit
4a634936e6
4 changed files with 17 additions and 9 deletions
|
@ -2290,7 +2290,7 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
text = obj.requested_domain
|
text = obj.requested_domain
|
||||||
if obj.portfolio:
|
if obj.portfolio:
|
||||||
return format_html(
|
return format_html(
|
||||||
f'<img src="/public/admin/img/icon-yes.svg" aria-hidden="true"> {escape(text)}'
|
f'<img class="padding-right-05" src="/public/admin/img/icon-yes.svg" aria-hidden="true">{escape(text)}'
|
||||||
)
|
)
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ input[type=submit].button--dja-toolbar:focus, input[type=submit].button--dja-too
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.object-tools li button {
|
.object-tools li button, button.addlink {
|
||||||
font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
|
@ -520,6 +520,14 @@ input[type=submit].button--dja-toolbar:focus, input[type=submit].button--dja-too
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mimic the style for <a>
|
||||||
|
.object-tools > p > button.addlink {
|
||||||
|
background-image: url(../admin/img/tooltag-add.svg) !important;
|
||||||
|
background-repeat: no-repeat !important;
|
||||||
|
background-position: right 7px center !important;
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.module--custom {
|
.module--custom {
|
||||||
a {
|
a {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
{% if has_absolute_url %}
|
{% if has_absolute_url %}
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "History" %}</a>
|
<button data-href="{% add_preserved_filters history_url %}" class="historylink use-button-as-link">{% translate "History" %}</button>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ absolute_url }}" class="viewsitelink">{% translate "View on site" %}</a>
|
<button data-href="{{ absolute_url }}" class="viewsitelink use-button-as-link">{% translate "View on site" %}</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -30,18 +30,18 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{% add_preserved_filters history_url %}">{% translate "History" %}</a>
|
<button data-href="{% add_preserved_filters history_url %}" class="historylink use-button-as-link">{% translate "History" %}</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if opts.model_name == 'domainrequest' %}
|
{% if opts.model_name == 'domainrequest' %}
|
||||||
<li>
|
<li>
|
||||||
<a id="id-copy-to-clipboard-summary" class="usa-button--dja" type="button" href="#">
|
<button id="id-copy-to-clipboard-summary" class="usa-button--dja">
|
||||||
<svg class="usa-icon">
|
<svg class="usa-icon">
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
|
<use xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<!-- the span is targeted in JS, do not remove -->
|
<!-- the span is targeted in JS, do not remove -->
|
||||||
<span>{% translate "Copy request summary" %}</span>
|
<span>{% translate "Copy request summary" %}</span>
|
||||||
</a>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
{% if has_add_permission %}
|
{% if has_add_permission %}
|
||||||
<p class="margin-0 padding-0">
|
<p class="margin-0 padding-0">
|
||||||
{% url cl.opts|admin_urlname:'add' as add_url %}
|
{% url cl.opts|admin_urlname:'add' as add_url %}
|
||||||
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink">
|
<button data-href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink use-button-as-link">
|
||||||
{% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %}
|
{% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %}
|
||||||
</a>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue