amahi/platform

View on GitHub
app/views/debug/_form.html.slim

Summary

Maintainability
Test Coverage
- message_string = "\n\nExplain the sequence of events leading to the error\nin as much detail as you can.\n\nThe more *concrete detail* you can add,\nthe higher chances we fix the problem quickly!"

= form_for :debug, :remote => true, :html => {\
      :class => 'debug-form form-horizontal',\
      :id => 'submit-debug-form'\
    } do |f|
  .control-group.form-group
    h3.debug-form  Help improve Amahi by sending crash reports and anonymous usage data.
  .control-group
    .controls= f.text_field :subject, :size => 32, :maxlength => 40, :placeholder => "Describe what failed here ...",:class=> "form-control debug-form"
  .control-group.form-group
    .controls
        = text_area_tag :comments, '', :rows => 10, :cols => 80, :placeholder => message_string, :class=> "form-control debug-form"
  .control-group.create-btn.form-group
    .controls
      = spinner
      = button_tag 'Submit', :type => 'submit', :id => 'debug_button', :class => 'btnn btn-submit btn-info btn-sm debug-form', :data=>{:confirm=>"Machine logs will be submitted to Amahi for debug.\nThis will help improve Amahi!\nWould you like to submit?"}
      = link_to t('cancel'), '#', :class => 'btn  btn-primary left-margin-10 btn-sm close-area cancel-link debug-form', :data => {:related=> '#debug-button'}, :onclick=>"$('#debug-submit-form').hide('slow');"