From 44b4dec1b6f7974caebf5af321e46206e7196e0b Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 30 May 2015 14:32:41 +0200 Subject: [PATCH] =?UTF-8?q?#1118=20:=20partage=20de=20note=20Ne=20peut=20p?= =?UTF-8?q?artager=20note=20non=20sauv=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/ajax_todo_list.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/html/ajax_todo_list.php b/html/ajax_todo_list.php index df23aa5c1..0dd7e2070 100644 --- a/html/ajax_todo_list.php +++ b/html/ajax_todo_list.php @@ -131,9 +131,9 @@ if ($ac == 'save') //////////////////////////////////////////////////////////////////////////////// if ($ac=='shared_note') { - $id=HtmlInput::default_value_get("todo_id", 0); + $id=HtmlInput::default_value_get("todo_id", -1); // If note_id is not correct then give an error - if ($id==0||isNumber($id)==0) + if ($id==-1||isNumber($id)==0) { header('Content-type: text/xml; charset=UTF-8'); $dom=new DOMDocument('1.0', 'UTF-8'); @@ -142,6 +142,26 @@ if ($ac=='shared_note') echo $dom->saveXML(); return; } + if ($id==0) + { + ob_start(); + echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_{$id}"); + echo '

'; + echo _("Vous devez d'abord sauver"); + echo '

'; + echo '

'; + echo HtmlInput::submit('close'.$id, 'Ferme'," onclick=\"\$('shared_{$id}').remove();\""); + echo '

'; + $result=ob_get_clean(); + // + // output the XML + header('Content-type: text/xml; charset=UTF-8'); + $dom=new DOMDocument('1.0', 'UTF-8'); + $tl_id=$dom->createElement('content', escape_xml($result)); + $dom->appendChild($tl_id); + echo $dom->saveXML(); + return; + } $todo=new Todo_List($cn); $todo->set_parameter("id", $id); $todo->load();