Jasny Fileinput Widget を既存のフォームに統合しました。新しいファイルを選択すると、[変更] と [削除] の 2 つのボタンが表示されます。この場合、変更ボタンは必要ないと思いますので、このボタンを完全に削除したいと思います。要素に style="display:none" を追加することで、この要素も削除しようとします。ただし、これはまだ次のように空白の場所に表示されます: jsfiddle。
私の HTML:
<div class="fileinput fileinput-exists" data-provides="fileinput">
<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" />
</div>
<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"><img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" /></div>
<div>
<span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span style="display:none" class="fileinput-exists">Change</span><input type="file" name="file[]"></span>
<a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
</div>
</div>
これを完全に削除する方法はありますか?