83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
<% ask = data['ask_question'] %>
|
|
<style type="text/css">
|
|
.ask-question .form-horizontal .control-group > *{
|
|
font-size: 1.125em;
|
|
}
|
|
.default_picker label{
|
|
display: none;
|
|
}
|
|
.ask-question .control-group{
|
|
flex-wrap: wrap;
|
|
display: flex;
|
|
width: 100%;
|
|
align-items: center;
|
|
}
|
|
.ask-question .controls > *{
|
|
display: block;
|
|
}
|
|
.ask-question .controls > script{
|
|
display: none;
|
|
}
|
|
.ask-question .form-horizontal .control-label{
|
|
width: 24%;
|
|
max-width: 15em;
|
|
min-width: 14em;
|
|
padding: 0;
|
|
text-align: center;
|
|
}
|
|
.ask-question .form-horizontal .control-group .controls{
|
|
margin: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
overflow: hidden;
|
|
position: relative;
|
|
min-width: 10em;
|
|
max-width: 20em;
|
|
padding-left: 0;
|
|
width: 70%;
|
|
padding: 0.5em;
|
|
justify-content: center;
|
|
}
|
|
.ask-question .form-horizontal input[type="text"],.ask-question .form-horizontal select{
|
|
width: 97%;
|
|
max-width: 13.75em;
|
|
}
|
|
.ask-question .form-horizontal .form-actions{
|
|
position: relative;
|
|
padding: 1em 0 0 0;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
<%= stylesheet_link_tag "custom_field" %>
|
|
<link href="/assets/ask/ask.css" media="screen" rel="stylesheet">
|
|
<div class="ask-question">
|
|
<div class="form-horizontal">
|
|
<div class="control-group">
|
|
<%= label_tag nil,t('category'), :class=> 'control-label' %>
|
|
<div class="controls">
|
|
<%= label_tag nil,(ask.category.title rescue nil), class: 'control-label' %>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<%= label_tag nil,t('title'), :class=> 'control-label' %>
|
|
<div class="controls">
|
|
<%= label_tag nil,ask.title, :class=> 'control-label' %>
|
|
</div>
|
|
</div>
|
|
<%= ask_setting.custom_fields.collect do |k,v|
|
|
required_pattern = v['required']=='true' ? '*' : ''
|
|
"<div class=\"control-group\">
|
|
<label class=\"control-label\">#{required_pattern}#{v['field'][I18n.locale]}</label>
|
|
<div class=\"controls\">
|
|
#{show_on_front(k,v,ask,true)}
|
|
</div>
|
|
</div>"
|
|
end.join.html_safe %>
|
|
<div class="control-group">
|
|
<%= label_tag nil,t('mongoid.attributes.ask_question.reply'), :class=> 'control-label' %>
|
|
<div class="controls">
|
|
<%= ask.reply %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |