diff --git a/ajax/addbook.php b/ajax/addbook.php index 70f47cc8..0b075a0e 100644 --- a/ajax/addbook.php +++ b/ajax/addbook.php @@ -14,7 +14,7 @@ $book = array( 'displayname' => '', ); $tmpl = new OCP\Template('contacts', 'part.editaddressbook'); -$tmpl->assign('new', true); -$tmpl->assign('addressbook', $book); +$tmpl->assignHTML('new', true); +$tmpl->assignHTML('addressbook', $book); $tmpl->printPage(); ?> diff --git a/ajax/createaddressbook.php b/ajax/createaddressbook.php index af7c19ee..4a256458 100644 --- a/ajax/createaddressbook.php +++ b/ajax/createaddressbook.php @@ -33,7 +33,7 @@ if(!OC_Contacts_Addressbook::setActive($bookid, 1)) { } $addressbook = OC_Contacts_App::getAddressbook($bookid); $tmpl = new OCP\Template('contacts', 'part.chooseaddressbook.rowfields'); -$tmpl->assign('addressbook', $addressbook); +$tmpl->assignHTML('addressbook', $addressbook); OCP\JSON::success(array( 'page' => $tmpl->fetchPage(), 'addressbook' => $addressbook, diff --git a/ajax/editaddressbook.php b/ajax/editaddressbook.php index 7a9b757a..18ddfef6 100644 --- a/ajax/editaddressbook.php +++ b/ajax/editaddressbook.php @@ -11,7 +11,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); $addressbook = OC_Contacts_App::getAddressbook($_GET['bookid']); $tmpl = new OCP\Template("contacts", "part.editaddressbook"); -$tmpl->assign('new', false); -$tmpl->assign('addressbook', $addressbook); +$tmpl->assignHTML('new', false); +$tmpl->assignHTML('addressbook', $addressbook); $tmpl->printPage(); ?> diff --git a/ajax/loadcard.php b/ajax/loadcard.php index fbb831f4..a07120a3 100644 --- a/ajax/loadcard.php +++ b/ajax/loadcard.php @@ -36,12 +36,12 @@ $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); $email_types = OC_Contacts_App::getTypesOfProperty('EMAIL'); $tmpl = new OCP\Template('contacts','part.contact'); -$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); -$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); -$tmpl->assign('adr_types',$adr_types); -$tmpl->assign('phone_types',$phone_types); -$tmpl->assign('email_types',$email_types); -$tmpl->assign('id',''); +$tmpl->assignHTML('uploadMaxFilesize', $maxUploadFilesize); +$tmpl->assignHTML('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); +$tmpl->assignHTML('adr_types',$adr_types); +$tmpl->assignHTML('phone_types',$phone_types); +$tmpl->assignHTML('email_types',$email_types); +$tmpl->assignHTML('id',''); $page = $tmpl->fetchPage(); OCP\JSON::success(array('data' => array( 'page' => $page ))); diff --git a/index.php b/index.php index 74b7c43c..865a0cc3 100644 --- a/index.php +++ b/index.php @@ -59,16 +59,16 @@ OCP\Util::addStyle('contacts','jquery.Jcrop'); OCP\Util::addStyle('contacts','contacts'); $tmpl = new OCP\Template( "contacts", "index", "user" ); -$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); -$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); -$tmpl->assign('property_types', $property_types); -$tmpl->assign('phone_types', $phone_types); -$tmpl->assign('email_types', $email_types); -$tmpl->assign('categories', $categories); -$tmpl->assign('addressbooks', $addressbooks); -$tmpl->assign('contacts', $contacts); -$tmpl->assign('details', $details ); -$tmpl->assign('id',$id); +$tmpl->assignHTML('uploadMaxFilesize', $maxUploadFilesize); +$tmpl->assignHTML('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); +$tmpl->assignHTML('property_types', $property_types); +$tmpl->assignHTML('phone_types', $phone_types); +$tmpl->assignHTML('email_types', $email_types); +$tmpl->assignHTML('categories', $categories); +$tmpl->assignHTML('addressbooks', $addressbooks); +$tmpl->assignHTML('contacts', $contacts); +$tmpl->assignHTML('details', $details ); +$tmpl->assignHTML('id',$id); $tmpl->printPage(); ?> diff --git a/templates/part.chooseaddressbook.php b/templates/part.chooseaddressbook.php index a0ec053a..74fab990 100644 --- a/templates/part.chooseaddressbook.php +++ b/templates/part.chooseaddressbook.php @@ -5,8 +5,8 @@ $option_addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); for($i = 0; $i < count($option_addressbooks); $i++){ echo "