refactor: relocate super manager apply_change button to form-actions with notice text

This commit is contained in:
rulingcom 2026-07-24 15:57:51 +08:00
parent a2af91f97e
commit f75bd8bbf0
3 changed files with 25 additions and 9 deletions

View File

@ -5,12 +5,6 @@
%>
<div id="<%=type%>">
<!-- Add -->
<div>
<% if f.object.super_user_changed %>
<a href="javascript:void(0)" class="btn btn-success apply_change_users" data-id="<%=f.object.id%>" data-is-server="<%=f.object.class == SiteServer%>"><%= t('client_management.apply_change') %></a>
<hr>
<% end %>
</div>
<div class="add-target">
<% records.each do |record| %>
<%= f.fields_for relation_field, record do |f| %>
@ -82,4 +76,4 @@
})
})
</script>
</script>

View File

@ -12,6 +12,17 @@
<%= render :partial => "super_manager_form", :locals=>{:f=>f,:type=>"site_super_user"} %>
<div class="form-actions">
<%= f.submit t('submit'), class: 'btn btn-primary' %>
<% if f.object.super_user_changed %>
<span style="margin: 0 8px; color: #ccc;">|</span>
<a href="javascript:void(0)" class="btn btn-success apply_change_users" data-id="<%=f.object.id%>" data-is-server="<%=f.object.class == SiteServer%>">
<%= t('client_management.apply_change') %>
</a>
<!-- 醒目的提醒區塊 -->
<div class="alert alert-warning" style="margin-top: 15px; margin-bottom: 0; padding: 10px; border-left: 5px solid #f0ad4e;">
<strong>⚠️ 提示:</strong> 管理員資料已更新,請務必點擊旁邊綠色的「<strong><%= t('client_management.apply_change') %></strong>」按鈕,設定才會正式同步至該伺服器下的網站!
</div>
<% end %>
</div>
</div>
</fieldset>
@ -105,4 +116,4 @@
});
})
</script>
<% end %>
<% end %>

View File

@ -12,6 +12,17 @@
<%= render :partial => "super_manager_form", :locals=>{:f=>f,:type=>"site_super_user"} %>
<div class="form-actions">
<%= f.submit t('submit'), class: 'btn btn-primary' %>
<% if f.object.super_user_changed %>
<span style="margin: 0 8px; color: #ccc;">|</span>
<a href="javascript:void(0)" class="btn btn-success apply_change_users" data-id="<%=f.object.id%>" data-is-server="<%=f.object.class == SiteServer%>">
<%= t('client_management.apply_change') %>
</a>
<!-- 醒目的提醒區塊 -->
<div class="alert alert-warning" style="margin-top: 15px; margin-bottom: 0; padding: 10px; border-left: 5px solid #f0ad4e;">
<strong>⚠️ 提示:</strong> 管理員資料已更新,請務必點擊旁邊綠色的「<strong><%= t('client_management.apply_change') %></strong>」按鈕,設定才會正式同步至該網站!
</div>
<% end %>
</div>
</div>
</fieldset>
@ -121,4 +132,4 @@
});
})
</script>
<% end %>
<% end %>