This commit is contained in:
Daniel Schmitz
2021-07-07 13:26:15 +08:00
parent dfbb4127e2
commit 518ec202ab
13 changed files with 137 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
$header
<form method="post" action="$filename" enctype="application/x-www-form-urlencoded">
<form method="post" action="$filename" enctype="multipart/form-data">
<input type="hidden" name="send" value="send" />
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />

View File

@@ -1745,3 +1745,9 @@ td.size-50 {
.footer-link:last-child:after {
content: "";
}
.field-image-preview {
max-width: 300px;
max-height: 500px;
margin-bottom: 10px;
}

11
templates/Sparkle/formfields/image.tpl vendored Normal file
View File

@@ -0,0 +1,11 @@
<tr>
<td>{$label}</td>
<td>
<if $value>
<img src="/{$value}" alt="Current Image" class="field-image-preview"><br>
<input type="checkbox" value="1" name="{$fieldname}_delete" /> {$lng['panel']['image_field_delete']}
<br><br>
</if>
<input <if $do_show == 0>disabled="disabled"</if> type="file" class="file" name="{$fieldname}" accept=".jpg, .jpeg, .png" />
</td>
</tr>