Change remove file button appearence [SCI-2403]

This commit is contained in:
Oleksii Kriuchykhin 2018-05-18 14:51:45 +02:00
parent c8094f196c
commit b79b0b79cf
2 changed files with 6 additions and 5 deletions

View file

@ -1038,16 +1038,16 @@ var RepositoryDatatable = (function(global) {
// Takes object and surrounds it with input
function changeToInputFileField(object, name, value) {
return "<div class='repository-input-file-field'>" +
return "<div class='repository-input-file-field'><div class='form-group'>" +
"<input type='file' class='form-control' data-object='" +
object + "' name='" + name + "' value='" + value + "'>" +
"<a class='btn btn-danger' onClick='clearFileInput(this)'>" +
object + "' name='" + name + "' value='" + value + "'></div>" +
"<a onClick='clearFileInput(this)'>" +
"<i class='fas fa-times'></i>" +
"</a></div>";
}
global.clearFileInput = function (el) {
$(el).prev('input:file')[0].value = '';
$(el).prev('div').find('input:file')[0].value = '';
}
// Takes an object and creates custom html element

View file

@ -34,7 +34,8 @@
.repository-input-file-field {
display: inline-flex;
.btn-danger {
a {
color: $brand-danger;
margin-left: 5px;
}
}