- unless defined? required - required = false - if !(defined? id) || id.blank? - id = "#{name}_#{rand(1000)}" - unless defined? placeholder - placeholder = "..." -unless defined? onkeyup -onkeyup = '' -unless defined? readonly -readonly = false - unless defined? clazz - clazz = nil -if required .form-group.has-feedback.has-success label #{title} .fg-line -if readonly input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" readonly='' -else input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" -else .form-group label #{title} .fg-line -if readonly input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" readonly='' -else input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}"