Secondary button can actually be disabled

This commit is contained in:
Jean-Baptiste Bellet
2023-01-06 11:35:12 +01:00
parent 5aca76e520
commit e403a2c174
2 changed files with 12 additions and 2 deletions

View File

@@ -3,4 +3,4 @@
{{ enterprise.name }}
= "{{ enterprise.issues_summary_#{type} ? '('+enterprise.issues_summary_#{type}+')' : '' }}"
= f.submit t(".add_#{type}"), 'ng-click' => "add#{type.capitalize}($event)", 'ng-disabled' => "!new_#{type}_id || !OrderCycle.novel#{type.capitalize}(new_#{type}_id)"
= f.submit t(".add_#{type}"), 'ng-click' => "add#{type.capitalize}($event)", 'ng-disabled' => "!new_#{type}_id || !OrderCycle.novel#{type.capitalize}(new_#{type}_id)", "class": "secondary"

View File

@@ -26,10 +26,20 @@ fieldset .filter-actions .button:hover,
}
&.disabled,
&[disabled] {
&[disabled],
&.disabled.secondary,
&[disabled].secondary {
@include backgroundAndBorder($v2-dark-light-grey);
box-shadow: none;
cursor: default;
color: white;
&:hover {
@include backgroundAndBorder($v2-dark-light-grey);
box-shadow: none;
cursor: default;
color: white;
}
}
&.secondary,