Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Sat, Mar 21, 6:47 PM
diff --git a/app/views/hosts/_form.html.erb b/app/views/hosts/_form.html.erb
index 3641f29..8628806 100644
--- a/app/views/hosts/_form.html.erb
+++ b/app/views/hosts/_form.html.erb
@@ -1,42 +1,45 @@
<%= bootstrap_form_for(@host, layout: :horizontal,
label_col: 'col-xs-3', control_col: 'col-xs-8') do |f| %>
+ <p class="col-xs-10 col-xs-offset-1 help-block text-right">
+ FQDN should have a valid DNS A record
+ </p>
<% if current_user.needs_host_list? %>
- <%= f.select :fqdn, options_for_select(@hosts_of_user, @host.fqdn), {},
+ <%= f.select :fqdn, options_for_select(@hosts_of_user, @host.fqdn), { label: 'FQDN' },
disabled: @host.persisted? %>
<% else %>
- <%= f.text_field :fqdn, disabled: @host.persisted? %>
+ <%= f.text_field :fqdn, label: 'FQDN', disabled: @host.persisted? %>
<% end %>
<% if @host.persisted? %>
<%= f.number_field :port, min: 1 %>
<% end %>
<% emails = (@host.users.pluck(:email) + @host.email_recipients).uniq.select(&:present?) %>
<%= f.select :email_recipients, options_for_select(emails, @host.email_recipients), {},
multiple: true %>
<div class="form-group">
<div class="col-xs-2 col-xs-offset-2">
<%= link_to @host.persisted? ? host_path(@host) : clients_path,
class: 'btn btn-default' do %>
<label class="glyphicon glyphicon-edit text-danger"></label>
Cancel
<% end %>
</div>
<div class="col-xs-4">
<% if @host.persisted? %>
<%= link_to regenerate_token_host_path(@host), method: :post,
class: 'btn btn-default',
data: { confirm: 'Are you sure you want to regenrate the server token' } do %>
<label class="glyphicon glyphicon-leaf"></label>
Regenerate Token
<% end %>
<% end %>
</div>
<div class="col-xs-4">
<%= f.submit 'Submit', class: 'btn btn-success' %>
</div>
</div>
<% end %>

Event Timeline