lib/rails/generators/humdrum/resource/templates/views/bootstrap3/resource/_field.html.erb in humdrum-rails-0.1.1 vs lib/rails/generators/humdrum/resource/templates/views/bootstrap3/resource/_field.html.erb in humdrum-rails-0.1.2

- old
+ new

@@ -1,6 +1,6 @@ -<%% +<%% unless defined?(required) required = false end unless defined?(place_holder) place_holder = "" @@ -8,39 +8,39 @@ inp_id = "inp_#{display_name.underscore.split(" ").join("_")}" error_class = object.errors[field_name.to_s].any? ? "has-errors" : "" %> <div class="form-group <%%= error_class %>"> - + <%% if ["text", "email", "search", "password", "date", "time", "tel", "url", "month", "file", "image", ""].include?(input_type) %> - + <label for="inp_<%%= display_name.underscore.split(" ").join("_") %>" class="col-md-4 control-label"> <%%= display_name %> - <span class="text-color-red margin-left-10 margin-right-5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> + <span class="text-color-red ml-10 mr--5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> </label> <div class="col-md-8"> <input name="<%%= object_name %>[<%%= field_name %>]" id="inp_<%%= display_name.underscore.split(" ").join("_") %>" class="text input form-control" type="<%%= input_type %>" placeholder="<%%= place_holder %>" value="<%%= object.send(field_name.to_s) %>" /> </div> - + <%% elsif input_type == "checkbox" %> - + <label for="inp_<%%= display_name.underscore.split(" ").join("_") %>" class="col-md-4 control-label"> <%%= display_name %> - <span class="text-color-red margin-left-10 margin-right-5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> + <span class="text-color-red ml-10 mr--5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> </label> <div class="col-md-8"> <input name="<%%= object_name %>[<%%= field_name %>]" id="inp_<%%= display_name.underscore.split(" ").join("_") %>" type="<%%= input_type %>" class="checkbox input form-control" <%%= object.send(field_name.to_s) ? "checked='checked'" : "" %> /> </div> - + <%% elsif input_type == "textarea" %> - + <label for="inp_<%%= display_name.underscore.split(" ").join("_") %>" class="col-md-4 control-label"> <%%= display_name %> - <span class="text-color-red margin-left-10 margin-right-5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> + <span class="text-color-red ml-10 mr--5 pull-right"><%%= required ? "*" : raw("&nbsp;&nbsp;") %></span> </label> <div class="col-md-8"> <textarea name="<%%= object_name %>[<%%= field_name %>]" style="height:200px;" class="textarea input form-control" id="inp_<%%= display_name.underscore.split(" ").join("_") %> placeholder="<%%= place_holder %>" "><%%= object.send(field_name.to_s) %></textarea> </div> - + <%% end %> - + </div> \ No newline at end of file