Replace CSS references with inline basics (#43597)

We no longer add a scaffold.css, so we shouldn't depend on it.
This commit is contained in:
David Heinemeier Hansson 2021-11-05 16:47:38 +01:00 committed by GitHub
parent c3758a71af
commit 5257da7bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<%%= form_with(model: <%= model_resource_name %>) do |form| %>
<%% if <%= singular_table_name %>.errors.any? %>
<div id="error_explanation">
<div style="color: red">
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
<ul>
@ -12,26 +12,26 @@
<%% end %>
<% attributes.each do |attribute| -%>
<div class="field">
<div>
<% if attribute.password_digest? -%>
<%%= form.label :password %>
<%%= form.label :password, style: "display: block" %>
<%%= form.password_field :password %>
</div>
<div class="field">
<%%= form.label :password_confirmation %>
<div>
<%%= form.label :password_confirmation, style: "display: block" %>
<%%= form.password_field :password_confirmation %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %>
<% end -%>
</div>
<% end -%>
<div class="actions">
<div>
<%%= form.submit %>
</div>
<%% end %>

View File

@ -1,4 +1,4 @@
<p id="notice"><%%= notice %></p>
<p style="color: green"><%%= notice %></p>
<h1><%= human_name.pluralize %></h1>

View File

@ -1,4 +1,4 @@
<div id="<%%= dom_id <%= singular_table_name %> %>" class="scaffold_record">
<div id="<%%= dom_id <%= singular_table_name %> %>">
<% attributes.reject(&:password_digest?).each do |attribute| -%>
<p>
<strong><%= attribute.human_name %>:</strong>

View File

@ -1,4 +1,4 @@
<p id="notice"><%%= notice %></p>
<p style="color: green"><%%= notice %></p>
<%%= render @<%= singular_table_name %> %>