Error form.

Commit
04857b194edf6f68ec23936e290d47bcb119ce57
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker-Components/MFTErrorsForm.class.st
index 00000000..4bc0b10f 000000..100644
@@ -0,0 +1,53 @@
1 Added: Class {
2 Added: #name : 'MFTErrorsForm',
3 Added: #superclass : 'MFTForm',
4 Added: #instVars : [
5 Added: 'errors'
6 Added: ],
7 Added: #category : 'MyFitnessTracker-Components-Forms',
8 Added: #package : 'MyFitnessTracker-Components',
9 Added: #tag : 'Forms'
10 Added: }
11 Added:
12 Added: { #category : 'as yet unclassified' }
13 Added: MFTErrorsForm >> cancelForm [
14 Added:
15 Added: self answer: false
16 Added: ]
17 Added:
18 Added: { #category : 'accessing' }
19 Added: MFTErrorsForm >> errors: anObject [
20 Added:
21 Added: errors := anObject
22 Added: ]
23 Added:
24 Added: { #category : 'initialization' }
25 Added: MFTErrorsForm >> initialize [
26 Added:
27 Added: super initialize .
28 Added: heading := 'Errors'
29 Added: ]
30 Added:
31 Added: { #category : 'rendering' }
32 Added: MFTErrorsForm >> renderContentOn: html [
33 Added:
34 Added: self renderFormOn: html with: [
35 Added: html unorderedList: [ errors do: [ :error | html listItem: error ] ].
36 Added: html text: 'Go back and fix the errors, or abort this process.' ]
37 Added: ]
38 Added:
39 Added: { #category : 'as yet unclassified' }
40 Added: MFTErrorsForm >> renderSubmitOn: html [
41 Added:
42 Added: html buttonGroup: [
43 Added: html formButton
44 Added: beSubmit;
45 Added: beSecondary;
46 Added: callback: [ self answer: false ];
47 Added: with: 'Go back'.
48 Added: html formButton
49 Added: beSubmit;
50 Added: beDanger;
51 Added: callback: [ self answer: true ];
52 Added: with: 'Abort' ]
53 Added: ]