George S. Baugh пре 5 година
родитељ
комит
5e57f41209
2 измењених фајлова са 5 додато и 2 уклоњено
  1. 1 1
      lib/Trog/Data/DUMMY.pm
  2. 4 1
      www/templates/profile.tx

+ 1 - 1
lib/Trog/Data/DUMMY.pm

@@ -226,7 +226,7 @@ sub _process ($post) {
 
     $post->{href}      = _handle_upload($post->{file}, $post->{id})         if $post->{file};
     $post->{preview}   = _handle_upload($post->{preview_file}, $post->{id}) if $post->{preview_file};
-    $post->{wallpaper} = _handle_upload($post->{wallpaper}, $post->{id})    if $post->{wallpaper};
+    $post->{wallpaper} = _handle_upload($post->{wallpaper_file}, $post->{id})    if $post->{wallpaper_file};
     $post->{preview} = $post->{href} if $post->{app} eq 'image';
     delete $post->{app};
     delete $post->{file};

+ 4 - 1
www/templates/profile.tx

@@ -5,7 +5,10 @@
     : if ( $post.preview ) {
     <input type="hidden" name="preview" value="<: $post.preview :>" />
     : }
-    Wallpaper<br /><input type="file" class="cooltext" name="wallpaper" placeholder="PROMO.JPG" value="<: $post.background_image :>" />
+    Wallpaper<br /><input type="file" class="cooltext" name="wallpaper_file" placeholder="PROMO.JPG" />
+    : if ( $post.wallpaper ) {
+    <input type="hidden" name="wallpaper" value="<: $post.wallpaper :>" />
+    : }
     Title  <br /><input class="cooltext" type="text" name="title" value="<: $post.title :>" />
     : include "acls.tx";
     : include "tags.tx";