html_code_entry_type_image.html
1 <#include "/admin/plugins/announce/commons.html" />
2 <div class="form-group">
3 <label class="control-label col-xs-12 col-sm-12 col-md-3" for="attribute_${entry.idEntry}" id="form${entry.idEntry}">${entry.title}<#if entry.mandatory> *</#if></label>
4 <div class="col-xs-12 col-sm-12 col-md-9">
5 <#if list_responses?? && list_responses?has_content>
6 <#if list_responses?size > 1 >
7 <#assign class = "pirobox_gall">
8 <#else>
9 <#assign class = "pirobox">
10 </#if>
11 <#assign hasImage = false >
12 <#list list_responses as response>
13 <#if response.file?? && response.file.idFile > 0>
14 <#assign hasImage = true >
15 <#break>
16 </#if>
17 </#list>
18 <#if hasImage>
19 <ul id="slideshow">
20 <#list list_responses as response>
21 <#if response.file?? && response.file.idFile > 0>
22 <li>
23 <a class="${class}" title="#i18n{announce.view_announce.imagesCaption}" href="image?resource_type=announce_img&id=${response.idResponse}">
24 <img class="thumbnail" width="80" height="80" src="image?resource_type=announce_img&id=${response.idResponse}" />
25 ${response.toStringValueResponse!}
26 </a>
27 </li>
28 </#if>
29 </#list>
30 </ul>
31 <br><br><br><br><br>
32 </#if>
33 </#if>
34 <#assign field = getFieldValueByCode( entry, "file_config" )>
35 <input type="file" name="attribute_${entry.idEntry}" id="attribute_${entry.idEntry}" size="${field.width}"
36 <#if list_responses??>
37 <#list list_responses as response>
38 <#if response.entry.idEntry == entry.idEntry && response.entry.error??>
39 class="error"
40 </#if>
41 </#list>
42 class="form-control ${entry.CSSClass!}"
43 </#if>
44 />
45 <input type="hidden" name="_announce_upload_maxLength_attribute_${entry.idEntry}" id="_announce_upload_maxLength_attribute_${entry.idEntry}" value="${getFileMaxSize( entry )}">
46 <#if entry.helpMessage?exists&&entry.helpMessage!=''>
47 <span class="help-block">${entry.helpMessage}</span>
48 </#if>
49 <#if list_responses?? && list_responses?has_content>
50 <#assign response_error = list_responses[0]>
51 <#if response_error.entry.idEntry == entry.idEntry && response_error.entry.error??>
52 <div class="alert alert-error">
53 <#assign error = response_error.entry.error>
54 <#if error.mandatoryError>
55 #i18n{announce.message.mandatory.entry}
56 <#else>
57 ${error.errorMessage}
58 </#if>
59 </div>
60 </#if>
61 </#if>
62 <button class="btn btn-primary btn-xs btn-flat" type="submit" id="_announce_upload_submit_attribute_${entry.idEntry}" name="_announce_upload_submit_attribute_${entry.idEntry}" >#i18n{announce.action.send.name}</button>
63 </div>
64 </div>
65
66 <#-- file removing -->
67 <#assign has_files = false>
68 <#if list_responses?? && list_responses?has_content>
69 <#assign response_error = list_responses[0]>
70 <#if response_error.entry.idEntry == entry.idEntry>
71 <#assign has_files = true>
72 </#if>
73 </#if>
74
75 <div class="form-group" <#if !has_files>style="display:none;"</#if> id="_file_deletion_label_attribute_${entry.idEntry}">
76 <label class="control-label col-xs-12 col-sm-12 col-md-3" for="delete_${entry.idEntry}">#i18n{announce.file.uploadedFile}</label>
77 <div class="col-xs-12 col-sm-12 col-md-9" id="_file_deletion_attribute_${entry.idEntry}">
78 <#assign file_index = 0>
79 <#if has_files>
80 <#list list_responses as response>
81 <#if response.file?? && response.file.title?? && response.file.title != ''>
82 <div class="checkbox" >
83 <label for="_announce_upload_checkbox_attribute_${entry.idEntry}${file_index}">
84 <input type="checkbox" name="_announce_upload_checkbox_attribute_${entry.idEntry}${file_index}" value="1" />${response.file.title}
85 </label>
86 <#assign file_index = file_index + 1>
87 </div>
88 </#if>
89 </#list>
90 </#if>
91 </div>
92 <br />
93 <div class="col-xs-12 col-sm-12 col-md-9">
94 <button class="btn btn-primary btn-xs btn-flat" name="_announce_upload_delete_attribute_${entry.idEntry}" type="submit" >#i18n{announce.action.delete.name}</button>
95 </div>
96 </div>