form improvements

This commit is contained in:
2018-07-21 19:24:00 +02:00
parent 3242ae9cbe
commit a9ffd378a0
17 changed files with 200 additions and 174 deletions
+19 -12
View File
@@ -2,14 +2,21 @@
@section('content')
<div class="container">
<form method="POST" action="{{route('table.storeNew')}}" class="row justify-content-center">
<form method="POST" action="{{route('table.storeNew')}}" class="row justify-content-center"
aria-label="New Table">
<h2>New Table</h2>
@csrf
<div class="col-md-8">
{!! Widget::text('table-name', 'Title')->help('Unique among your tables') !!}
{!! Widget::text('name', 'Name')->value('molluscs-'.uniqid())
->help('Unique among your tables, and part of the URL; only letters, digits and
some symbols are allowed.') !!}
{!! Widget::textarea('table-descr', 'Description')->height('8em')
{!! Widget::text('title', 'Title')
->help('Unique among your tables') !!}
{!! Widget::textarea('description', 'Description')->height('8em')
->help('Description what data is in the table. Please use the dedicated
fields for License and data source. URLs in a full format will be clickable.') !!}
@@ -21,24 +28,24 @@
->help('If you took the data from some external site, a book, etc., write it here.
URLs in a full format will be clickable.') !!}
{!! Widget::textarea('col-spec', 'Columns')->value($exampleColSpec)->height('8em')
{!! Widget::textarea('columns', 'Columns')->value($exampleColumns)->height('8em')
->help('
<div class="text-left">
Column parameters in CSV format:
<ul class="pl-3 mb-0">
<li><b>column identifier</b><br>letters, numbers, underscore
<li><b>column data type</b><br>int, string, float, bool
<li><b>column title</b><br>used for display (optional)
</ul>
Column parameters in CSV format:
<ul class="pl-3 mb-0">
<li><b>column identifier</b><br>letters, numbers, underscore
<li><b>column data type</b><br>int, string, float, bool
<li><b>column title</b><br>used for display (optional)
</ul>
</div>') !!}
{!! Widget::textarea('row-data', 'Initial data')->value($exampleData)->height('12em')
{!! Widget::textarea('data', 'Initial data')->value($exampleData)->height('12em')
->help('
Initial table data in CSV format, columns corresponding to the
specification you entered above.') !!}
<div class="row form-group">
<div class="col-md-8 offset-md-3 pl-0">
<div class="col-md-8 offset-md-3">
<button type="submit" class="btn btn-primary">
<i class="fa-save pr-2"></i>Create New Table
</button>