summaryrefslogtreecommitdiff
path: root/views/predict.haml
blob: d8c34a281840012752b22fee14a8443fd6144711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
:javascript
  function getsmiles() {
    if (document.JME.smiles() != '') {
      document.form.identifier.value = document.JME.smiles() ;
    }
  }

.input
  %p Use this service to obtain predictions from OpenTox models.
  - unless @models.empty?

    %form{:name => "form", :action => url_for('/predict'), :method => "post", :enctype => "multipart/form-data" }
      %fieldset
        %legend Draw a compound
        %label  
        .jme
          %applet{:code => "JME.class",  :name => "JME", :archive => "JME.jar", :width => "500", :height => "360"}
            %param{ :name => "options", :value => "polarnitro"}
            Please enable Java and JavaScript in your browser to use the JME editor. 

        %label{:for => 'identifier'} or enter a Name, InChI, Smiles, CAS, ...
        %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
      %fieldset
        %legend
          Choose one or more prediction models
        - @models.each do |model|
          %label{:for => "model#{model.id}"}
            = model.name
          -#%input{:type => 'checkbox', :name => "selection[#{model.id}]", :value => true, :id => model.id, :disabled => !is_authorized(model.uri, "GET")} 
          %input{:type => 'checkbox', :name => "selection[#{model.id}]", :value => true, :id => "model#{model.id}", :disabled => false} 
          %br

      %input{:type => 'hidden', :name => 'subjectid', :id => 'subjectid', :value => session[:subjectid]}
      %input{ :type => "submit", :value => "Predict", :onclick => "getsmiles();"}
      = link_to 'Cancel', '/predict'