Show disabled cancel button instead of removing it.
This fixes two problems caused by the removal of the button: Broken layout and broken JS
This commit is contained in:
parent
999253a778
commit
534dffdfe3
2 changed files with 12 additions and 7 deletions
|
@ -349,24 +349,26 @@ h1>input {
|
||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
.button[disabled] {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
.button:hover {
|
.button:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
.button:not([disabled]):hover, .button:not([disabled]):active {
|
||||||
|
background: var(--button-alt);
|
||||||
|
}
|
||||||
|
|
||||||
.button-cancel {
|
.button-cancel {
|
||||||
background: white;
|
background: white;
|
||||||
color: var(--theme-main);
|
color: var(--theme-main);
|
||||||
|
--button-alt: #f0f0f0;
|
||||||
}
|
}
|
||||||
.button-cancel:hover, .button-cancel:active {
|
|
||||||
background: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-default {
|
.button-default {
|
||||||
background: var(--theme-main);
|
background: var(--theme-main);
|
||||||
color: var(--theme-text);
|
color: var(--theme-text);
|
||||||
}
|
--button-alt: var(--theme-input);
|
||||||
.button-default:hover, .button-default:active {
|
|
||||||
background: var(--theme-input);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 960px) {
|
@media (min-width: 960px) {
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
<div class="editor-controls">
|
<div class="editor-controls">
|
||||||
{{#cancel_url}}
|
{{#cancel_url}}
|
||||||
<a class="button button-cancel cancel" href="{{.}}">Cancel</a>
|
<a class="button button-cancel cancel" href="{{.}}">Cancel</a>
|
||||||
|
{{/cancel_url}}
|
||||||
|
{{^cancel_url}}
|
||||||
|
<button class="button button-cancel cancel" disabled>Cancel</a>
|
||||||
{{/cancel_url}}
|
{{/cancel_url}}
|
||||||
<button class="button button-default" type=submit>Save</button>
|
<button class="button button-default" type=submit>Save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue