From c3f33409441c270359f2315cd222f01c15d776ce Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 21 Apr 2001 14:52:28 +0000 Subject: [PATCH] unneeded --- addressbook/field_edit.php | 139 ------------------------------------- 1 file changed, 139 deletions(-) delete mode 100755 addressbook/field_edit.php diff --git a/addressbook/field_edit.php b/addressbook/field_edit.php deleted file mode 100755 index 8ff1ff9b89..0000000000 --- a/addressbook/field_edit.php +++ /dev/null @@ -1,139 +0,0 @@ -link('/addressbook/fields.php')); - $phpgw->common->phpgw_exit(); - } -*/ - $t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('addressbook')); - $t->set_file(array('form' => 'edit_field.tpl')); - $t->set_block('form','add','addhandle'); - $t->set_block('form','edit','edithandle'); - $t->set_block('form','delete','deletehandle'); - - $font = $phpgw_info["theme"]["font"]; - $field = $phpgw->strip_html($field); - $field = ereg_replace(' ','_',$field); - $ofield = ereg_replace(' ','_',$ofield); - - $t->set_var('title',lang('addressbook').' '.lang('custom fields')); - $t->set_var('font',$font); - $t->set_var('note',$note); - $t->set_var('lang_add',lang('Add')); - $t->set_var('lang_edit',lang('Edit')); - $t->set_var('lang_delete',lang("Delete")); - $t->set_var('deleteurl',$phpgw->link("/addressbook/field_edit.php")); - $t->set_var('actionurl',$phpgw->link("/addressbook/field_edit.php")); - $t->set_var('lang_list',lang('Field list')); - $t->set_var('listurl',$phpgw->link("/addressbook/fields.php")); - $t->set_var('lang_reset',lang('Clear Form')); - $t->set_var('edithandle',''); - $t->set_var('deletehandle',''); - $t->set_var('addhandle',''); - - switch($method) { - case "add": - if ($addfield) { - $phpgw->preferences->read_repository(); - $phpgw->preferences->add("addressbook","extra_".$field); - $phpgw->preferences->save_repository(1); - $t->set_var('lang_action',lang('')); - $t->set_var('message',lang("Field has been added.")); - $t->set_var('hidden_vars',''); - $t->set_var('field',$field); - $t->set_var('name',""); - } else { - $t->set_var('lang_action',lang('Add a field')); - $t->set_var('message',""); - $t->set_var( - 'hidden_vars', - ' - ' - ); - $t->set_var('field',$field); - $t->set_var('name',""); - } - $t->set_var('actionurl',$phpgw->link("/addressbook/field_edit.php")); - $t->set_var('lang_btn',lang('Add')); - $t->pparse('out','form'); - $t->pparse('addhandle','add'); - break; - case "edit": - if ($editfield && $field) { - $phpgw->preferences->read_repository(); - $phpgw->preferences->delete("addressbook","extra_".$ofield); - $phpgw->preferences->add("addressbook","extra_".$field); - $phpgw->preferences->save_repository(1); - $t->set_var('lang_action',lang('')); - $t->set_var('message',lang("Field has been changed.")); - $t->set_var('hidden_vars',''); - $t->set_var('field',$field); - $t->set_var('name',""); - } else { - $t->set_var('lang_action',lang('Edit field')); - $t->set_var('message',""); - $t->set_var( - 'hidden_vars', - ' - - ' - ); - $t->set_var('field',$ofield); - $t->set_var('name',''); - } - $t->set_var('lang_btn',lang('Edit')); - $t->pparse('out','form'); - $t->pparse('edithandle','edit'); - break; - case "delete": - if ($deletefield) { - $phpgw->preferences->read_repository(); - $phpgw->preferences->delete("addressbook","extra_".$field); - $phpgw->preferences->save_repository(1); - $t->set_var('lang_action',lang('')); - $t->set_var('message',lang("Field has been deleted.")); - $t->set_var('hidden_vars',''); - $t->set_var('field',$field); - $t->set_var('name',""); - } else { - $t->set_var('lang_action',''); - $t->set_var('message',""); - $t->set_var( - 'hidden_vars', - ' - ' - ); - $t->set_var('field',$field); - $t->set_var('name',''); - } - $t->set_var('lang_btn',lang('Delete')); - $t->pparse('out','form'); - $t->pparse('deletehandle','delete'); - break; - default: - $t->set_var( - 'hidden_vars', - '' - ); - $t->set_var('lang_action',lang('Add a field')); - $t->set_var('name',""); - $t->set_var('field',$field); - $t->set_var('message',""); - break; - } - - $phpgw->common->phpgw_footer(); -?>