Add expiration editing (#16)
This commit is contained in:
parent
e860a97bba
commit
02ce6205da
@ -105,6 +105,10 @@ switch ($VARS['action']) {
|
||||
$family->setState($state);
|
||||
$family->setZip($zip);
|
||||
|
||||
if (empty($VARS['date']) || strtotime($VARS['date']) === false) {
|
||||
returnToSender("invalid_parameters");
|
||||
}
|
||||
$family->setExpires(null, $VARS['date']);
|
||||
|
||||
$newsletter = $VARS['newsletter_method'];
|
||||
$membership_cost = 2500;
|
||||
|
@ -73,7 +73,7 @@ class Family {
|
||||
$this->zip = $f['zip'];
|
||||
$this->photo = $f['photo'] == 1;
|
||||
$this->newsletter = $f['newsletter'];
|
||||
$this->expires = $f['expires'];
|
||||
$this->expires = strtotime($f['expires']);
|
||||
|
||||
foreach ($children as $c) {
|
||||
$this->children[] = (new Child())->load($c);
|
||||
|
@ -162,6 +162,7 @@ if (empty($VARS['id']) || !$database->has('families', ['familyid' => $VARS['id']
|
||||
"label" => "Phone Number",
|
||||
"icon" => "fas fa-phone",
|
||||
"name" => "phone",
|
||||
"width" => 3,
|
||||
"maxlength" => 20,
|
||||
"value" => $family->getPhone()
|
||||
],
|
||||
@ -184,6 +185,14 @@ if (empty($VARS['id']) || !$database->has('families', ['familyid' => $VARS['id']
|
||||
"2" => "Paper ($35)",
|
||||
"3" => "Email and Paper ($35)"
|
||||
]
|
||||
],
|
||||
[
|
||||
"label" => "Membership Expiration",
|
||||
"icon" => "fas fa-calendar",
|
||||
"name" => "date",
|
||||
"type" => "date",
|
||||
"width" => 3,
|
||||
"value" => date("Y-m-d", $family->getExpires())
|
||||
]
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user