diff --git a/app/views/plans/_form_v2.html.erb b/app/views/plans/_form_v2.html.erb
index dea6d9a..d2c1ff8 100644
--- a/app/views/plans/_form_v2.html.erb
+++ b/app/views/plans/_form_v2.html.erb
@@ -22,7 +22,9 @@
<%= d_('dmpopidor', 'Choose a template') %>
- <%= d_('dmpopidor', 'You can either choose a template provided by your organisation, another organisation or a funder template.') %>
+ <%= d_('dmpopidor', 'You can either choose a template provided by your organisation, another organisation or a funder template. The default template is "%{template_name}".') % {
+ :template_name => @default_template.title
+ } %>
<%= link_to d_('dmpopidor', 'Find the list of the available templates'), public_templates_path, :target => "_blank" %>
@@ -49,13 +51,6 @@
-
- <%= d_('dmpopidor', 'Would you like to use the default template "%{template_name}"?') % {
- :template_name => @default_template.title
- } %>
-
- <%= direct_link(@default_template, false, d_('dmpopidor', 'Use Default Template')) %>
-
<% if @default_org %>
<%= hidden_field_tag('own_org_name', @default_org.name) %>
<%= hidden_field_tag('own_org_id', @default_org.id) %>
@@ -124,7 +119,7 @@
-
<%= d_('dmpopidor', "No template available, would you like to create a plan using the default \"__template_title__\" template?") %>
+ <%= d_('dmpopidor', "No template available.") %>
@@ -138,9 +133,9 @@
- <%= f.button(_('Yes'), class: "btn btn-primary", type: "submit") %>
- <%= link_to _('No'), '', class: 'btn btn-primary', id: 'no-btn' %>
- <%= direct_link(@default_template, true, d_('dmpopidor', 'Use Default Template'), 'end-default-btn') %>
+ <%= f.button(_('Create a plan'), class: "btn btn-primary", id: 'create-btn', type: "submit") %>
+ <%= link_to _('Next'), '', class: 'btn btn-primary', id: 'next-btn' %>
+ <%= direct_link(@default_template, false, d_('dmpopidor', 'Use Default Template'), 'end-default-btn') %>
diff --git a/config/locale/dmpopidor.pot b/config/locale/dmpopidor.pot
index e6d8bca..a28cf72 100644
--- a/config/locale/dmpopidor.pot
+++ b/config/locale/dmpopidor.pot
@@ -189,7 +189,7 @@
msgid "The template \"__template_title__\" is available. Would you like to create a plan from this template?"
msgstr ""
-msgid "No template available, Would you like to create a plan using the default \"__template_title__\" template?"
+msgid "No template available."
msgstr ""
msgid "You are not linked to an organisation, we can\'t suggest you a template. Please choose an organisation in your profile"
@@ -219,7 +219,7 @@
msgid "This plan is based on the %{org_name}: %{template_name} template"
msgstr ""
-msgid "You can either choose a template provided by your organisation, another organisation or a funder template."
+msgid "You can either choose a template provided by your organisation, another organisation or a funder template. The default template is \"%{template_name}\"."
msgstr ""
msgid "Successfully changed the permissions for %{user_email}. They have been notified via email."
diff --git a/config/locale/en_GB/dmpopidor.po b/config/locale/en_GB/dmpopidor.po
index 91579d5..d06e217 100644
--- a/config/locale/en_GB/dmpopidor.po
+++ b/config/locale/en_GB/dmpopidor.po
@@ -187,8 +187,8 @@
msgid "The template \"__template_title__\" is available. Would you like to create a plan from this template?"
msgstr "The template \"__template_title__\" is available. Would you like to create a plan from this template?"
-msgid "No template available, would you like to create a plan using the default \"__template_title__\" template?"
-msgstr "No template available, would you like to create a plan using the default \"__template_title__\" template?"
+msgid "No template available."
+msgstr "No template available."
msgid "You are not linked to an organisation, we can\'t suggest you a template. Please choose an organisation in your profile"
msgstr "You are not linked to an organisation, we can\'t suggest you a template. Please choose an organisation in your profile"
@@ -217,8 +217,8 @@
msgid "This plan is based on the %{org_name}: %{template_name} template"
msgstr ""
-msgid "You can either choose a template provided by your organisation, another organisation or a funder template."
-msgstr "You can either choose a template provided by your organisation, another organisation or a funder template."
+msgid "You can either choose a template provided by your organisation, another organisation or a funder template. The default template is \"%{template_name}\"."
+msgstr "You can either choose a template provided by your organisation, another organisation or a funder template. The default template is \"%{template_name}\"."
msgid "Successfully changed the permissions for %{user_email}. They have been notified via email."
msgstr "Autorisations de %{user_email} modifiées avec succès. L'utilisateur a été informé par mail."
\ No newline at end of file
diff --git a/config/locale/fr_FR/dmpopidor.po b/config/locale/fr_FR/dmpopidor.po
index 7fe9331..46a1acf 100644
--- a/config/locale/fr_FR/dmpopidor.po
+++ b/config/locale/fr_FR/dmpopidor.po
@@ -186,8 +186,8 @@
msgid "The template \"__template_title__\" is available. Would you like to create a plan from this template?"
msgstr "Le modèle \"__template_title__\" est disponible. Souhaitez-vous créer un plan à partir de ce modèle ?"
-msgid "No template available, would you like to create a plan using the default \"__template_title__\" template?"
-msgstr "Aucun modèle de disponible, souhaitez-vous créer un plan à partir du modèle par défaut \"__template_title__\" ?"
+msgid "No template available."
+msgstr "Aucun modèle de disponible."
msgid "You are not linked to an organisation, we can\'t suggest you a template. Please choose an organisation in your profile"
msgstr "Vous n'êtes pas liés à un organisme, nous ne pouvons vous proposer un modèle. Veuillez choisir un organisme dans votre profil."
@@ -216,8 +216,8 @@
msgid "This plan is based on the %{org_name}: %{template_name} template"
msgstr "Ce plan est basé sur le modèle %{template_name} (%{org_name})"
-msgid "You can either choose a template provided by your organisation, another organisation or a funder template."
-msgstr "Vous pouvez choisir soit un modèle fourni par votre organisme soit par un autre organisme, ou un modèle financeur."
+msgid "You can either choose a template provided by your organisation, another organisation or a funder template. The default template is \"%{template_name}\"."
+msgstr "Vous pouvez choisir soit un modèle fourni par votre organisme soit par un autre organisme, ou un modèle financeur. Le modèle par défaut est \"%{template_name}\"."
msgid "Successfully changed the permissions for %{user_email}. They have been notified via email."
msgstr "Autorisations de %{user_email} modifiées avec succès. L'utilisateur a été informé par mail."
\ No newline at end of file
diff --git a/lib/assets/javascripts/views/plans/new.js b/lib/assets/javascripts/views/plans/new.js
index 43c0b71..1979986 100644
--- a/lib/assets/javascripts/views/plans/new.js
+++ b/lib/assets/javascripts/views/plans/new.js
@@ -41,15 +41,14 @@
$('#multiple-templates').hide();
if ($('#plan_org_id').val() !== '-1') {
if (data.templates[0].default) {
- if ($('#default-template .single-template-name').length) {
- $('#default-template .single-template-name').html($('#default-template .single-template-name').html().replace('__template_title__', templateTitle));
- }
$('#default-template').show();
$('#single-template').hide();
+ $('#create-btn').hide();
} else {
if ($('#single-template .single-template-name').length) {
$('#single-template .single-template-name').html($('#single-template .single-template-name').html().replace('__template_title__', templateTitle));
}
+ $('#create-btn').show();
$('#single-template').show();
$('#default-template').hide();
}
@@ -57,12 +56,14 @@
if ($('#single-template .single-template-name').length) {
$('#single-template .single-template-name').html($('#single-template .single-template-name').html().replace('__template_title__', templateTitle));
}
+ $('#create-btn').show();
$('#single-template').show();
}
} else {
$('#multiple-templates').show();
$('#available-templates').fadeIn();
$('#single-template, #default-template').hide();
+ $('#create-btn').show();
}
toggleSubmit();
} else {
@@ -146,7 +147,7 @@
// For form v2
// Clicking on the 'No' button activates the next tabs
- $('#no-btn').click((e) => {
+ $('#next-btn').click((e) => {
e.preventDefault();
const nextTabId = $('.form-tabs li.active').next().children().attr('href');
if (nextTabId) $(`.nav-tabs a[href="${nextTabId}"]`).tab('show');
@@ -157,11 +158,9 @@
const activeTab = $('.form-tabs li.active a').attr('href');
const lastTab = $('.form-tabs li a').last().attr('href');
if (activeTab === lastTab) {
- $('#no-btn').hide();
- $('#end-default-btn').show();
+ $('#next-btn').hide();
} else {
- $('#no-btn').show();
- $('#end-default-btn').hide();
+ $('#next-btn').show();
}
});