-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ftd
40 lines (29 loc) · 1.09 KB
/
index.ftd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- ftd.string-field $title: title
-- ftd.string-field $description: description
-- ftd.string-field $date: date
-- ftd.boolean-field $is-public: is_public
-- ftd.text-input:
placeholder: Enter title
$on-input$: $ftd.set-string($a = $title.value, v = $VALUE)
-- ftd.text-input:
placeholder: Enter description
multiline: true
$on-input$: $ftd.set-string($a = $description.value, v = $VALUE)
-- ftd.text-input:
placeholder: Enter date
$on-input$: $ftd.set-string($a = $date.value, v = $VALUE)
-- ftd.text:
text: The release is **public**. Click to make it **private**.
text if { !is-public.value }: The release is **private**. Click to make it **public**.
$on-click$: $ftd.toggle($a = $is-public.value)
-- ftd.text: Submit
if: { title.value != "" && date.value != "" }
$on-click$: $insert-release(title=$title, description=$description, date=$date, is_public=$is-public)
-- void insert-release(title, description, date, is_public):
ftd.string-field title:
ftd.string-field description:
ftd.string-field date:
ftd.boolean-field is_public:
ftd.submit_form(
"/insert/", title, description, date, is_public
)