Closed (fixed)
Project:
TableField
Version:
7.x-2.1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2010 at 17:34 UTC
Updated:
26 Jul 2013 at 16:37 UTC
Jump to comment: Most recent file
Comments
Comment #1
kevin hankens commentedYeah, that's a great idea. What we should do is add a hook_perm entry and use user_access() when it builds the form. Feel free to submit a patch. Otherwise, I can probably do one later this afternoon...
Comment #2
giorgio79 commented+1
Comment #3
giorgio79 commentedHello,
Here is a patch.
It adds two checkboxes on the edit field page:
1. Enable Users changing the number of rows
2. Enable Users changing the number of columns
Default is enabled.
If both are disabled no buttons show, if one of them is enabled the field plus the rebuild button shows.
Check it out :)
Comment #4
giorgio79 commentedComment #5
giorgio79 commentedFound a bug, here is a new version
Comment #6
giorgio79 commentedEven more improvements. Now the default table rebuild options appear regardless of these switches.
Comment #7
jonathan_hunt commentedThis patch improves on #6 by making the CSV upload an option on a per-field instance (and improves code style also).
Comment #8
bojanz commentedI agree with #7, it's better to have it as a per-field setting (my use case requires the rebuild option to be gone for all roles).
I think the option between "have it"/"don't have it" is much common than "let this role have it"/"but don't let those two have it".
Plus, if it's this way then I can turn off rebuilding when creating a field. If it's a permission then I can't do anything from code.
Checked, still applies against the D6 version.
Marking as RTBC.
If you agree, I can provide the reroll for 7.x.
Comment #9
tectokronos commentedHi,
There is a little error in the patch posted by jonathan_hunt:
Double periods (wrong):
Correction:
This patch is awesome. Thank you very much!! :D
Comment #10
qayoub commentedHelp!!
how can i fix the header of a table field for a specific content type !?
Comment #11
bassem commentedHello all,
ANy news for the same feature being available for D7? it is quite essential if you are using cck forms for online applications that handle quite a large number of submissions and allowing csv uploads could be a high security risk.
regards,
bas
Comment #12
jaskegreen commentedStill need this to work in version 7.
Cheers,
Jason
Comment #13
sam@sasiaccc.org commentedHi ,
I am very new to drupal. Can some say how to install the patch so that I could disable the "rebuild table" option
Thanks in advance
Comment #14
drifter commentedHere's a form_alter hook that will disable the rebuild table and import options on Drupal 7. You can use them in a custom module. The important thing is that count_cols and count_rows still need to be passed.
Comment #15
h.arefmanesh commentedI write a new patch ,
This patch create a permission for displaying "rebuild table" button.
Comment #16
kevin hankens commentedSo sorry that this has languished for so long. I'm trying desperately to play catch up here.
Here's a commit to 7.x-2.x that provides role-based access permissions to rebuild the tables. There's an edge case where csv imports can redefine the structure, but it's probably debatable as to how to handle that.
Thanks to everyone who contributed!!
http://drupalcode.org/project/tablefield.git/commit/6cbec457d80100b578c1...