Changes for page Macros

Last modified by Jip-jan Alunkel on April 15, 18:09

From version 2.26
edited by Jip-jan Alunkel
on March 24, 18:06
Change comment: There is no comment for this version
To version 2.27
edited by Jip-jan Alunkel
on March 25, 00:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,22 +1,18 @@
1 1  {{velocity}}
2 -#*
3 -#set($localitySelectElement = {
4 - "id" : "locality",
5 - "type" : "select",
6 - "required" : true,
7 - "label" : "Locality of the main complaint",
8 - "aria-label" : "Select the locality",
9 - "data-error-response-type" : "use_label_defined_1",
10 - "data-set-space" : "true",
11 - "placeholder" : "cases.word.locality_select.placeholder",
12 - "space-reference" : "cases",
13 - "help-block" : "In which physiological or psychological epicenter can the main complaint be placed? Select the best fitting option from this list."
14 -})
15 -*#
16 16  #macro(createFormElement $elementDataObj)
17 17   #set($elementType = $elementDataObj.type)
18 18   #if($elementType == "select")
19 19   #createSelectElement($elementDataObj)
6 + #elseif($elementType == "text")
7 + #createTextElement($elementDataObj)
8 + #elseif($elementType == "number")
9 + #elseif($elementType == "email")
10 + #elseif($elementType == "range")
11 + #elseif($elementType == "checkbox")
12 + #elseif($elementType == "radio")
13 + #elseif($elementType == "textarea")
14 + #else
15 + #set($hint = "This type of element does not exist, read the manual for more information about element types.")
20 20   #end
21 21  #end
22 22  
... ... @@ -55,7 +55,21 @@
55 55   #end
56 56  {{/html}}
57 57  #end
54 +#macro(createTextElement $O_elementData)
55 +{{html}}
56 + <p class="required" contenteditable="true">
57 + <label for="main_complaint_textinput">
58 + Main complaint
59 + <span class="input-wrap">
60 + <input type="text" class="form-control full" name="main_complaint_textinput" id="main_complaint_textinput" placeholder="${services.localization.render('cases.wordgroup.main_complaint.placeholder')}" aria-describedby="main_complaint_helpBlock" aria-required="true" aria-label="Enter the main complaint" required="required" data-error-response-type="use_label_defined_1" data-query-type="XWQL.matchTitle" data-query-list-type="suggest-negate" data-query-list-contents="value" data-create-page="true" data-query-scope="cases" autocomplete="off">
61 + <span id="main_complaint_helpBlock" class="help-block">Please be as concise as possible when you describe the main complaint. For example: "chronic headache", "intermittend fever" or "diarrhea"</span>
62 + <span class="required-input-field" title="Required input"></span>
63 + <span role="alert" class="form-not-valid-tip"></span>
64 + </span>
65 + </label>
66 + </p>
67 +{{/html}}
68 +#end
58 58  
59 -##createFormElement($localitySelectElement)
60 60  {{/velocity}}
61 61