{% extends 'frontend/base.html.twig' %}
{% block body %}
<div class="page-bar-hero overflow-hidden">
<div class="container h-100">
<div class="position-relative py-4">
<img class="img-building" src="{{ asset('assets/background/building.png') }}">
<div class="d-flex align-items-center justify-content-between mb-5 position-relative">
<h3 class="text-light mb-0 font-weight-bold">Form
</br>Permintaan Data</h3>
</div>
</div>
</div>
</div>
<div class="form-request position-relative">
<div class="container">
<div class="card-wrapper rounded-lg">
<div class="card-body shadow-sm p-3 border rounded-lg bg-white">
<div class="text-center rounded-lg p-2" style="background-color: #9E0A0A">
<h3 class="text-light mb-0 fs-5">
<i class="bi bi-file-earmark-bar-graph"></i>
Form Permintaan Data
</h3>
</div>
<br>
{{ form_start(form) }}
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.nama) }}</label>
<div class="col-md-9">
{{ form_widget(form.nama) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.telepon) }}</label>
<div class="col-md-9">
{{ form_widget(form.telepon) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.email) }}</label>
<div class="col-md-9">
{{ form_widget(form.email) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.pekerjaan) }}</label>
<div class="col-md-9">
{{ form_widget(form.pekerjaan) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.desk_pekerjaan) }}</label>
<div class="col-md-9">
{{ form_widget(form.desk_pekerjaan) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.judul_data) }}</label>
<div class="col-md-9">
{{ form_widget(form.judul_data) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">Apakah anda mengetahui Perangkat Daerah (PD) penghasil sumber dataset terkait?</label>
<div class="col-md-9">
<label>
<input name="pd" type="radio" value="1" class="mr-2" checked="" onchange="showPd(this.value)"><span>Ya</span>
</label>
<label>
<input name="pd" type="radio" value="2" class="mr-2" onchange="showPd(this.value)"><span>Tidak</span>
</label>
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.div) }}</label>
<div class="col-md-9">
{{ form_widget(form.div) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.desk_kebutuhan) }}</label>
<div class="col-md-9">
{{ form_widget(form.desk_kebutuhan) }}
</div>
</div>
<div class="form-group row">
<label class="col-md-3 col-form-label">{{ form_label(form.tujuan_data) }}</label>
<div class="col-md-9">
{{ form_widget(form.tujuan_data) }}
</div>
</div>
{{ form_widget(form.submit, { 'attr': { 'class': 'btn bg-primary w-100 d-block text-light' }}) }}
{{ form_end(form) }}
</div>
</div>
</div>
</div>
<script>
function showPd(id) {
var id_pd = $("#pd");
var perangkat = $("#t_permohonan_div")
if (id == 1) {
perangkat.show()
perangkat.attr("required", "required")
$('#div').show()
} else {
perangkat.hide()
perangkat.removeAttr("required")
$('#div').hide()
}
};
</script>{% endblock %}