Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.74 2002/01/29 15:30:43 mast Exp $ + // $Id: module.pmod,v 1.75 2002/02/26 13:17:18 wellhard Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   //<locale-token project="roxen_config"> LOCALE </locale-token>      #define LOCALE(X,Y) \    ([string](mixed)Locale.translate("roxen_config",roxenp()->locale->get(),X,Y))   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1051:    //! Get the title used as description (shown to the user) for an    //! element gotten from the get_choice_list() function.    {    if( mapping tt = get_translation_table() )    return tt[ what ] || (string)what;    return (string)what;    }       string render_form( RequestID id, void|mapping additional_args )    { -  string res = "<select name='"+path()+"'>\n"; +  string autosubmit = ""; +  if(additional_args && additional_args->autosubmit) +  autosubmit = " autosubmit='autosubmit' onChange='javascript:submit();'"; +  string res = "<select name='"+path()+"'"+autosubmit+">\n";    string current = _name (query());    int selected = 0;    foreach( get_choice_list(), mixed elem )    {    mapping m = ([]);    m->value = _name( elem );    if( equal( m->value, current ) ) {    m->selected="selected";    selected = 1;    }