|
From: <dts...@us...> - 2003-05-28 18:37:51
|
Update of /cvsroot/phpwebsite-comm/modules/contacts/class
In directory sc8-pr-cvs1:/tmp/cvs-serv17444/class
Modified Files:
Country.php Manager.php
Log Message:
Fleshing things out more
Index: Country.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/contacts/class/Country.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Country.php 27 May 2003 21:51:20 -0000 1.1
--- Country.php 28 May 2003 18:37:14 -0000 1.2
***************
*** 56,62 ****
/* Country Abbreviation */
! $form->add("Country_abbreviation", "text", $this->_abbreviation);
! $form->setSize("Country_abbreviation", 5);
! $form->setTab("Country_abbreviation", 2);
/* Save Button */
--- 56,62 ----
/* Country Abbreviation */
! $form->add("Country_code", "text", $this->_code);
! $form->setSize("Country_code", 5);
! $form->setTab("Country_code", 2);
/* Save Button */
***************
*** 72,76 ****
$tags["COUNTRY_TEXT"] = $_SESSION["translate"]->it("Country");
! $tags["ABBREVIATION_TEXT"] = $_SESSION["translate"]->it("Abbreviation");
return $GLOBALS["core"]->processTemplate($tags, "contacts", "edit_countries.tpl");
--- 72,76 ----
$tags["COUNTRY_TEXT"] = $_SESSION["translate"]->it("Country");
! $tags["CODE_TEXT"] = $_SESSION["translate"]->it("Abbreviation");
return $GLOBALS["core"]->processTemplate($tags, "contacts", "edit_countries.tpl");
***************
*** 90,95 ****
$this->_country = $_REQUEST["Country_country"];
! if(isset($_REQUEST["Country_abbreviation"]))
! $this->_abbreviation = $_REQUEST["Country_abbreviation"];
$error = $this->commit();
--- 90,97 ----
$this->_country = $_REQUEST["Country_country"];
! $this->setLabel($this->_country);
!
! if(isset($_REQUEST["Country_code"]))
! $this->_code = $_REQUEST["Country_code"];
$error = $this->commit();
Index: Manager.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/contacts/class/Manager.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Manager.php 27 May 2003 21:51:20 -0000 1.1
--- Manager.php 28 May 2003 18:37:14 -0000 1.2
***************
*** 32,36 ****
$links[] = "<a href=\"index.php?module=contacts&CONTACTS_MAN_OP=listaddresstypes\">" . $_SESSION["translate"]->it("List Address Types") . "</a>";
! $menu = "<div align=\"right\">" . implode(" |#&160;", $links) . "</div><br />";
}// END FUNC _menu
--- 32,37 ----
$links[] = "<a href=\"index.php?module=contacts&CONTACTS_MAN_OP=listaddresstypes\">" . $_SESSION["translate"]->it("List Address Types") . "</a>";
! $menu = "<div align=\"right\">" . implode(" | ", $links) . "</div><br />";
! return $menu;
}// END FUNC _menu
***************
*** 39,42 ****
--- 40,44 ----
$this->setTable("mod_contacts_contacts");
$GLOBALS["CNT_contacts"]["title"] = $_SESSION["translate"]->it("Contacts");
+ $GLOBALS["CNT_contacts"]["content"] .= $this->_menu();
$GLOBALS["CNT_contacts"]["content"] .= $this->getList("contacts");
}// END FUNC _list
***************
*** 46,49 ****
--- 48,53 ----
$this->setTable("mod_contacts_countries");
$GLOBALS["CNT_contacts"]["title"] = $_SESSION["translate"]->it("Countries");
+ $GLOBALS["CNT_contacts"]["content"] .= $this->_menu();
+ $GLOBALS["CNT_contacts"]["content"] .= "<a href=\"index.php?module=contacts&CONTACTS_MAN_OP=newcountry\">" . $_SESSION["translate"]->it("New Country") . "</a>";
$GLOBALS["CNT_contacts"]["content"] .= $this->getList("countries");
}// END FUNC _listCountries
***************
*** 53,56 ****
--- 57,61 ----
$this->setTable("mod_contacts_phonetypes");
$GLOBALS["CNT_contacts"]["title"] = $_SESSION["translate"]->it("Phone Types");
+ $GLOBALS["CNT_contacts"]["content"] .= $this->_menu();
$GLOBALS["CNT_contacts"]["content"] .= $this->getList("phonetypes");
}// END FUNC _listPhoneTypes
***************
*** 60,63 ****
--- 65,69 ----
$this->setTable("mod_contacts_addresstypes");
$GLOBALS["CNT_contacts"]["title"] = $_SESSION["translate"]->it("Address Types");
+ $GLOBALS["CNT_contacts"]["content"] .= $this->_menu();
$GLOBALS["CNT_contacts"]["content"] .= $this->getList("addresstypes");
}// END FUNC _listAddressTypes
***************
*** 76,83 ****
--- 82,99 ----
+ function _newCountry() {
+ $this->country = new CONTACTS_Country;
+ $_REQUEST["CONTACTS_Country_OP"] = "edit";
+ }// END FUNC _newCountry
+
+
function action() {
switch($_REQUEST["CONTACTS_MAN_OP"]) {
case "new":
$this->_new();
+ break;
+
+ case "newcountry":
+ $this->_newCountry();
break;
|