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

yutub

parent 651b6127
...@@ -638,7 +638,8 @@ def editrumahsakit(request): ...@@ -638,7 +638,8 @@ def editrumahsakit(request):
luasbangunan = request.POST.get('luasbangunan') luasbangunan = request.POST.get('luasbangunan')
luastanah = request.POST.get('luastanah') luastanah = request.POST.get('luastanah')
tinggibangunan = request.POST.get('tinggibangunan') tinggibangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
elif alamat == '': elif alamat == '':
...@@ -668,14 +669,10 @@ def editrumahsakit(request): ...@@ -668,14 +669,10 @@ def editrumahsakit(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "rs.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasledit: with conn.cursor() as hasledit:
...@@ -722,14 +719,10 @@ def editcagarbudaya(request): ...@@ -722,14 +719,10 @@ def editcagarbudaya(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "loc.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editcagar: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -747,7 +740,7 @@ def editkantoradmin(request): ...@@ -747,7 +740,7 @@ def editkantoradmin(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -778,10 +771,10 @@ def editkantoradmin(request): ...@@ -778,10 +771,10 @@ def editkantoradmin(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
namafile = "lurah.svg" namafile = gambar
with conn.cursor() as editka: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -799,7 +792,7 @@ def editlayanankesehatan(request): ...@@ -799,7 +792,7 @@ def editlayanankesehatan(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -830,10 +823,10 @@ def editlayanankesehatan(request): ...@@ -830,10 +823,10 @@ def editlayanankesehatan(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
namafile = "rs.svg" namafile = gambar
with conn.cursor() as editka: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -851,7 +844,7 @@ def editpuskesmas(request): ...@@ -851,7 +844,7 @@ def editpuskesmas(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -882,10 +875,10 @@ def editpuskesmas(request): ...@@ -882,10 +875,10 @@ def editpuskesmas(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
namafile = "rs.svg" namafile = gambar
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -904,7 +897,7 @@ def editibadah(request): ...@@ -904,7 +897,7 @@ def editibadah(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat') perangkat = request.POST.get('perangkat')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
...@@ -937,14 +930,10 @@ def editibadah(request): ...@@ -937,14 +930,10 @@ def editibadah(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "masjid.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -964,7 +953,7 @@ def editsekolah(request): ...@@ -964,7 +953,7 @@ def editsekolah(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -995,14 +984,10 @@ def editsekolah(request): ...@@ -995,14 +984,10 @@ def editsekolah(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "sekolah.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -1022,7 +1007,7 @@ def editspbu(request): ...@@ -1022,7 +1007,7 @@ def editspbu(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -1053,14 +1038,10 @@ def editspbu(request): ...@@ -1053,14 +1038,10 @@ def editspbu(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "masjid.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -1079,7 +1060,7 @@ def editstasiun(request): ...@@ -1079,7 +1060,7 @@ def editstasiun(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -1110,14 +1091,10 @@ def editstasiun(request): ...@@ -1110,14 +1091,10 @@ def editstasiun(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "kereta.svg"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -1134,7 +1111,7 @@ def editterminal(request): ...@@ -1134,7 +1111,7 @@ def editterminal(request):
namobj = request.POST.get('namobj') namobj = request.POST.get('namobj')
remark = request.POST.get('remark') remark = request.POST.get('remark')
luas = request.POST.get('luas') luas = request.POST.get('luas')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -1142,6 +1119,7 @@ def editterminal(request): ...@@ -1142,6 +1119,7 @@ def editterminal(request):
alamat = 'alamat' alamat = 'alamat'
else: else:
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
perangkat = request.POST.get('perangkat') perangkat = request.POST.get('perangkat')
if perangkat is None: if perangkat is None:
perangkat = 'bpk' perangkat = 'bpk'
...@@ -1165,14 +1143,10 @@ def editterminal(request): ...@@ -1165,14 +1143,10 @@ def editterminal(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "terminal_batu_kuning.png"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
...@@ -1191,7 +1165,7 @@ def editgardu(request): ...@@ -1191,7 +1165,7 @@ def editgardu(request):
luas_bangunan = request.POST.get('luasbangunan') luas_bangunan = request.POST.get('luasbangunan')
luat_tanah = request.POST.get('luastanah') luat_tanah = request.POST.get('luastanah')
tinggi_bangunan = request.POST.get('tinggibangunan') tinggi_bangunan = request.POST.get('tinggibangunan')
# gambar = request.POST.get('gambar') gambar = request.POST.get('gambar')
alamat = request.POST.get('alamat') alamat = request.POST.get('alamat')
if alamat is None: if alamat is None:
alamat = 'alamat' alamat = 'alamat'
...@@ -1218,15 +1192,11 @@ def editgardu(request): ...@@ -1218,15 +1192,11 @@ def editgardu(request):
# print(file.name) # print(file.name)
url = fss.url(filename) url = fss.url(filename)
except: except:
num = random.randrange(1, 10000000000000) namafile = gambar
namafile = "terminal_batu_kuning.png"
filename = fss.save(namafile, file)
# print(file.name)
url = fss.url(filename)
with conn.cursor() as editrs: 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() conn.commit()
with conn.cursor() as hasiledit: with conn.cursor() as hasiledit:
......
...@@ -352,6 +352,7 @@ ...@@ -352,6 +352,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -536,7 +537,8 @@ ...@@ -536,7 +537,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:kantor' %}", url: "{% url 'api:kantor' %}",
...@@ -726,6 +728,7 @@ ...@@ -726,6 +728,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -908,7 +911,8 @@ ...@@ -908,7 +911,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:layanankesehatan' %}", url: "{% url 'api:layanankesehatan' %}",
...@@ -1099,6 +1103,7 @@ ...@@ -1099,6 +1103,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -1281,7 +1286,8 @@ ...@@ -1281,7 +1286,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:puskesmas' %}", url: "{% url 'api:puskesmas' %}",
...@@ -1472,6 +1478,7 @@ ...@@ -1472,6 +1478,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -1637,7 +1644,8 @@ ...@@ -1637,7 +1644,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:rumahsakit' %}", url: "{% url 'api:rumahsakit' %}",
...@@ -1888,6 +1896,7 @@ ...@@ -1888,6 +1896,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -2058,7 +2067,8 @@ ...@@ -2058,7 +2067,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:ibadah' %}", url: "{% url 'api:ibadah' %}",
data: data, data: data,
...@@ -2289,6 +2299,7 @@ ...@@ -2289,6 +2299,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -2470,7 +2481,8 @@ ...@@ -2470,7 +2481,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:sekolah' %}", url: "{% url 'api:sekolah' %}",
...@@ -2661,6 +2673,7 @@ ...@@ -2661,6 +2673,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -2828,7 +2841,8 @@ ...@@ -2828,7 +2841,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:spbu' %}", url: "{% url 'api:spbu' %}",
data: data, data: data,
...@@ -3018,6 +3032,7 @@ ...@@ -3018,6 +3032,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -3184,7 +3199,8 @@ ...@@ -3184,7 +3199,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:stasiun' %}", url: "{% url 'api:stasiun' %}",
data: data, data: data,
...@@ -3337,6 +3353,7 @@ ...@@ -3337,6 +3353,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -3482,7 +3499,8 @@ ...@@ -3482,7 +3499,8 @@
data.append('luas', $('#luas_bangunan').val()) data.append('luas', $('#luas_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:terminal' %}", url: "{% url 'api:terminal' %}",
...@@ -3636,6 +3654,7 @@ ...@@ -3636,6 +3654,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -3793,7 +3812,8 @@ ...@@ -3793,7 +3812,8 @@
data.append('luas', $('#luas_bangunan').val()) data.append('luas', $('#luas_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:cagarbudaya' %}", url: "{% url 'api:cagarbudaya' %}",
...@@ -3984,6 +4004,7 @@ ...@@ -3984,6 +4004,7 @@
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label> <label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px"> <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 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> </div>
</div> </div>
...@@ -4151,7 +4172,8 @@ ...@@ -4151,7 +4172,8 @@
data.append('tinggibangunan', $('#tinggi_bangunan').val()) data.append('tinggibangunan', $('#tinggi_bangunan').val())
data.append('alamat', $('#alamat').val()) data.append('alamat', $('#alamat').val())
data.append('perangkat', $('#perangkat').val()) data.append('perangkat', $('#perangkat').val())
data.append('point', poi) data.append('point', poi),
data.append('gambar', $('#gambar').val())
$.ajax({ $.ajax({
url: "{% url 'api:gardu' %}", url: "{% url 'api:gardu' %}",
...@@ -4331,4 +4353,29 @@ ...@@ -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> </script>
\ No newline at end of file
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<ul class="nasted active"> <ul class="nasted active">
<div class="checkbox"> <div class="checkbox">
<label> <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 Batas Kabupaten/Kota
</label> </label>
</div> </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