From 8ee92e34aa0f25dff02cd24ecb7a84863cb041f1 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 17 Sep 2016 23:35:59 +0200 Subject: [PATCH] Fix duplicate flash message on mobile profile edit closes #7107 --- Changelog.md | 1 + app/views/profiles/_edit_public.haml | 8 -------- app/views/profiles/edit.mobile.haml | 6 +++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index a2a5caa55..84c353f08 100644 --- a/Changelog.md +++ b/Changelog.md @@ -21,6 +21,7 @@ * Prevent overflow of interaction avatars in the single post view [#7070](https://github.com/diaspora/diaspora/pull/7070) * Fix moving publisher on first click after page load [#7094](https://github.com/diaspora/diaspora/pull/7094) * Fix link to comment on report page [#7105](https://github.com/diaspora/diaspora/pull/7105) +* Fix duplicate flash message on mobile profile edit [#7107](https://github.com/diaspora/diaspora/pull/7107) ## Features * Deleted comments will be removed when loading more comments [#7045](https://github.com/diaspora/diaspora/pull/7045) diff --git a/app/views/profiles/_edit_public.haml b/app/views/profiles/_edit_public.haml index f2a14d47d..74411cae7 100644 --- a/app/views/profiles/_edit_public.haml +++ b/app/views/profiles/_edit_public.haml @@ -28,14 +28,6 @@ }); }); -- if mobile - .stream - - flash.each do |name, msg| - %div{:id => "flash_#{name}", :class => "expose"} - .message= msg - .stream - %p{:class => "conversation_#{name}"}= msg - %h3.inline = t("profiles.edit.basic") %span{ :title => t("profiles.edit.basic_hint") } diff --git a/app/views/profiles/edit.mobile.haml b/app/views/profiles/edit.mobile.haml index 333985f7a..608b9a8c0 100644 --- a/app/views/profiles/edit.mobile.haml +++ b/app/views/profiles/edit.mobile.haml @@ -13,6 +13,10 @@ = link_to t("cancel"), local_or_remote_person_path(current_user.person), class: "btn btn-default" = submit_tag t(".update_profile"), class: "btn btn-primary pull-right", id: "update_profile" + - flash.each do |name, msg| + .alert{class: "alert-#{flash_class name}", role: "alert"} + = msg + = form_tag profile_path, method: :put, multipart: true, id: "update_profile_form" do - = render "edit_public", profile: @profile, aspect: @aspect, person: @person, mobile: true + = render "edit_public", profile: @profile, aspect: @aspect, person: @person = render "edit_private", person: @person, profile: @profile, aspect: @aspect, step: @step