edit.edge
Home
/
resources /
views /
submissions /
edit.edge
@layout('layouts.main')
@section('content')
<form method="POST" action="{{ APP_URL() + route('/submissions.update', {id: submission.id}) + '?_method=PUT' }}">
{{ csrfField() }}
<div class="field">
<label class="label">Name of Submission</label>
<input class="input" type="text" name="name" placeholder="Enterprise Zones, Jan 2019" value="{{ submission.name }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('name'), hasErrorFor('name')) }}
</div>
<div class="field">
<label class="label">Status</label>
<div class="select">
<select name="status_id">
<option>Select dropdown</option>
@each(status in statuses)
<option value="{{status.id}}" {{status.id === submission.status_id ? 'selected' : ''}}>{{status.status}}</option>
@endeach
</select>
</div>
</div>
<div class="field">
<label class="label">Element</label>
<div class="select">
<select name="element_id">
<option>Select dropdown</option>
@each(element in elements)
<option value="{{element.id}}" {{element.id === submission.element_id ? 'selected' : ''}}>{{element.name}}</option>
@endeach
</select>
</div>
</div>
<div class="field">
<label class="label">Steward</label>
<div class="select">
<select name="steward_id">
<option>Select dropdown</option>
@each(steward in stewards)
<option value="{{steward.id}}" {{steward.id === submission.element_id ? 'selected' : ''}}>{{steward.contact.first_name}} {{steward.contact.last_name}}</option>
@endeach
</select>
</div>
</div>
<div class="field">
<label class="label">Received Date</label>
<input class="input received-datepicker" type="text" name="upload_date" value="{{ TO_LOCALE(submission.upload_date) }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('upload_date'), hasErrorFor('upload_date')) }}
</div>
<div class="field">
<label class="label">Created Date</label>
<input class="input created-datepicker" type="text" name="creation_date" value="{{ TO_LOCALE(submission.creation_date) }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('creation_date'), hasErrorFor('creation_date')) }}
</div>
<div class="field">
<label class="label">Published Date</label>
<input class="input published-datepicker" type="text" name="published_date" value="{{ TO_LOCALE(submission.published_date) }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('published_date'), hasErrorFor('published_date')) }}
</div>
<div class="field">
<label class="label">Local File Location</label>
<input class="input" type="text" name="local_file_location" placeholder="S:/shared/gis/adminbnds/submission.zip" value="{{ submission.local_file_location }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('local_file_location'), hasErrorFor('local_file_location')) }}
</div>
<div class="field">
<label class="label">Download File Location</label>
<input class="input" type="text" name="download_file_location" placeholder="ftp://ftp.gis.oregon.gov/adminbound/EnterpriseZones2019.zip" value="{{ submission.download_file_location }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('download_file_location'), hasErrorFor('download_file_location')) }}
</div>
<div class="field">
<label class="label">ArcGIS Server Service Location</label>
<input class="input" type="text" name="service_location_ags" placeholder="https://navigator.state.or.us/arcgis/rest/services/Projects/Prep_TransCams/MapServer/0" value="{{ submission.service_location_ags }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('service_location_ags'), hasErrorFor('service_location_ags')) }}
</div>
<div class="field">
<label class="label">ArcGIS Online Service ItemID</label>
<input class="input" type="text" name="service_location_agol" placeholder="41d7a22bc09942e9ba0cee1f5746e02c" value="{{ submission.service_location_agol }}" />
{{ elIf('<span class="has-text-danger">$self</span>', getErrorFor('service_location_agol'), hasErrorFor('service_location_agol')) }}
</div>
<div class="field">
<label class="label">Public</label>
<div class="select">
<select name="public">
<option value="true" {{submission.public ? 'selected' : ''}}>Yes</option>
<option value="false" {{!submission.public ? 'selected' : ''}}>No</option>
</select>
</div>
</div>
<div class="field is-grouped">
<div class="control">
<button class="button is-link ss-submit" type="submit">Submit</button>
</div>
<div class="control">
<button class="button is-text"><a href="{{ APP_URL() + route('/submissions.index') }}">Cancel</a></button>
</div>
</div>
<!--
<div class="notification is-warning">
<button class="delete"></button>
Building Snapshots for some items may take a couple minutes. Please be patient!
</div>
-->
</form>
@section('scripts')
<script>
const received = datepicker('.received-datepicker', {
formatter: (input, date, instance) => {
const value = date.toLocaleDateString()
input.value = value // => '1/1/2099'
}
})
const created = datepicker('.created-datepicker', {
formatter: (input, date, instance) => {
const value = date.toLocaleDateString()
input.value = value // => '1/1/2099'
}
})
const published = datepicker('.published-datepicker', {
formatter: (input, date, instance) => {
const value = date.toLocaleDateString()
input.value = value // => '1/1/2099'
}
})
</script>
@endsection
@endsection