Commit 33133a0a authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh

[ui] show warning about saving docs changes in reports

The documentation editor for BEAT objects reloads the page
when the user clicks "Save". This reload discards unsaved
changes in the reports app. Unfortunately the documentation
system is object-independent, so the entire system can't be
changed just for the reports app.

Instead, a warning is shown when editing the documentation
in a report.

Closes #528
parent f081e48c
Pipeline #31448 passed with stage
in 14 minutes and 44 seconds
{% comment %}
* Copyright (c) 2016 Idiap Research Institute,
* Contact:
* This file is part of the beat.web module of the BEAT platform.
* Commercial License Usage
* Licensees holding valid commercial BEAT licenses may use this file in
* accordance with the terms contained in a written agreement between you
* and Idiap. For further information contact
* Alternatively, this file may be used under the terms of the GNU Affero
* Public License version 3 as published by the Free Software and appearing
* in the file LICENSE.AGPL included in the packaging of this file.
* The BEAT platform is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* You should have received a copy of the GNU Affero Public License along
* with the BEAT platform. If not, see
{% endcomment %}
......@@ -40,6 +40,13 @@
<div id="description-edition" style="display:none;">
<form id="description-form" method="post" action="" class="form">
{% csrf_token %}
{% if url_name == 'api_reports:object' %}
<div class="form-group">
<div class="alert alert-warning">
<i class="fa fa-warning"></i> Saving changes to documentation will discard any unsaved changes on the rest of the page.
{% endif %}
<div class="form-group">
<label for="short_description">Short description</label>
<input maxlength="100" size="80" class="form-control" id="short-description" value="{{ object.short_description }}">
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment