[Bug 30011] Limited nested form capability

2011-12-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

Yaron Koren  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #11 from Yaron Koren  2011-12-16 13:15:49 UTC ---
Marking this as "fixed", which I should have done a while ago.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-09-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #10 from Yaron Koren  2011-09-23 05:56:39 UTC ---
Awesome!!! The patch works perfectly. Thanks for your contribution here, and
I'm really looking forward to this feature being officially released, in the
next version, which will hopefully be coming out soon.

By the way, to answer one of your original points, I don't think the fact that
it only allows one level of nesting is a big deal - that's all that most people
need, and anything more than that is probably too complex a set of information
to try to include on a single wiki page.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-09-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

LY Meng  changed:

   What|Removed |Added

   Attachment #8876|0   |1
is obsolete||
   Attachment #8877|0   |1
is obsolete||
   Attachment #8878|0   |1
is obsolete||
   Attachment #8879|0   |1
is obsolete||

--- Comment #9 from LY Meng  2011-09-23 03:11:38 UTC ---
Created attachment 9090
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9090
Patch to fix the label issue - based on svn rev 97884

Hi Yaron,

Here is the patch.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-09-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #8 from LY Meng  2011-09-22 07:19:34 UTC ---
Hi Yaron,

Thanks for pointing this issue. Indeed, it seems that I overlooked the label
attribute. I made a fix for that based on the latest SVN version, I will upload
it tonight.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-09-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #7 from Yaron Koren  2011-09-08 16:40:02 UTC ---
Hi LY,

Sorry for the delay - and thanks again for this awesome patch. I finally
checked it in to SVN just now, with some modifications: I moved the new
functions into SF_FormPrinter.php, so now that's the only modified file; I
changed the names of some of the functions and variables; I changed the
parameter "embedder" to now be called "holds template"; I changed some of the
comments and formatting; and I did some refactoring of the code, creating a new
function, multipleTemplateInstanceHTML(). But the actual flow of the code is
exactly as you created it.

This looks great, and I think this will have a big impact on how forms are
structured. There's only one problem that I see with it at the moment, which is
that, if you have a "label=" parameter for the multiple-instance template
(which many people do), the  tag for that template doesn't move to
the new location in the form. You can see the problem here, with this test form
I created:

http://discoursedb.org/wiki/Special:FormEdit/Source2/Test_source

Here's the definition of that form:

http://discoursedb.org/w/index.php?title=Form:Source2&action=edit

Do you have any thoughts on this? If you know of a fix, another patch would
definitely be welcome.

-Yaron

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-08-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

LY Meng  changed:

   What|Removed |Added

   Attachment #8816|0   |1
is obsolete||

--- Comment #6 from LY Meng  2011-08-03 00:38:37 UTC ---
Created attachment 8879
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8879
SF_Utils already patched based on 2.2.1

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-08-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #5 from LY Meng  2011-08-03 00:37:57 UTC ---
Created attachment 8878
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8878
SF_FormPrinter already patched based on 2.2.1

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-08-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #4 from LY Meng  2011-08-03 00:30:39 UTC ---
Created attachment 8877
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8877
SF_Utils patch based on 2.2.1

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-08-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #3 from LY Meng  2011-08-03 00:29:51 UTC ---
Created attachment 8876
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8876
SF_FormPrinter patch based on 2.2.1

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-08-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #2 from LY Meng  2011-08-03 00:28:05 UTC ---
Hello, 

I modified the code so that it works with 

{{{field|town_mayors|embedder}}}

and:

{{{for template|Mayor|embed in field=Town[town_mayors]}}}

Actually, using only "hidden" would make difficult to especially identify this
field asa placeholder to embed a field. Since at form generation the field
would actually contain the list of Mayor templates, there wouldn't be any way
to tell whether it's supposed to be something to delegate to an another Form or
if it's a normal variable. Right now the process is done on the fly, so if a
field is seen as a placeholder through the "embedder" attribute, the data is
moved out of the template and added at the end of the parsed string, so that it
will be later picked up by an another approriate form.


To get the process working only with a "hidden" attribute, we would need to
have a first loop parsing all the code to detect which forms are here, where
are the placeholders and make a hierarchy of things to nest, and from that
identify which hidden fields are true hidden fields, and which fields are
placeholders. That would need large structure modifications (but would also
allow infinite level of nest forms I think). 

Right now the limitation with the "on the fly" parse is that nested forms have
to be declared after the main form that will embed them. It is possible to
embed multiple forms in a base form, but trying to embed a form into a form
that is itself embedded in something else doesn't seem to work. For that,we
would need to use the first parse loop described above, and then probably
generate everything recursively.


About the current syntax, if the user mistakes the "embed in field" attribute's
value, the Templates parsed by this form (ex: Mayor) will still be taken out of
the main template and parsed as if it were normal "multiple forms", and then
saved outside of the main template. Fixing the "embed in field" attribute's
value, reediting the page and resaving it will reintegrate these templates
(Mayor) into the approriate field in the main template (Town). It can be used
deliberately as a trick to grab and move this kind of data inside/outside of
templates.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 30011] Limited nested form capability

2011-07-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=30011

--- Comment #1 from Yaron Koren  2011-07-22 18:09:26 UTC ---
Hi - this patch looks extremely interesting. Two thoughts:

- would it be possible to change the form syntax, so that instead of using the
"placeholder/placeholder_name" parameters, it had syntax that looked like:

{{{field|town_mayors|hidden}}}

...and:

{{{for template|Mayor|embed in field=Town[town_mayors]}}}

? I think that would be easier for users to understand.

- Could you also include, besides the complete file, a patch file showing just
the changes? If you have SVN, you can do that by calling "svn diff
SF_FormPrinter.php > patch_file".

Thank you, and I look forward to including this functionality in the next
version of SF.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l