<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <% end %> <% content_for :page_specific_javascript do %> <% end %> <%#= f.error_messages %>
<% copy_source = SiteConstruct.find(params[:copy_id]) rescue nil %> <% if copy_source %>
<%= f.hidden_field :copy_id, :value => params[:copy_id] %>
<%= f.check_box :only_copy_installed_module %>
<%= f.hidden_field :copy_id, :value => params[:copy_id] %>
<% end %>
<%= f.label :server_type ,"Server", :class => "control-label muted" %>
<%= f.select :server_type, SiteConstruct.server_types %>
<%= f.label :root_domain ,"Root Domain", :class => "control-label muted" %>
<%= select_tag :root_domain, options_for_select((SiteServer.first.domain_names.collect{ |u| [u, u] } rescue [])), :class => "root_domain" %>
<%= button_tag 'add root domain',:type => 'button', :id => 'add_root_domain',class: 'btn btn-info',:style => 'margin-top: 1em;' %>
<%= f.label :site_type ,"Site Type", :class => "control-label muted" %>
<%= f.select :site_type, SiteConstruct::SITE_TYPES, :id => "site_type" %>
<%= f.label :school_name ,"School Name", :class => "control-label muted" %>
<%= f.text_field :school_name, :id => "school_name", :placeholder => "XXXX" %>
Eg: NCTU
<%= f.label :site_name ,"Site Name", :class => "control-label muted" %>
<%= f.text_field :site_name, :id => "site_name", :placeholder => "xxx_xxx", :oninput=> "replace_input(this)" %>
schoolname_deptname eg: nctu_eed
<%= f.label :domain_name ,"Domain Name", :class => "control-label muted", :oninput=> "replace_input(this)" %>
<%= SiteServer.first.domain_names[0] rescue nil %> <%= hidden_field_tag nil,nil, :class => "domain_name",:id=>nil %>
<%= f.hidden_field :domain_name %>
<%= f.label :db_name ,"Database Name", :class => "control-label muted" %>
<%= f.text_field :db_name, :id => "db_name" %>
schoolname_deptname eg: nctu_eed
<%= f.label :port ,"Port Number", :class => "control-label muted" %>
<%= number_field_tag("#{f.object_name}[port][]",f.object.port.first, :min => 1, :id => nil) %>
<%= f.label :path ,"Path", :class => "control-label muted" %>
<%= f.text_field :path, :disabled => true, :id => "path" %>
<%= f.submit t('submit'), class: 'btn btn-primary' %>