Sha256: e8e4eb5c4db71ec9ba74925002ecad97dcc597a7073fa8df72a002c24dda9cb3

Contents?: true

Size: 606 Bytes

Versions: 6

Compression:

Stored size: 606 Bytes

Contents

/* eslint-disable no-var, prefer-template */
(function () {
  var $preview = $("[data-choose-template-preview]");
  var $templateName = $("[data-template-name]");
  var $templateDescription = $("[data-template-description]");

  $templateName.html("<%= translated_attribute @template.name %>");
  $templateDescription.html("<%= translated_attribute @template.description %>");

  $preview.html("<%= j(render partial: "preview", locals: { skip_authenticity_token: true, questionnaire: @questionnaire }) %>");

  var $container = $(".questionnaire-template-preview");
  $container.removeClass("hide");
}());

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-templates-0.29.1 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
decidim-templates-0.29.0 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
decidim-templates-0.29.0.rc4 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
decidim-templates-0.29.0.rc3 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
decidim-templates-0.29.0.rc2 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb
decidim-templates-0.29.0.rc1 app/views/decidim/templates/admin/questionnaire_templates/preview.js.erb