Skip to content

Commit

Permalink
Fixed: some user interface issues with approval (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
signebedi committed Aug 26, 2024
1 parent d3c8e60 commit 7fa87c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions libreforms_fastapi/app/templates/read_one_form.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
<a class="dropdown-item" id="duplicateLink" href="/ui/form/duplicate/{{ form_name }}/{{ document_id }}">Duplicate Form</a>
<a class="dropdown-item" id="deleteLink" onclick="deleteForm();" href="#">Delete Form</a>
{# <a class="dropdown-item disabled" id="downloadLink" href="#">Download Form</a> #}
<div class="dropdown-divider"></div>
{# <div class="dropdown-divider"></div>
<h6 class="dropdown-header">Review and Approval</h6>
<a class="dropdown-item disabled" id="approveLink" href="#">Go to Approval</a>
<a class="dropdown-item disabled" id="approveLink" href="#">Go to Approval</a> #}
</div>
</li>
</ul>
Expand Down Expand Up @@ -91,7 +91,7 @@ function signForm() {
success: function(response) {
setFlashMessage("Successfully signed form", AlertCategories.SUCCESS);
window.location.reload();
window.location.href = '/ui/form/review_and_approval';
},
Expand Down
10 changes: 8 additions & 2 deletions libreforms_fastapi/app/templates/review_and_approval.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ $(document).ready(function () {
</td>
<td>${form['metadata']['form_name'].replace(/_/g, ' ')}</td>
{# <td>${GFG(JSON.stringify(form['data']), 60)}</td> #}
<td>${formatObject(form['data'])}</td>
{# <div class="dropdown-divider"></div>
<h6 class="dropdown-header">Review and Approval</h6>
<a class="dropdown-item disabled" id="approveLink" href="#">Go to Approval</a> #}
<td>${GFG(formatObject(form['data']), 150)}</td>
<td>
<a target="_blank" href="/ui/auth/p/${form['metadata']['last_editor']}" class="badge bg-primary text-decoration-none" style=" {%if not config['OTHER_PROFILES_ENABLED'] and not request.user.site_admin%} pointer-events: none;{%endif%}" aria-label="Link to ${form['metadata']['last_editor']}">
${form['metadata']['last_editor']}
Expand Down Expand Up @@ -137,7 +140,10 @@ $(document).ready(function () {
return type === 'sort' ? date : data;
}
}
]
],
language: {
"emptyTable": "There are no submissions that require your review or approval at this time"
}
});
}).catch(error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@



<pre><code>

</code></pre>

{# Add some logic here that redirects if the current user is not an authorized approver... #}

{% endblock %}

0 comments on commit 7fa87c2

Please sign in to comment.