Created
December 13, 2017 13:00
-
-
Save sirramongabriel/0998b32e586e4848c66c80748e0185ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="nested-fields"> | |
| <%= f.hidden_field :medical_record_form_id, value: params[:id] %> | |
| <div class="row"> | |
| <div class="col-sm-6 col-md-3 pad-btm bord-all"> | |
| <%= f.label :name, "<span class='text text-semibold'>Medication name:</span>".html_safe, class: "control-label mar-lft" %><br> | |
| <div class="mar-lft"> | |
| <%= f.text_field :name, hide_label: true, class: "form-control" %> | |
| </div> | |
| <% if @medical_record_form.errors.include? :name %> | |
| <div class="pad-top"> | |
| <span class="text-danger"> | |
| <%= medication.errors.full_message(:name, "is required") %> | |
| </span> | |
| </div> | |
| <% end %> | |
| </div><!--END .col-sm-6 .col-md-3--> | |
| <div class="col-sm-6 col-md-3 pad-btm bord-all"> | |
| <%= f.label :dosage, "<span class='text text-semibold'>Dosage:</span>".html_safe, class: "control-label mar-lft" %><br> | |
| <div class="mar-lft"> | |
| <%= f.text_field :dosage, hide_label: true, class: "form-control" %> | |
| </div> | |
| <% if @medical_record_form.errors.include? :dosage %> | |
| <div class="pad-top"> | |
| <span class="text-danger"> | |
| <%= @medical_record_form.errors.full_message(:dosage, "is required") %> | |
| </span> | |
| </div> | |
| <% end %> | |
| </div><!--END .col-sm-6 .col-md-3--> | |
| <div class="col-sm-6 col-md-3 pad-btm bord-all"> | |
| <%= f.label :time_taken, "<span class='text text-semibold'>Time taken:</span>".html_safe, class: "control-label mar-lft" %><br> | |
| <div class="mar-lft"> | |
| <%= f.time_select(:time_taken, options = { hide_label: true, prompt: { hour: 'Hour', minute: "Minute" }, ampm: true, minute_step: 15 }, html_options = { class: "mar-btm" }) %> | |
| <% if @medical_record_form.errors.include? :time_taken %> | |
| <div class="pad-top"> | |
| <span class="text-danger"> | |
| <%= @medical_record_form.errors.full_message(:time_taken, "is required") %> | |
| </span> | |
| </div> | |
| <% end %> | |
| </div> | |
| </div><!--END .col-sm-6 .col-md-3--> | |
| <div class="col-sm-6 col-md-3 pad-btm bord-all"> | |
| <%= f.label :usage_type, "<span class='text text-semibold'>Medication type:</span>".html_safe, class: "control-label mar-lft" %><br> | |
| <div class="mar-top mar-lft"> | |
| <%= f.select :usage_type, options_for_select(['Scheduled', 'PRN'], f.object.usage_type), hide_label: true, class: "" %> | |
| </div><!--END .mar-top .mar-lft--> | |
| </div><!--END .col-sm-6 .col-md-3--> | |
| </div><!--END .row--> | |
| <div class="row"> | |
| <div class="col-sm-6 col-md-12 pad-all bord-all"> | |
| <%= link_to_remove_association "remove medication", f, class: "btn btn-sm btn-icon btn-danger btn-labeled fa fa-minus" %> | |
| </div><!--END .col-sm-6 .col-md-12--> | |
| </div><!--END .row--> | |
| </div><!--END .nested-fields--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment