image replace form now uses jquery
This commit is contained in:
parent
df20a75271
commit
9a35401666
@ -168,17 +168,28 @@ class UploadTheme extends Themelet {
|
||||
|
||||
/* only allows 1 file to be uploaded - for replacing another image file */
|
||||
public function display_replace_page(Page $page, $image_id) {
|
||||
global $config;
|
||||
global $config, $page;
|
||||
$page->add_html_header("<link rel='stylesheet' href='".get_base_href()."/ext/upload/_style.css' type='text/css'>");
|
||||
$tl_enabled = ($config->get_string("transload_engine", "none") != "none");
|
||||
|
||||
$js2 = 'javascript:$(function() {
|
||||
$("#data").hide();
|
||||
$("#data").val("");
|
||||
$("#url").show(); });';
|
||||
|
||||
$js1 = 'javascript:$(function() {
|
||||
$("#url").hide();
|
||||
$("#url").val("");
|
||||
$("#data").show(); });';
|
||||
|
||||
$upload_list = '';
|
||||
$upload_list .= "
|
||||
<tr>
|
||||
<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url0").style.display = "none";document.getElementById("url0").value = "";document.getElementById("data0").style.display = ""' /> File<br>";
|
||||
<td width='60'><form><input id='radio_button_a' type='radio' name='method' value='file' checked='checked' onclick='$js1' /> File<br>";
|
||||
if($tl_enabled) {
|
||||
$upload_list .="
|
||||
<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data0").style.display = "none";document.getElementById("data0").value = "";document.getElementById("url0").style.display = ""' /> URL</ br></td></form>
|
||||
<td><input id='data0' name='data0' class='wid' type='file'><input id='url0' name='url0' class='wid' type='text' style='display:none'></td>
|
||||
<input id='radio_button_b' type='radio' name='method' value='url' onclick='$js2' /> URL</ br></td></form>
|
||||
<td><input id='data' name='data' class='wid' type='file'><input id='url' name='url' class='wid' type='text' style='display:none'></td>
|
||||
";
|
||||
} else {
|
||||
$upload_list .= "</form></td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user