adds notice with html after spending proposal creation
This commit is contained in:
@@ -5,6 +5,7 @@ class SpendingProposalsController < ApplicationController
|
||||
|
||||
before_action :authenticate_user!, except: [:index]
|
||||
before_action :verify_access, only: [:show]
|
||||
before_filter -> { flash.now[:notice] = flash[:notice].html_safe if flash[:html_safe] && flash[:notice] }
|
||||
|
||||
feature_flag :spending_proposals
|
||||
|
||||
@@ -20,7 +21,8 @@ class SpendingProposalsController < ApplicationController
|
||||
@spending_proposal.author = current_user
|
||||
|
||||
if @spending_proposal.save_with_captcha
|
||||
redirect_to @spending_proposal, notice: t("flash.actions.create.spending_proposal")
|
||||
notice = t('flash.actions.create.spending_proposal', activity: "<a href='#{user_path(current_user, filter: :spending_proposals)}'>#{t('layouts.header.my_activity_link')}</a>"), flash: { html_safe: true }
|
||||
redirect_to @spending_proposal, notice: notice
|
||||
else
|
||||
render :new
|
||||
end
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<![endif]-->
|
||||
|
||||
<% if notice %>
|
||||
<div class="alert-messages">
|
||||
<div id="notice" class="alert-messages">
|
||||
<div class="row">
|
||||
<div data-alert class="alert-box success radius">
|
||||
<a href="#" class="close" title="<%= t("application.close") %>">×</a>
|
||||
@@ -52,7 +52,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if alert %>
|
||||
<div class="alert-messages">
|
||||
<div id="alert" class="alert-messages">
|
||||
<div class="row">
|
||||
<div data-alert class="alert-box alert radius">
|
||||
<a href="#" class="close" title="<%= t("application.close") %>">×</a>
|
||||
|
||||
Reference in New Issue
Block a user