How can we remove the option "select file from server" in the tab attachments in frontend editing?
14 years 4 months ago #67434
jQuery('#MyNewCustomButtonId').click(function(event) {
event.preventDefault();
var div = jQuery('<div/>', {
style : 'border-top: 1px dotted #ccc; margin: 4px; padding: 10px;'
}).appendTo(jQuery('#itemAttachments'));
var input = jQuery('<input/>', {
name : 'attachment_file[]',
type : 'file'
}).appendTo(div);
var input = jQuery('<input/>', {
name : 'attachment_existing_file[]',
type : 'text'
}).appendTo(div);
var input = jQuery('<input/>', {
value : K2Language[0],
type : 'button'
}).appendTo(div);
input.click(function() {
jQuery(this).parent().remove();
});
var br = jQuery('<br/>').appendTo(div);
var label = jQuery('<label/>').html(K2Language[1]).appendTo(div);
var input = jQuery('<input/>', {
name : 'attachment_title[]',
type : 'text',
'class' : 'linkTitle'
}).appendTo(div);
var br = jQuery('<br/>').appendTo(div);
var label = jQuery('<label/>').html(K2Language[2]).appendTo(div);
var textarea = jQuery('<textarea/>', {
name : 'attachment_title_attribute[]',
cols : '30',
rows : '3'
}).appendTo(div);
});Log in or create an account to reply.