Changes for page Macros

Modificado por Jip-jan Alunkel em abril 15, 18:09

From version 2.23
edited by Jip-jan Alunkel
on março 24, 17:24
Change comment: There is no comment for this version
To version 2.27
edited by Jip-jan Alunkel
on março 25, 00:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,20 +1,18 @@
1 1  {{velocity}}
2 -#set($localitySelectElement = {
3 - "id" : "locality",
4 - "type" : "select",
5 - "required" : true,
6 - "label" : "Locality of the main complaint",
7 - "aria-label" : "Select the locality",
8 - "data-error-response-type" : "use_label_defined_1",
9 - "data-set-space" : "true",
10 - "placeholder" : "cases.word.locality_select.placeholder",
11 - "space-reference" : "cases",
12 - "help-block" : "In which physiological or psychological epicenter can the main complaint be placed? Select the best fitting option from this list."
13 -})
14 14  #macro(createFormElement $elementDataObj)
15 15   #set($elementType = $elementDataObj.type)
16 16   #if($elementType == "select")
17 17   #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.")
18 18   #end
19 19  #end
20 20  
... ... @@ -53,7 +53,21 @@
53 53   #end
54 54  {{/html}}
55 55  #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
56 56  
57 -#createFormElement($localitySelectElement)
58 58  {{/velocity}}
59 59