use disabled property for input and fix style
This commit is contained in:
parent
f1ae2724c6
commit
014a62aa11
3 changed files with 7 additions and 2 deletions
|
@ -265,6 +265,10 @@ tr.unavailable {
|
|||
// show package icon after amount of package numbers
|
||||
input.package {
|
||||
background: url(package-bg.png) no-repeat right center;
|
||||
// disabled and readonly definitions though
|
||||
&[disabled], &[readonly] {
|
||||
background-color: @inputDisabledBackground;
|
||||
}
|
||||
}
|
||||
i.package {
|
||||
background: url(package-bg.png) no-repeat left center;
|
||||
|
@ -275,6 +279,7 @@ i.package {
|
|||
.package {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.input-nano {
|
||||
width: 30px;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ module OrdersHelper
|
|||
units_expected = (order_article.units_billed or order_article.units_to_order)
|
||||
form.text_field :units_received, class: 'input-nano package units_received',
|
||||
data: {'units-expected' => units_expected},
|
||||
readonly: order_article.result_manually_changed? ? "readonly" : nil,
|
||||
disabled: order_article.result_manually_changed?,
|
||||
title: order_article.result_manually_changed? ? t('.locked_to_protect_manual_update') : nil,
|
||||
autocomplete: 'off'
|
||||
end
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
}
|
||||
|
||||
function unlock_receive_input_field() {
|
||||
$('.units_received', $(this).closest('tr')).prop('readonly', false);
|
||||
$('.units_received', $(this).closest('tr')).prop('disabled', false);
|
||||
$(this).remove();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue