 Holger Frey
					
					8 years ago
						Holger Frey
					
					8 years ago
					
				
				 9 changed files with 171 additions and 16 deletions
			
			
		| @ -0,0 +1,36 @@@@ -0,0 +1,36 @@ | ||||
| <span tal:define="error_class error_class|field.widget.error_class; | ||||
|                      description description|field.description; | ||||
|                      title title|field.title; | ||||
|                      hidden hidden|field.widget.hidden; | ||||
|                      category category|field.widget.category; | ||||
|                      item_template item_template|field.widget.item_template; | ||||
|                      amount_field field.children[0]; | ||||
|                      currency_field field.children[1]; | ||||
|                      oid oid|amount_field.oid; | ||||
|                      required required|amount_field.required;" | ||||
|          i18n:domain="deform" | ||||
|          class="moneyinput"> | ||||
| 
 | ||||
|     ${field.start_mapping()} | ||||
|     <div tal:repeat="child field.children" | ||||
|          tal:replace="structure child.render_template(item_template)" > | ||||
|     </div> | ||||
|     ${field.end_mapping()} | ||||
| 
 | ||||
|       <p class="help-inline" | ||||
|          tal:define="errstr 'error-%s' % field.oid" | ||||
|          tal:repeat="msg amount_field.error.messages()|currency_field.error.messages()" | ||||
|          i18n:translate="" | ||||
|          tal:attributes="id repeat.msg.index==0 and errstr or | ||||
|          ('%s-%s' % (errstr, repeat.msg.index))" | ||||
|          tal:condition="(amount_field.error or currency_field.error) and not field.widget.hidden"> | ||||
|         ${msg} | ||||
|       </p> | ||||
| 
 | ||||
|       <p tal:condition="field.description and not field.widget.hidden" | ||||
|          class="help-inline" > | ||||
|         ${field.description} | ||||
|       </p> | ||||
| 
 | ||||
| </span> | ||||
| 
 | ||||
| @ -0,0 +1,36 @@@@ -0,0 +1,36 @@ | ||||
| <span tal:define="error_class error_class|field.widget.error_class; | ||||
|                      description description|field.description; | ||||
|                      title title|field.title; | ||||
|                      hidden hidden|field.widget.hidden; | ||||
|                      category category|field.widget.category; | ||||
|                      item_template item_template|field.widget.item_readonly_template; | ||||
|                      amount_field field.children[0]; | ||||
|                      currency_field field.children[1]; | ||||
|                      oid oid|amount_field.oid; | ||||
|                      required required|amount_field.required;" | ||||
|          i18n:domain="deform" | ||||
|          class="moneyinput"> | ||||
| 
 | ||||
|     ${field.start_mapping()} | ||||
|     <div tal:repeat="child field.children" | ||||
|          tal:replace="structure child.render_template(item_template)" > | ||||
|     </div> | ||||
|     ${field.end_mapping()} | ||||
| 
 | ||||
|       <p class="help-inline" | ||||
|          tal:define="errstr 'error-%s' % field.oid" | ||||
|          tal:repeat="msg amount_field.error.messages()|currency_field.error.messages()" | ||||
|          i18n:translate="" | ||||
|          tal:attributes="id repeat.msg.index==0 and errstr or | ||||
|          ('%s-%s' % (errstr, repeat.msg.index))" | ||||
|          tal:condition="(amount_field.error or currency_field.error) and not field.widget.hidden"> | ||||
|         ${msg} | ||||
|       </p> | ||||
| 
 | ||||
|       <p tal:condition="field.description and not field.widget.hidden" | ||||
|          class="help-inline" > | ||||
|         ${field.description} | ||||
|       </p> | ||||
| 
 | ||||
| </span> | ||||
| 
 | ||||
| @ -0,0 +1,25 @@@@ -0,0 +1,25 @@ | ||||
| <span tal:define="error_class error_class|field.widget.error_class; | ||||
|                  description description|field.description; | ||||
|                  title title|field.title; | ||||
|                  oid oid|field.oid; | ||||
|                  hidden hidden|field.widget.hidden; | ||||
|                  category category|field.widget.category; | ||||
|                  structural hidden or category == 'structural'; | ||||
|                  required required|field.required;" | ||||
|      class="${field.error and 'error' or ''} ${field.widget.item_css_class or ''} ${field.default_item_css_class()}" | ||||
|      title="${description}" | ||||
|      id="item-${oid}" | ||||
|      tal:omit-tag="structural" | ||||
|      i18n:domain="deform"> | ||||
| 
 | ||||
|       <div tal:define="input_prepend field.widget.input_prepend | None; | ||||
|                        input_append field.widget.input_append  | None" | ||||
|            tal:omit-tag="not (input_prepend or input_append)" | ||||
|            class="input-group"> | ||||
|         <span class="input-group-addon" | ||||
|               tal:condition="input_prepend">${input_prepend}</span | ||||
|         ><span tal:replace="structure field.serialize(cstruct).strip()" | ||||
|         /><span class="input-group-addon" | ||||
|                 tal:condition="input_append">${input_append}</span> | ||||
|       </div> | ||||
| </span> | ||||
| @ -0,0 +1,25 @@@@ -0,0 +1,25 @@ | ||||
| <span tal:define="error_class error_class|field.widget.error_class; | ||||
|                  description description|field.description; | ||||
|                  title title|field.title; | ||||
|                  oid oid|field.oid; | ||||
|                  hidden hidden|field.widget.hidden; | ||||
|                  category category|field.widget.category; | ||||
|                  structural hidden or category == 'structural'; | ||||
|                  required required|field.required;" | ||||
|      class="${field.error and 'error' or ''} ${field.widget.item_css_class or ''} ${field.default_item_css_class()}" | ||||
|      title="${description}" | ||||
|      id="item-${oid}" | ||||
|      tal:omit-tag="structural" | ||||
|      i18n:domain="deform"> | ||||
| 
 | ||||
|       <div tal:define="input_prepend field.widget.input_prepend | None; | ||||
|                        input_append field.widget.input_append  | None" | ||||
|            tal:omit-tag="not (input_prepend or input_append)" | ||||
|            class="input-group"> | ||||
|         <span class="input-group-addon" | ||||
|               tal:condition="input_prepend">${input_prepend}</span | ||||
|         ><span tal:replace="structure field.serialize(cstruct, readonly=True).strip()" | ||||
|         /><span class="input-group-addon" | ||||
|                 tal:condition="input_append">${input_append}</span> | ||||
|       </div> | ||||
| </span> | ||||
		Reference in new issue