mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 17:09:45 +08:00
Merge pull request #681 from mlorb/ml_sci_1351
fix errors in repo table [SCI-1351]
This commit is contained in:
commit
aa749cfd23
2 changed files with 4 additions and 3 deletions
|
@ -670,7 +670,7 @@ function onClickSave() {
|
||||||
if (input) {
|
if (input) {
|
||||||
input.closest('.form-group').addClass('has-error');
|
input.closest('.form-group').addClass('has-error');
|
||||||
input.parent().append("<span class='help-block'>" +
|
input.parent().append("<span class='help-block'>" +
|
||||||
val.value[0] + '<br /></span>');
|
val.data[0] + '<br /></span>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,7 +39,7 @@ class RepositoryRowsController < ApplicationController
|
||||||
)
|
)
|
||||||
unless cell_value.save
|
unless cell_value.save
|
||||||
errors[:repository_cells] << {
|
errors[:repository_cells] << {
|
||||||
"#{cell.repository_column.id}": cell_value.errors.messages
|
"#{column.id}": cell_value.errors.messages
|
||||||
}
|
}
|
||||||
raise ActiveRecord::RecordInvalid
|
raise ActiveRecord::RecordInvalid
|
||||||
end
|
end
|
||||||
|
@ -106,7 +106,8 @@ class RepositoryRowsController < ApplicationController
|
||||||
existing.value.data = value
|
existing.value.data = value
|
||||||
unless existing.value.save
|
unless existing.value.save
|
||||||
errors[:repository_cells] << {
|
errors[:repository_cells] << {
|
||||||
"#{cell.repository_column_id}": existing.value.errors.messages
|
"#{existing.repository_column_id}":
|
||||||
|
existing.value.errors.messages
|
||||||
}
|
}
|
||||||
raise ActiveRecord::RecordInvalid
|
raise ActiveRecord::RecordInvalid
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue