tethys/resources/views/workflow/submitter/edit.blade.php

81 lines
2.7 KiB
PHP
Raw Normal View History

@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
<span>Edit Dataset</span>
</h3>
</div>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-3-3">
<div>
<a href="{{ route('publish.workflow.submit.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i>
<span>BACK</span>
</a>
</div>
<div id="app1">
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['publish.workflow.submit.update', $dataset->id], 'id' => 'submitEditForm',
'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'onSubmit' ]) !!}
@include('workflow/submitter/_form', ['submitButtonText' => 'Save Dataset', 'bookLabel' => 'Edit Dataset.'])
2020-01-23 16:52:26 +00:00
{{-- @if (count($errors) > 0)
<div>
<b>Please correct the following error(s):</b>
<ul class="alert validation-summary-errors">
@foreach($errors->all() as $error)
<li style="margin-left:5px;">{{ $error }}</li>
@endforeach
</ul>
</div>
@endif --}}
2020-01-23 16:52:26 +00:00
<!-- client errors -->
<div v-if="errors.items.length > 0">
<b>Please correct the following error(s):</b>
<ul class="alert validation-summary-errors">
<li style="margin-left:5px;" v-for="error in errors.items">@{{ error.msg }}</li>
</ul>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
@stop
@section('after-scripts')
<script>
window.Laravel = <?php echo json_encode([
'csrf_token' => csrf_token(),
'form' => $dataset,
'titleTypes' => $titleTypes,
'descriptionTypes' => $descriptionTypes,
'contributorTypes'=> $contributorTypes,
'nameTypes' => $nameTypes,
'languages' => $languages,
'messages' => $messages,
'projects' => $projects,
'licenses' => $licenses,
'checkeds' => $checkeds,
'referenceTypes' => $referenceTypes,
'relationTypes' => $relationTypes
]); ?>
</script>
<script type="text/javascript" src="{{ asset('backend/publish/mainEditDataset.js') }}"></script>
@stop