Email signup dialog.

Commit
e6950237876b0b4c9185c3c596389337dfb35ccf
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker/MFTEmailSignupDialog.class.st
index 00000000..c2fd331f 000000..100644
@@ -0,0 +1,64 @@
1 Added: Class {
2 Added: #name : #MFTEmailSignupDialog,
3 Added: #superclass : #SBSComponent,
4 Added: #instVars : [
5 Added: 'localPart',
6 Added: 'domain'
7 Added: ],
8 Added: #category : #'MyFitnessTracker-Dialog'
9 Added: }
10 Added:
11 Added: { #category : #initialization }
12 Added: MFTEmailSignupDialog >> initialize [
13 Added:
14 Added: super initialize.
15 Added: localPart := String new.
16 Added: domain := String new
17 Added: ]
18 Added:
19 Added: { #category : #rendering }
20 Added: MFTEmailSignupDialog >> renderContentOn: html [
21 Added:
22 Added: html div
23 Added: darkBackground;
24 Added: paddingTopAndBottom: 3;
25 Added: paddingLeftAndRight: 5;
26 Added: class: 'fixed-top';
27 Added: with: [
28 Added: html heading
29 Added: level3;
30 Added: whiteText;
31 Added: with: 'Get notified as soon as MFT is ready!'.
32 Added: html paragraph
33 Added: whiteText;
34 Added: with: [
35 Added: html
36 Added: text:
37 Added: 'You will receive a single e-mail indicating that My Fitness Tracker is usable and accepting new user registration.';
38 Added: space;
39 Added: text:
40 Added: 'The e-mail address provided shall be used for no other purpose whatsoever.' ].
41 Added: html form
42 Added: paddingTopAndBottom: 3;
43 Added: with: [
44 Added: html inputGroup with: [
45 Added: html formTextInput
46 Added: callback: [ :value | localPart := value ];
47 Added: placeholder: 'my-user'.
48 Added: html inputGroupAppend: [ html inputGroupText: '@' ].
49 Added: html formTextInput
50 Added: callback: [ :value | domain := value ];
51 Added: placeholder: 'example.com'.
52 Added: html inputGroupAppend: [
53 Added: html form: [
54 Added: html buttonGroup: [
55 Added: html formButton
56 Added: beSecondary;
57 Added: beSubmit;
58 Added: callback: [ self answer: localPart , '@' , domain ];
59 Added: with: 'Confirm'.
60 Added: html outlineButton
61 Added: beSecondary;
62 Added: callback: [ self answer: nil ];
63 Added: with: 'Cancel' ] ] ] ] ] ]
64 Added: ]