Skip to content

Commit

Permalink
Merge branch 'develop' into display-all-fields-on-dataset-create-form
Browse files Browse the repository at this point in the history
  • Loading branch information
vildead authored Sep 8, 2023
2 parents f728a6b + 243d950 commit 504c4cc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
10 changes: 9 additions & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sudo /usr/local/bin/pip3.9 install gunicorn
## NPM and Node.js

```bash
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install nodejs
```

Expand Down Expand Up @@ -675,6 +675,14 @@ systemctl start celery_beat
```
# Migration
## Daisy 1.7.12 to 1.7.13
Update of nodejs is required:
```bash
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install nodejs
```
## Daisy 1.7.0 to 1.7.1
The migration introduced breaking change by updating python-keycloak to version `2.6.0`. If you are using Keycloak integration, update your `elixir_daisy/settings_local.py` file to contain **all** Keyclock related variables defined in README Keycloak [section](https://github.com/elixir-luxembourg/daisy/blob/master/README.md#keycloak).
Expand Down
1 change: 1 addition & 0 deletions core/forms/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Meta:
"sensitivity",
"comments",
"other_external_id",
"scientific_metadata",
]
exclude = ("is_published",)
widgets = {
Expand Down
22 changes: 11 additions & 11 deletions web/templates/datasets/dataset_wizard_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

{% block content %}
<div class="row">
<div class="jumbotron mt-5 py-2 pt-4 px-4 w-100">
<ul class="step-wizard-list">
<div class="mt-3 py-0 pt-3 w-100">
<ul class="step-wizard-list shadow-sm">
{% for step, step_verbose_name, skipped in steps_verbose_data %}
<li class="step-wizard-item {% if wizard.steps.current == step %}current-item{% endif %}">
<span class="progress-count {% if skipped %}skipped{% endif %}">{{ forloop.counter }}</span>
Expand All @@ -19,13 +19,6 @@
</div>

<div class="col-md-12 card">
<div class="d-flex justify-content-end mt-3">
{% if wizard.steps.step0 != 0 %}
<a type="button" id="skipButton" class="btn btn-outline-secondary btn-raised float-left">
<i class="material-icons" style="line-height:1.5;">skip_next</i>
</a>
{% endif %}
</div>
<form action="" method="post" class="form col-md-12 nice-selects" id="wizard-form">
{% csrf_token %}
<table>
Expand All @@ -44,8 +37,15 @@ <h1 class="display-4">{{ form.Meta.heading }}</h1>
{% else %}
<!-- If wizard.form.forms is empty or evaluates to False -->
<!-- Display form information -->
<div class="jumbotron mt-2 p-4">
<h1 class="display-4">{{ form.Meta.heading }}</h1>
<div class="mt-2 p-0">
<div class="d-flex justify-content-between mt-3">
<h1 class="display-4">{{ form.Meta.heading }}</h1>
{% if wizard.steps.step0 != 0 %}
<a type="button" id="skipButton" class="btn btn-secondary float-left text-secondary">
Skip <i class="material-icons" style="vertical-align: bottom;">skip_next</i>
</a>
{% endif %}
</div>
<p class="text-muted">{{ form.Meta.heading_help }}</p>
</div>
{% include '_includes/forms.html' with form=wizard.form %}
Expand Down
5 changes: 5 additions & 0 deletions web/views/datasets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse_lazy
from django.contrib import messages
from django.views.generic import CreateView, DetailView, UpdateView, DeleteView
from formtools.wizard.views import NamedUrlSessionWizardView
from django.http import HttpResponseRedirect, Http404
Expand Down Expand Up @@ -50,6 +51,10 @@ def render_done(self, form, **kwargs) -> HttpResponseRedirect:
dataset_id = self.storage.extra_data.get("dataset_id")
self.storage.reset()
if dataset_id:
messages.success(
self.request,
"Your dataset was created successfully. You can add more details below.",
)
done_response = HttpResponseRedirect(
reverse_lazy("dataset", kwargs={"pk": dataset_id})
)
Expand Down

0 comments on commit 504c4cc

Please sign in to comment.