create property

This commit is contained in:
2021-02-07 20:42:10 +01:00
parent ce0b55e64e
commit efbfecc335
7 changed files with 161 additions and 8 deletions
@@ -12,6 +12,8 @@ Define object
<h1>Define new object model</h1>
{# TODO implement value restoration on error #}
<form action="/model/object/create" method="POST">
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br>
@@ -10,20 +10,23 @@ Define property
{% block content -%}
<h1>Add new property to model "{{model.name}}"</h1>
{# The parent can be either object or relation model #}
<h1>Add new property to {{object.describe}}</h1>
{# TODO implement value restoration on error #}
<form action="/model/property/create" method="POST">
<input type="hidden" name="object" value="{{object}}">
<input type="hidden" name="object" value="{{object.id}}">
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br>
<label for="optional">Optional:</label>
<input type="checkbox" name="optional" id="optional">
<input type="checkbox" name="optional" id="optional" value="1">
<br>
<label for="multiple">Multiple:</label>
<input type="checkbox" name="multiple" id="multiple"><br>
<input type="checkbox" name="multiple" id="multiple" value="1"><br>
<label for="data_type">Type:</label>
<select name="data_type" id="data_type">
@@ -12,6 +12,8 @@ Define relation
<h1>Define new relation from "{{object.name}}"</h1>
{# TODO implement value restoration on error #}
<form action="/model/relation/create" method="POST">
<input type="hidden" name="object" value="{{object.id}}">