我们的页面呈现如下内容:
有没有办法更好地格式化这个?例如,可能在一列中有标签,而在另一列中有输入?
这是我们的代码片段:
renderContentOn: html
html horizontalRule.
html horizontalRule.
html heading level: 2; with: 'System Warnings & Errors:'.
html horizontalRule.
(SpendingManager warningsFound = false) ifFalse: [
self renderWarnings.
WarningsReport renderContentOn: html.
SpendingManager clearProblemList.
html horizontalRule.
html horizontalRule.
].
html heading level: 2; with: 'Create A Fund:'.
html form: [
html label: 'Code: '.
html textInput
on: #fName of: FundCreator.
html break.
html label: ' Starting Amount: '.
html textInput
on: #amount of: FundCreator.
html break.
html submitButton
callback: [(FundCreator fName = '') ifFalse: [FundCreator createFromUI.]
ifTrue: [SpendingManager addProblem: 'SP0002'].
self renderReport ];
text: 'Create Fund'.
].
html heading level: 2; with: 'Create A GLAC:'.
html form: [
html label: 'Code: '.
html textInput
on: #gName of: GLACCreator.
html break.
html label: ' Debit Fund: '.
html textInput
on: #dFund of: GLACCreator.
html break.
html label: ' Credit Fund: '.
html textInput
on: #cFund of: GLACCreator.
html break.
html label: ' Description: '.
html textInput
on: #descr of: GLACCreator.
html break.
html submitButton
callback: [GLACCreator createFromUI. self renderReport ];
text: 'Create GLAC'.
].
html heading level: 2; with: 'Create a Transaction:'.
html form: [
html label: 'GLAC: '.
html textInput
on: #aGLAC of: TransactionCreator.
html break.
html label: ' Amount: '.
html textInput
on: #amount of: TransactionCreator.
html break.
html submitButton
callback: [TransactionCreator createFromUI. self renderReport ];
text: 'Create Transaction'.
].