mirror of
https://github.com/Evolix/chexpire.git
synced 2024-05-04 17:55:11 +02:00
Checks form: do not ask for created at anymore
This commit is contained in:
parent
62a53314c5
commit
1179a10775
|
@ -40,7 +40,6 @@ class Check < ApplicationRecord
|
|||
|
||||
validates :kind, presence: true
|
||||
validates :domain, presence: true
|
||||
validates :domain_created_at, presence: true
|
||||
validate :domain_created_at_past
|
||||
validate :domain_updated_at_past
|
||||
validates :comment, length: { maximum: 255 }
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<%= f.input :kind, as: :radio_buttons, collection: Check.kinds.keys if check.new_record? %>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :domain_created_at, as: :date, start_year: 1990, end_year: Date.today.year %>
|
||||
<%= f.input :comment %>
|
||||
<%= f.input :vendor %>
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<div class="mb-4">
|
||||
<div>Domain: <%= check.domain %></div>
|
||||
<div>Kind: <%= check.kind %></div>
|
||||
<div>Date de création: <%= check.domain_created_at.to_date %></div>
|
||||
<div>Created date: <%= l(check.domain_created_at.to_date) if check.domain_created_at.present? %></div>
|
||||
<div>Update date: <%= l(check.domain_updated_at.to_date) if check.domain_updated_at.present? %></div>
|
||||
<div>Expire date: <%= l(check.domain_expire_at.to_date) if check.domain_expire_at.present? %></div>
|
||||
|
||||
<% if check.comment? %>
|
||||
<div>Comment: <%= check.comment %></div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
|
||||
<div class="row mt-5 justify-content-center">
|
||||
<div class="col-12 col-lg-8">
|
||||
<div class="col-12 col-lg-10">
|
||||
<%= button_to("Delete", check_path(@check), class: "btn btn-danger", method: :delete,
|
||||
data: { confirm: "Are you sure ?" }) %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue