Commit 1ae33e00 authored by Manggar Mahardhika's avatar Manggar Mahardhika

yutub

parent 651b6127
......@@ -638,7 +638,8 @@ def editrumahsakit(request):
luasbangunan = request.POST.get('luasbangunan')
luastanah = request.POST.get('luastanah')
tinggibangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
elif alamat == '':
......@@ -668,14 +669,10 @@ def editrumahsakit(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "rs.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_rumah_sakit set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', alamat = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', gambar = '%s' where id = %s"""%(co_edit, namars, alamat, remark, luasbangunan, luastanah, tinggibangunan, perangkat, filename, idrs))
editrs.execute("""update geo_rumah_sakit set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', alamat = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', gambar = '%s' where id = %s"""%(co_edit, namars, alamat, remark, luasbangunan, luastanah, tinggibangunan, perangkat, namafile, idrs))
conn.commit()
with conn.cursor() as hasledit:
......@@ -722,14 +719,10 @@ def editcagarbudaya(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "loc.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editcagar:
editcagar.execute("""update geo_cagar_budaya set namobj = '%s', alamat = '%s', remark = '%s', luas = '%s', perangkat = '%s', gambar = '%s' where id = %s"""% (namobj, alamat, remark, luas, perangkat, filename, idcagar))
editcagar.execute("""update geo_cagar_budaya set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', alamat = '%s', remark = '%s', luas = '%s', perangkat = '%s', gambar = '%s' where id = %s"""% (co_edit, namobj, alamat, remark, luas, perangkat, namafile, idcagar))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -747,7 +740,7 @@ def editkantoradmin(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -778,10 +771,10 @@ def editkantoradmin(request):
# print(file.name)
url = fss.url(filename)
except:
namafile = "lurah.svg"
namafile = gambar
with conn.cursor() as editka:
editka.execute("""update geo_kantor_administrasi set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idkantor))
editka.execute("""update geo_kantor_administrasi set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idkantor))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -799,7 +792,7 @@ def editlayanankesehatan(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -830,10 +823,10 @@ def editlayanankesehatan(request):
# print(file.name)
url = fss.url(filename)
except:
namafile = "rs.svg"
namafile = gambar
with conn.cursor() as editka:
editka.execute("""update geo_layanan_kesehatan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idlakes))
editka.execute("""update geo_layanan_kesehatan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = %s, luas_tanah = %s, tinggi_bangunan = %s, perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idlakes))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -851,7 +844,7 @@ def editpuskesmas(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -882,10 +875,10 @@ def editpuskesmas(request):
# print(file.name)
url = fss.url(filename)
except:
namafile = "rs.svg"
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_puskesmas set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idpus))
editrs.execute("""update geo_puskesmas set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idpus))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -904,7 +897,7 @@ def editibadah(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat')
alamat = request.POST.get('alamat')
......@@ -937,14 +930,10 @@ def editibadah(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "masjid.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_sarana_ibadah set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idsarib))
editrs.execute("""update geo_sarana_ibadah set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idsarib))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -964,7 +953,7 @@ def editsekolah(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -995,14 +984,10 @@ def editsekolah(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "sekolah.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_sarana_pendidikan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idsekolah))
editrs.execute("""update geo_sarana_pendidikan set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idsekolah))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -1022,7 +1007,7 @@ def editspbu(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -1053,14 +1038,10 @@ def editspbu(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "masjid.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_spbu set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idspbu))
editrs.execute("""update geo_spbu set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idspbu))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -1079,7 +1060,7 @@ def editstasiun(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -1110,14 +1091,10 @@ def editstasiun(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "kereta.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_stasiun set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idstasiun))
editrs.execute("""update geo_stasiun set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idstasiun))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -1134,7 +1111,7 @@ def editterminal(request):
namobj = request.POST.get('namobj')
remark = request.POST.get('remark')
luas = request.POST.get('luas')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -1142,6 +1119,7 @@ def editterminal(request):
alamat = 'alamat'
else:
alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat')
if perangkat is None:
perangkat = 'bpk'
......@@ -1165,14 +1143,10 @@ def editterminal(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "terminal_batu_kuning.png"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_terminal_bus set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas, perangkat, alamat, filename, idterm))
editrs.execute("""update geo_terminal_bus set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas, perangkat, alamat, namafile, idterm))
conn.commit()
with conn.cursor() as hasiledit:
......@@ -1191,7 +1165,7 @@ def editgardu(request):
luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar')
gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None:
alamat = 'alamat'
......@@ -1218,15 +1192,11 @@ def editgardu(request):
# print(file.name)
url = fss.url(filename)
except:
num = random.randrange(1, 10000000000000)
namafile = "terminal_batu_kuning.png"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
namafile = gambar
with conn.cursor() as editrs:
editrs.execute("""update geo_gardu_listrik set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, filename, idgardu))
editrs.execute("""update geo_gardu_listrik set geom = st_geomfromgeojson('{"type":"Point", "coordinates":%s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '%s', remark = '%s', luas_bangunan = '%s', luas_tanah = '%s', tinggi_bangunan = '%s', perangkat = '%s', alamat = '%s', gambar = '%s' where id = %s"""%(co_edit, namobj, remark, luas_bangunan, luat_tanah, tinggi_bangunan, perangkat, alamat, namafile, idgardu))
conn.commit()
with conn.cursor() as hasiledit:
......
......@@ -352,6 +352,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -536,7 +537,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:kantor' %}",
......@@ -726,6 +728,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -908,7 +911,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:layanankesehatan' %}",
......@@ -1099,6 +1103,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -1281,7 +1286,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:puskesmas' %}",
......@@ -1472,6 +1478,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -1637,7 +1644,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:rumahsakit' %}",
......@@ -1888,6 +1896,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -2058,7 +2067,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:ibadah' %}",
data: data,
......@@ -2289,6 +2299,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -2470,7 +2481,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:sekolah' %}",
......@@ -2661,6 +2673,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -2828,7 +2841,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:spbu' %}",
data: data,
......@@ -3018,6 +3032,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -3184,7 +3199,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:stasiun' %}",
data: data,
......@@ -3337,6 +3353,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -3482,7 +3499,8 @@
data.append('luas', $('#luas_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:terminal' %}",
......@@ -3636,6 +3654,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f4 + `"required>
</div>
</div>
</div>
......@@ -3793,7 +3812,8 @@
data.append('luas', $('#luas_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:cagarbudaya' %}",
......@@ -3984,6 +4004,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="file" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f8 + `"required>
</div>
</div>
</div>
......@@ -4151,7 +4172,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val())
data.append('point', poi)
data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({
url: "{% url 'api:gardu' %}",
......@@ -4331,4 +4353,29 @@
}
}
function swiftAlert(itype, ititle, itext){
if(itype == 'success'){
swal({
title: ititle,
text: itext,
confirmButtonColor: "#66BB6A",
type: "success"
});
}else if(itype == 'error'){
swal({
title: ititle,
text: itext,
confirmButtonColor: "#EF5350",
type: "error"
});
}else if(itype == 'warning'){
swal({
title: ititle,
text: itext,
confirmButtonColor: "#2196F3",
type: "warning",
});
}
}
</script>
\ No newline at end of file
......@@ -145,7 +145,7 @@
<ul class="nasted active">
<div class="checkbox">
<label>
<input type="checkbox" id="batas_kota" onclick="bataskota()" style="margin-top:2px;">
<input type="checkbox" checked="true" id="batas_kota" onclick="bataskota()" style="margin-top:2px;">
Batas Kabupaten/Kota
</label>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment