Branch: Tag:

2013-09-24

2013-09-24 09:42:13 by Pontus Rodling <frigolit@frigolit.net>

Added support for some HTML5-types to vform. Fixes [bug 6879 (#6879)].
Fixed error in Variable.Float when uncastable data is passed to it.

776:    if( _max != no_limit && _min != no_limit )    size = max( strlen(_format(_max)), strlen(_format(_min)) )+2;    string value; +  catch {    if (_may_be_empty && (float)query() == (float)0)    value = "";    else    value = query()==""? "" : _format( (float)query() ); -  +  };       additional_args = additional_args || ([]); -  +  if (!additional_args->type)    additional_args->type="text";       return input(path(), value, size, additional_args);
883:    string value = (query() == 0 && _is_empty)? "" : (string)query();       additional_args = additional_args || ([]); +  if (!additional_args->type)    additional_args->type="text";       return input(path(), value, size, additional_args);
928:    string render_form( RequestID id, void|mapping additional_args )    {    additional_args = additional_args || ([]); +  if (!additional_args->type)    additional_args->type="text";    return input(path(), (string)query(), width, additional_args);    }