Последний штрих, на этом все - с быстрой сменой аватарок закончили

This commit is contained in:
Dmitry Tretyakov 2023-04-25 19:15:00 +07:00 committed by GitHub
parent fe89c92d07
commit 539bee51bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,11 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
u("#_newPicture").on("click", function(e) { u("#_newPicture").on("click", function(e) {
MessageBox(tr('new_photo'), MessageBox(tr('new_photo'),
"<form id='tmpPhDelF' action='" + u(this).attr("href") + "' method='POST' enctype='multipart/form-data'>"+ "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' method='POST' enctype='multipart/form-data'>"+
"<div id='tmpdd' style='text-align:center'>"+tr('real_photo')+"<br><br>"+tr('formats')+"<br><br>"+"<input type='file' accept='image/*' name='blob' value='"+tr('select_file')+"'><br><br>"+tr('upload_problems')+"<br></div>"+ "<div id='tmpdd' style='text-align:center'>"+tr('formats')+"<br><br>"+
"<label class=\"button\" style=\"\">"+tr('browse')+
"<input type=\"file\" id=\"blob\" name=\"blob\" style=\"display: none;\" onchange=\"filename.innerHTML=blob.files[0].name\" /></label>"+
"<div id=\"filename\" style=\"margin-top: 10px;\"></div>"+
"<br><br>"+tr('upload_problems')+"<br></div>"+
//"<p><input type='checkbox' name='makeAvatarPost'>"+tr('leave_photo')+"</p>"+ //"<p><input type='checkbox' name='makeAvatarPost'>"+tr('leave_photo')+"</p>"+
"<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"+ "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"+
"</form>", [ "</form>", [
@ -130,7 +134,11 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
u("#_newAvatarPicture").on("click", function(e) { u("#_newAvatarPicture").on("click", function(e) {
MessageBox(tr('new_photo'), MessageBox(tr('new_photo'),
"<form id='tmpPhDelF' action='" + u(this).attr("href") + "' method='POST' enctype='multipart/form-data'>"+ "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' method='POST' enctype='multipart/form-data'>"+
"<div id='tmpdd' style='text-align:center'>"+tr('good_photo')+"<br><br>"+tr('formats')+"<br><br>"+"<input type='file' accept='image/*' name='ava' value='"+tr('select_file')+"'><br><br>"+tr('upload_problems')+"<br></div>"+ "<div id='tmpdd' style='text-align:center'>"+tr('good_photo')+
"<br><br>"+tr('formats')+"<br><br>"+
"<label class=\"button\" style=\"\">"+tr('browse')+
"<input type=\"file\" id=\"ava\" name=\"ava\" style=\"display: none;\" onchange=\"filename.innerHTML=ava.files[0].name\" /></label>"+
"<div id=\"filename\" style=\"margin-top: 10px;\"></div>"+
//"<p><input type='checkbox' name='makeAvatarPost' value='1'>"+tr('leave_photo')+"</p>"+ //"<p><input type='checkbox' name='makeAvatarPost' value='1'>"+tr('leave_photo')+"</p>"+
"<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"+ "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />"+
"</form>", [ "</form>", [