Sha256: a5af785098049b99c2687abbd0e75407f189768f782be92a25bee7da4b109b98

Contents?: true

Size: 897 Bytes

Versions: 25

Compression:

Stored size: 897 Bytes

Contents

<%= f.label a, class: "form-control-label #{required?(f.object, a) ? 'required' : ''}"%>
<%= render 'slash_admin/shared/tooltip', a: a %>
<%= f.text_area a, class: "form-control #{'jsonarea_' + f.object.class.to_s + '_' + a.to_s}", required: required?(f.object, a), value: f.object.send(a).to_json  %>

<script src="https://rawgithub.com/zaach/jsonlint/79b553fb65c192add9066da64043458981b3972b/lib/jsonlint.js"></script>
<script type="text/javascript">
  var jsonarea_<%= f.object.class.to_s + '_' + a.to_s %> = document.getElementsByClassName("jsonarea_<%= f.object.class.to_s + '_' + a.to_s %>")[0];
  var editor_jsonarea_<%= f.object.class.to_s + '_' + a.to_s %> = CodeMirror.fromTextArea(jsonarea_<%= f.object.class.to_s + '_' + a.to_s %>, {
    lineNumbers: true,
    theme: 'relax-seti',
    mode: "application/json",
    gutters: ["CodeMirror-lint-markers"],
    lint: true
  });
</script>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
slash_admin-1.5.11 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.10 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.9 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.8 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.7 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.6 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.5 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.4 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.3 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.2 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5.1 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.5 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.4.1 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.4 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.5 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.4 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.3 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.2 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.1 app/views/slash_admin/fields/_jsonb.html.erb
slash_admin-1.3.0 app/views/slash_admin/fields/_jsonb.html.erb