17488 Posts in 4473 Topics by 1978 members
| Go to End | ||
| Author | Topic: | 4839 Views |
-
Re: Updating MemberTableField on save

24 July 2007 at 11:42am
I'm having problems and errors pretty much everywhere trying to get this form to work completely...and I'm really getting sick of looking at it. What'll it cost for me to pay someone SilverStripe-savvy to do it?
-
Re: Updating MemberTableField on save

24 July 2007 at 1:11pm
> What javascript do I need to say "apply this JS object to this bit"? The code that I THINK does it normally (in MemberTableField.js) is
> MemberTableField.applyTo('#Form_EditForm div.MemberTableField');
> but if I use that, it just tells me MemberTableField is undefined...Hi Nathan,
This may be a stab in the dark, but I think that error may be caused by the fact that this does not show up in /admin/ by default:
<script type="text/javascript" src="cms/javascript/MemberTableField.js"></script>Try making the folllowing change to cms/code/LeftAndMain.php (copied from cms/code/NewsletterAdmin.php) by putting the Requirements::javascript calls in LeftAndMain::init() :
Index: cms/code/LeftAndMain.php
===================================================================
--- cms/code/LeftAndMain.php (revision 39154)
+++ cms/code/LeftAndMain.php (working copy)
@@ -68,6 +68,15 @@
Requirements::javascript('sapphire/javascript/Validator.js');Requirements::css("sapphire/css/SubmittedFormReportField.css");
+ // needed for MemberTableField (Requirements not determined before Ajax-Call)
+ Requirements::javascript("jsparty/greybox/AmiJS.js");
+ Requirements::javascript("jsparty/greybox/greybox.js");
+ Requirements::javascript("sapphire/javascript/TableListField.js");
+ Requirements::javascript("sapphire/javascript/TableField.js");
+ Requirements::javascript("sapphire/javascript/ComplexTableField.js");
+ Requirements::javascript("cms/javascript/MemberTableField.js");
+ Requirements::css("jsparty/greybox/greybox.css");
+ Requirements::css("sapphire/css/ComplexTableField.css");
}/**
Hope this helps,
Elijah
-
Re: Updating MemberTableField on save

24 July 2007 at 1:17pm
Already done that...it solves one problem, but just leads to more...at the moment I'm having problems related to actually creating the group, or more specifically making sure the member list has the group information at all the right times.
| 4839 Views | ||
| Go to Top |


