* Added fitlabel and fmNone

git-svn-id: trunk@8183 -
This commit is contained in:
joost 2007-07-28 21:49:06 +00:00
parent ceeac6e8e4
commit 07eb623e07

View File

@ -36,7 +36,7 @@ type
TFieldCheckEvent = procedure (aField:TField; var check:boolean) of object; TFieldCheckEvent = procedure (aField:TField; var check:boolean) of object;
TFormInputType = (fittext,fitpassword,fitcheckbox,fitradio,fitfile,fithidden, TFormInputType = (fittext,fitpassword,fitcheckbox,fitradio,fitfile,fithidden,
fitproducer,fittextarea,fitrecordselection); fitproducer,fittextarea,fitrecordselection,fitlabel);
{ TTablePosition } { TTablePosition }
@ -244,7 +244,7 @@ type
TButtonVerPosition = (bvpTop, bvpBottom); TButtonVerPosition = (bvpTop, bvpBottom);
TButtonVerPositionSet = set of TButtonVerPosition; TButtonVerPositionSet = set of TButtonVerPosition;
TButtonHorPosition = (bhpLeft, bhpCenter, bhpJustify, bhpRight); TButtonHorPosition = (bhpLeft, bhpCenter, bhpJustify, bhpRight);
TFormMethod = (fmGet, fmPost); TFormMethod = (fmNone, fmGet, fmPost);
{ THTMLDatasetFormProducer } { THTMLDatasetFormProducer }
@ -734,10 +734,10 @@ begin
end; end;
function THTMLDatasetFormProducer.StartForm(aWriter: THTMLWriter) : THTMLCustomElement; function THTMLDatasetFormProducer.StartForm(aWriter: THTMLWriter) : THTMLCustomElement;
const MethodAttribute : array[TFormMethod] of string = ('GET','POST'); const MethodAttribute : array[TFormMethod] of string = ('','GET','POST');
var t : THTMLCustomElement; var t : THTMLCustomElement;
begin begin
if FormAction <> '' then if Self.FormMethod <> fmNone then
begin begin
result := aWriter.Startform; result := aWriter.Startform;
with THTML_Form(result) do with THTML_Form(result) do
@ -761,7 +761,7 @@ begin
with aWriter do with aWriter do
begin begin
EndTable; EndTable;
if FormAction <> '' then if self.FormMethod <> fmNone then
Endform; Endform;
end; end;
end; end;
@ -854,6 +854,7 @@ procedure THTMLDatasetFormEditProducer.ControlToTableDef (aControldef : TFormFie
with TableDef.CopyTablePosition(aControlDef.ValuePos) do with TableDef.CopyTablePosition(aControlDef.ValuePos) do
begin begin
case aControlDef.inputtype of case aControlDef.inputtype of
fitlabel,
fittext, fittext,
fitpassword, fitpassword,
fitcheckbox, fitcheckbox,
@ -1099,6 +1100,8 @@ function TTableCell.WriteContent(aWriter: THTMLWriter) : THTMLCustomElement;
aWriter.FormFile(Name, Value); aWriter.FormFile(Name, Value);
fithidden : fithidden :
aWriter.FormHidden (Name, Value); aWriter.FormHidden (Name, Value);
fitlabel :
aWriter.Text (Value);
end; end;
end; end;