Изменения документа Macros

Редактировал(а) Jip-jan Alunkel апреля 15, 18:09

От версии 2.58
отредактировано Jip-jan Alunkel
на марта 28, 16:40
Изменить комментарий: К данной версии нет комментариев
К версии 2.52
отредактировано Jip-jan Alunkel
на марта 28, 16:00
Изменить комментарий: К данной версии нет комментариев

Сводка

Подробности

Свойства страницы
Содержимое
... ... @@ -1,12 +1,4 @@
1 1  {{velocity}}
2 -#macro(createFormStart $id $product)
3 -<form action="" id="${id}" method="post" class="formMaker" data-form-product="${product}" novalidate="novalidate">
4 -#end
5 -
6 -#macro(createFormEnd)
7 -</form>
8 -#end
9 -
10 10  #macro(createFormElement $elementDataObj)
11 11   #set($elementType = $elementDataObj.type)
12 12   #set($elementTagName = '')
... ... @@ -14,7 +14,7 @@
14 14   #set($requiredCSSClass = '')
15 15   #set($addedCSSClass = '')
16 16   #set($hint = '')
17 - #if($O_elementData.required == "yes")
9 + #if($O_elementData.required == true)
18 18   #set($requiredAttributes = 'aria-required="true" required="required" data-error-response-type="${O_elementData.data-error-response-type}"')
19 19   #set($requiredCSSClass = ' class="required"')
20 20   #end
... ... @@ -30,6 +30,7 @@
30 30   #else
31 31   #set($hint = "This type of element does not exist, read the manual for more information about element types.")
32 32   #end
25 +{{html}}
33 33   #if($elementTagName == "select" || $elementTagName == "input" || $elementTagName == "textarea")
34 34   <p${requiredCSSClass}>
35 35   <label for="${elementDataObj.id}_${elementTagName}">
... ... @@ -65,6 +65,7 @@
65 65   #if($hint != "")
66 66   <p class="box errormessage">${hint}</p>
67 67   #end
61 +{{/html}}
68 68  #end
69 69  
70 70  #macro(createSelectElement $O_elementData $O_tagName $O_requiredAttributes)