mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 08:52:15 +00:00
Added read-only view of form
This commit is contained in:
@@ -17,7 +17,18 @@
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
<div ng-controller="FormController" class="col-sm-12">
|
||||
<form name="theForm" sf-schema="schema" sf-form="form" sf-model="model" ng-submit="onSubmit(theForm)">
|
||||
|
||||
<form name="theForm" ng-submit="onSubmit(theForm)">
|
||||
|
||||
<div sf-schema="schema" sf-form="form" sf-model="model"
|
||||
{% if not edit %}
|
||||
sf-options="{ formDefaults: { readonly: true } }"
|
||||
{% endif %}
|
||||
></div>
|
||||
|
||||
{% if edit %}
|
||||
<input class="btn btn-primary" type="submit" value="Save">
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
<td>{{ object.last_edited_by }} at {{ object.last_edited_at }}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<a href="{% url 'form_detail' object.pk %}" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-eye-open"></span>
|
||||
</a>
|
||||
<a href="{% url 'update_form' object.pk %}" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user