- Posts: 3
COMMUNITY FORUM
How to remove "select file from server"?
- Thomas
-
Topic Author
- Offline
- New Member
Less
More
12 years 10 months ago #67434
by Thomas
How to remove "select file from server"? was created by Thomas
How can we remove the option "select file from server" in the tab attachments in frontend editing?
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
12 years 10 months ago #67435
by Lefteris
Replied by Lefteris on topic Re: How to remove "select file from server"?
Hi. Make a template override to itemform.php
Please Log in or Create an account to join the conversation.
- Thomas
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
12 years 10 months ago #67436
by Thomas
Replied by Thomas on topic Re: How to remove "select file from server"?
That works for the image tab, but not the attachments tab.
But it is ok, we can use the image tab.
Thanks
But it is ok, we can use the image tab.
Thanks
Please Log in or Create an account to join the conversation.
- massimiliano
-
- Offline
- New Member
Less
More
- Posts: 1
8 years 11 months ago #154929
by massimiliano
Replied by massimiliano on topic How to remove "select file from server"?
Old, but a little workaround can be this:
edit template file itemform.php
edit "addAttachmentButton" button's id and associate a new snippet of javascript to new id.
This is an example of javascript:
Hope helpful.
M.
edit template file itemform.php
edit "addAttachmentButton" button's id and associate a new snippet of javascript to new id.
This is an example of javascript:
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);
});
Hope helpful.
M.
Please Log in or Create an account to join the conversation.
- JoomlaWorks Support Team
-
- Offline
- Elite Member
Less
More
- Posts: 169
8 years 11 months ago #154940
by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic How to remove "select file from server"?
Thank you for sharing this.
Please Log in or Create an account to join the conversation.