Wiki source code of Books

Version 8.17 by Jip-jan Alunkel on April 10, 17:02

Show last authors
1 {{velocity}}
2 #set($discard = $services.localization.use('document', 'cases.Code.translations'))
3 #set($discard = $services.localization.use('document', 'assets.formMaker.translations'))
4 #set($discard = $xwiki.ssx.use('assets.formMaker.WebHome'))
5 #set($discard = $xwiki.jsx.use('assets.formMaker.WebHome', {'minify' : false}))
6 {{/velocity}}
7
8 All about books
9
10 {{include reference="assets.formMaker.macros" /}}
11
12 {{velocity}}
13 {{html}}
14
15 #createFormStart("homeoworld_form" "book")
16
17 #set($booktype = {
18 "id" : "booktype",
19 "type" : "select",
20 "required" : "true",
21 "label" : "Type of book",
22 "aria-label" : "Select the type of book",
23 "data-error-response-type" : "use_label_definite_1",
24 "data-set-space" : "true",
25 "placeholder" : "Type",
26 "space-reference" : "books",
27 "help-block" : "Choose the type of book you would like to add."
28 })
29
30 #createFormElement($booktype)
31
32 #set($book_title = {
33 "id" : "book_title",
34 "type" : "text",
35 "required" : "true",
36 "label" : "Title of the book",
37 "aria-label" : "Enter the title of the book",
38 "placeholder" : "Title",
39 "data-error-response-type" : "use_label_definite_1",
40 "data-query-type" : "XWQL.matchTitle",
41 "data-query-scope" : "books",
42 "data-query-list-type" : "suggest-negate",
43 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_negate_list')",
44 "data-query-list-contents" : "value",
45 "data-create-page" : "true",
46 "help-block" : 'When providing a title of a common type of book, please also provide the authorʼs last name, viz. Boericke Materia Medica.'
47 })
48
49 #createFormElement($book_title)
50
51 #set($author = {
52 "id" : "author",
53 "type" : "text",
54 "required" : "true",
55 "label" : "Author of the book",
56 "aria-label" : "Enter the author of the book",
57 "placeholder" : "Author",
58 "data-query-type" : "XWQL.matchObject",
59 "data-query-scope" : "books",
60 "data-query-list-type" : "suggest-select",
61 "data-query-list-header" : "$services.localization.render('formMaker.line.suggest_select_list')",
62 "data-query-list-contents" : "value",
63 "data-query-list-editable" : "false",
64 "data-create-xobj" : "true",
65 "data-xobj-classname" : "books.WebHome",
66 "data-xobj-fieldname" : "author",
67 "help-block" : 'Select the author of this case.'
68 })
69
70 #createFormElement($author)
71
72 #set($extra_info = {
73 "id" : "extra_info",
74 "type" : "checkbox",
75 "required" : "no",
76 "label" : "Extra information (optional)",
77 "value" : "yes"
78 })
79
80 #createFormElement($extra_info)
81
82 #createExpandStart("extra_info" "yes")
83
84 #set($publish_year = {
85 "id" : "publish_year",
86 "type" : "number",
87 "required" : "true",
88 "label" : "Year of publishing",
89 "aria-label" : "Enter the year of publishing",
90 "placeholder" : "Year",
91 "data-error-response-type" : "use_label_definite_1",
92 "data-create-xobj" : "true",
93 "data-xobj-classname" : "books.WebHome",
94 "data-xobj-fieldname" : "publish_year"
95 })
96
97 #createFormElement($publish_year)
98
99 #createExpandEnd()
100
101 #createFormEnd()
102
103 {{/html}}
104 {{/velocity}}