This commit is contained in:
BoHung Chiu 2022-10-22 16:18:08 +08:00
parent c66ea020de
commit 1aebaa47c0
2 changed files with 2 additions and 3 deletions

View File

@ -472,7 +472,7 @@ class Admin::AnnouncementsController < OrbitAdminController
end end
end end
if request.xhr? if request.xhr?
render :nothing => true, :status => 204 render :body => nil, :status => 204
else else
redirect_to admin_announcements_path redirect_to admin_announcements_path
end end

View File

@ -2,7 +2,6 @@
<% @params = @index_controller.instance_variable_get(:@params) rescue {} <% @params = @index_controller.instance_variable_get(:@params) rescue {}
@enable_search_flag = @index_controller.instance_variable_get(:@enable_search_flag) rescue false @enable_search_flag = @index_controller.instance_variable_get(:@enable_search_flag) rescue false
%> %>
<% if @enable_search_flag %> <% if @enable_search_flag %>
<style type="text/css"> <style type="text/css">
#category_select_box{ #category_select_box{
@ -65,7 +64,7 @@
<input class="search_box" type="text" name="etime" value="<%= @params['etime'].to_s.gsub(/\"/,'') %>" placeholder="<%= t('announcement.etime') %>" data-format="yyyy/mm/dd"> <input class="search_box" type="text" name="etime" value="<%= @params['etime'].to_s.gsub(/\"/,'') %>" placeholder="<%= t('announcement.etime') %>" data-format="yyyy/mm/dd">
</div> </div>
</div> </div>
<input type="hidden" name="authenticity_token" value="<%= (0...46).map { ('a'..'z').to_a[rand(26)] }.join %>"> <input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
<input class="search_box" type="submit" value="<%= t('announcement.search') %>"> <input class="search_box" type="submit" value="<%= t('announcement.search') %>">
</div> </div>
</form> </form>