client_management/app/views/client_managements/new_ticket.html.erb

40 lines
2.2 KiB
Plaintext

<% content_for :page_menu do %>
<ul class="list-sidebar">
<li class="item-sidebar"><a class="btn-sidebar" href="<%= sites_path %>"><i class="fa fa-home" aria-hidden="true"></i><%= t("client_management.my_sites") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="/cpanel/site/<%= @site_construct.uid %>"><i class="fa fa-envelope" aria-hidden="true"></i><%= t("client_management.tickets") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="<%= cpanel_add_new_site_path(:site => @site_construct.id) %>"><i class="fa fa-server" aria-hidden="true"></i><%= t("client_management.services") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="#"><i class="fa fa fa-credit-card-alt" aria-hidden="true"></i><%= t("client_management.payments") %></a></li>
</ul>
<% end %>
<section class="cp-content col-md-10">
<h2 class="cp-page-title">
<%= t("client_management.new_ticket") %>
</h2>
<%= form_for @ticket, :url => {:action => "create_ticket"}, :html => {:class => "form-inline"} do |f| %>
<div class="cp-function-box">
<div class="form-group">
<%= f.label :subject, t("client_management.ticket_subject") + ":" %>
<%= f.text_field :subject, :placeholder => "Ticket Subject", :class => "form-control" %>
</div>
<div class="form-group pull-right">
<%= f.label :category_id, t("client_management.ticket_type") + ":" %>
<%= f.select :category_id, @categories, {:prompt => "Please select"},{:class => "form-control"} %>
</div>
</div>
<div class="cp-function-box">
<% new_object = f.object.send("ticket_queries").build rescue nil %>
<%= f.fields_for :ticket_queries, new_object do |tq| %>
<div><%= tq.label :query, t("client_management.query") + ":" %></div>
<%= tq.cktext_area :query %>
<% end %>
</div>
<div class="cp-function-box">
<%= f.hidden_field :ticket_creater_cpanel_id, :value => current_cpanel_user.email %>
<%= f.hidden_field :site_type, :value => "orbit" %>
<%= f.hidden_field :status, :value => "open" %>
<%= f.hidden_field :registered_site, :value => @site_construct.id %>
<%= f.submit "Submit", :class => "btn btn-primary" %>
</div>
<% end %>
</section>