app/views/media_resources/edit/fields/_meta_datum_date.html.haml

Summary

Maintainability
Test Coverage
.col1of3
  .mrs
    %select.block
      %option{:"data-input" => ".input-free"}
        = _("Free entry")
      %option{:"data-input" => ".input-on"}
        = _("on")
      %option{:"data-input" => ".input-from-to"}
        = _("from/to")

.form-date.input-free
  .col2of3
    %input.block.value-target.input-free{:type => "text", :id => "resource[meta_data_attributes][#{@i}][value]", :name => "resource[meta_data_attributes][#{@i}][value]", :value => meta_datum.nil? ? nil : meta_datum.value, :placeholder => _("will be saved as text")}

.form-date.input-from-to.hidden
  .col1of3
    .mrx
      %input.block.ui-datepicker.input-from{:type => "text", :placeholder => _("from")}
  .col1of3
    .mlx
      %input.block.ui-datepicker.input-to{:type => "text", :placeholder => _("to")}

.form-date.input-on.hidden
  .col2of3
    %input.block.ui-datepicker.input-on{:type => "text", :placeholder => _("on")}