X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fcontacts_view.inc;h=8ad1496a439483dba84e7f3df20267265473cc1c;hb=19ddc3939071044c8e94b628f1d6a039f50cc493;hp=07e3066deff1224036ee083cf95d2501ebcb09bb;hpb=7b398ba8033a22ceaf057692ea3b5338c8bd3ea7;p=fa-stable.git diff --git a/includes/ui/contacts_view.inc b/includes/ui/contacts_view.inc index 07e3066d..8ad1496a 100644 --- a/includes/ui/contacts_view.inc +++ b/includes/ui/contacts_view.inc @@ -21,11 +21,11 @@ class contacts extends simple_crud { var $sub_class; var $class; - function contacts($name, $id, $class, $subclass=null) { + function __construct($name, $id, $class, $subclass=null) { $fields = array('ref','name','name2','address', 'phone', 'phone2','fax', 'email','lang','notes', 'assgn' =>array('fld'=>'contacts')); - $this->simple_crud($name, $fields); + parent::__construct($name, $fields); $this->class = $class; $this->subclass = $subclass; $this->entity = $id; @@ -35,13 +35,11 @@ class contacts extends simple_crud { br(); $contacts = get_crm_persons($this->class, $this->subclass, $this->entity); -// check_value('show_inactive')); - start_table(TABLESTYLE, "width=80%"); + start_table(TABLESTYLE, "width='80%'"); $th = array(_('Assignment'), _("Reference"), _("Full Name"), _("Phone"), _("Sec Phone"), _("Fax"), _("email"), '', " "); - // inactive_control_column($th); table_header($th); $k = 0; @@ -59,11 +57,10 @@ class contacts extends simple_crud { label_cell($last["phone2"]); label_cell($last["fax"]); email_cell($last["email"]); - // inactive_control_cell($myrow["id"], $myrow["inactive"], 'crm_contacts', 'id'); edit_button_cell("{$this->name}Edit[{$last['id']}]", _("Edit")); - // delete button removes only category unless this is the last contact for this person + // delete button removes only category unless this is the last contact for this person delete_button_cell("{$this->name}Delete[{$last['id']}]", _("Delete")); end_row(); $description = array(); @@ -76,7 +73,7 @@ class contacts extends simple_crud { } } -//inactive_control_row($th); + //inactive_control_row($th); end_table(1); } @@ -123,8 +120,7 @@ class contacts extends simple_crud { function db_update() { return update_crm_person($this->selected_id, $_POST['ref'], $_POST['name'], $_POST['name2'], $_POST['address'], $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], - $_POST['lang'], $_POST['notes'], $_POST['assgn'], $this->entity); - + $_POST['lang'], $_POST['notes'], $_POST['assgn'], $this->entity, $this->class); } function insert_check() { @@ -168,4 +164,3 @@ class contacts extends simple_crud { } } -?> \ No newline at end of file