Roxen.git / server / modules / tags / wizard_tag.pike

version» Context lines:

Roxen.git/server/modules/tags/wizard_tag.pike:1:   // This is a roxen module. Copyright © 1997-2000, Roxen IS.   // Released under GPL   // made by Per Hedbor    - constant cvs_version = "$Id: wizard_tag.pike,v 1.25 2000/02/24 05:20:11 nilsson Exp $"; + constant cvs_version = "$Id: wizard_tag.pike,v 1.26 2000/03/20 17:31:04 mast Exp $";   constant thread_safe=1;   #include <module.h>   inherit "module";   inherit "wizard";      constant module_type = MODULE_PARSER;   constant module_name = "Wizard generator";   constant module_doc = "Generates wizards<p>See &lt;wizard help&gt; for more information\n";      string internal_verify(string t, mapping args, string contents, int l, int ol,
Roxen.git/server/modules/tags/wizard_tag.pike:50:   string tag_wizard(string t, mapping args, string contents, object id,    object file, mapping defines)   {    if(!id->misc->line)    id->misc->line=-1;    mapping f = ([ "pages":({}) ]);    string pike = ("inherit \"wizard\";\n" +    sprintf("# "+id->misc->line+" %O\n"    "string name = %O;\n",    id->not_query, (args->name||"unnamed"))); +  +  if (args->method || args->enctype) { +  string method = ""; +  if (args->method) +  method += " method=" + Roxen.html_encode_tag_value (args->method); +  if (args->enctype) +  method += " enctype=" + Roxen.html_encode_tag_value (args->enctype); +  pike += sprintf ("constant wizard_method = %O;\n", method); +  } +     int p;    foreach(glob("*-label", indices(args)), string a)    {    pike += sprintf("# "+id->misc->line+" %O\n",    id->not_query);    pike += sprintf(" string "+replace(replace(a,"-","_"),({"(",")","+",">"}),    ({"","","",""}))+    " = %O;\n", args[a]);    }