Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed distrib order and fixed notes not adding. Condensed form.

  • Loading branch information...
commit 8fbef8cc6b88f288b67afa19f6bcb1e4e7c0daea 1 parent 8f23420
@styfle authored
Showing with 16 additions and 23 deletions.
  1. +4 −7 ajax.php
  2. +12 −16 include/forms.php
View
11 ajax.php
@@ -364,7 +364,7 @@ function getTable($sql) {
$column['bVisible'] = false;
} else if ($k == 'middle_name' || $k == 'street' || $k == 'state' || $k == 'zip' || contains($k, '_tag') || contains($k, 'property_')) {
$column['bVisible'] = false; // hide but still searchable
- } else if (contains($k,'notes') || contains($k,'phone') || contains($k,'email') || contains($k,'signed')) {
+ } else if (contains($k,'notes') || contains($k,'phone') || contains($k,'email') || contains($k,'signed') || contains($k, 'days')) {
$column['sClass'] = 'small';
}
$data['datatable']['aoColumns'][] = $column;
@@ -807,15 +807,12 @@ function dateToStr($dateStr) {
zip as 'Zip Code',
contact as 'Agency Contact',
phone as Phone,
- notes as Notes,
email as email_tag,
state as state_tag,
contact2 as contact2_tag,
phone2 as phone2_tag,
- daytime as 'Days/Hours Available',
- ( SELECT group_concat(d.name)
- FROM distribution_hours dh, days d
- WHERE dh.distribution_id = dis.id AND dh.day_id = d.id) day_tag
+ daytime as 'Days/Hours',
+ notes as Notes
FROM distributions dis;";
getTable($sql);
break;
@@ -847,7 +844,7 @@ function dateToStr($dateStr) {
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
- $notes = $_REQUEST['note'];
+ $notes = $_REQUEST['notes'];
$daytime = $_REQUEST['daytime'];
$sql = "Update distributions Set name='$name', contact='$contact', phone='$phone', contact2='$contact2', phone2='$phone2', email='$email', street='$street', city='$city', state='$state',zip='$zip', notes='$notes', daytime='$daytime' where id=$id";
$r = $db->q($sql);
View
28 include/forms.php
@@ -431,18 +431,18 @@ function options($id, $name, $data, $disabled=false) {
<td><input type="tel" name="phone" id="distribution7" required="required" pattern="\([0-9]{3}\) [0-9]{3}-[0-9]{4}" placeholder="(949) 555-1234" /></td>
</tr>
<tr>
- <td colspan="2"><label for="distribution11"><b>Secondary Contact</b></label></td>
- <td><label for="distribution12"><b>Secondary Phone</b></label></td>
+ <td colspan="2"><label for="distribution10"><b>Secondary Contact</b></label></td>
+ <td><label for="distribution11"><b>Secondary Phone</b></label></td>
</tr>
<tr>
- <td colspan="2"><input id="distribution11" name="contact2" type="text" size="20"/></td>
- <td><input type="tel" name="phone2" id="distribution12" pattern="\([0-9]{3}\) [0-9]{3}-[0-9]{4}" placeholder="(949) 555-1234" /></td>
+ <td colspan="2"><input id="distribution10" name="contact2" type="text" size="20"/></td>
+ <td><input type="tel" name="phone2" id="distribution11" pattern="\([0-9]{3}\) [0-9]{3}-[0-9]{4}" placeholder="(949) 555-1234" /></td>
</tr>
<tr>
- <td colspan="3"><label for="distribution9"><b>Email</b></label></td>
+ <td colspan="3"><label for="distribution8"><b>Email</b></label></td>
</tr>
<tr>
- <td colspan="3"><input type="text" name="email" id="distribution9" size="45" /></td>
+ <td colspan="3"><input type="text" name="email" id="distribution8" size="45" /></td>
</tr>
<tr>
<td colspan="3"><label for="distribution3"><b>Street</b></label></td>
@@ -452,25 +452,21 @@ function options($id, $name, $data, $disabled=false) {
</tr>
<tr>
<td><label for="distribution4"><b>City</b></label></td>
- <td><label for="distribution10"><b>State</b></label></td>
+ <td><label for="distribution9"><b>State</b></label></td>
<td><label for="distribution5"><b>Zip Code</b></label></td>
</tr>
<tr>
<td><input type="text" name="city" id="distribution4" required="required" /></td>
- <td><input type="text" name="state" id="distribution10" required="required" maxlength="2" pattern="[A-Z]{2}" style="width:50px" /></td>
+ <td><input type="text" name="state" id="distribution9" required="required" maxlength="2" pattern="[A-Z]{2}" style="width:50px" /></td>
<td><input type="text" name="zip" id="distribution5" require="required" maxlength="5" pattern="[0-9]{5}" style="width:90px;" /></td>
- </tr>
- <tr>
- <td colspan="8"><label for="distribution8"><b>Notes</b></label></td>
- </tr>
- <tr>
- <td colspan="8"><textarea name="note" id="distribution8" rows="5" cols="43"></textarea></td>
</tr>
<tr>
- <td colspan="8"><label for="distribution13"><b>Days/Hours of Availability</b></label></td>
+ <td><label for="distribution12"><b>Days/Hours of Availability</b></label></td>
+ <td colspan="2"><label for="distribution13"><b>Notes</b></label></td>
</tr>
<tr>
- <td colspan="8"><textarea name="daytime" id="distribution13" rows="5" cols="43"></textarea></td>
+ <td><textarea name="daytime" id="distribution12" rows="5" cols="43"></textarea></td>
+ <td colspan="2"><textarea name="notes" id="distribution13" rows="5" cols="43"></textarea></td>
</tr>
</table>

1 comment on commit 8fbef8c

@styfle
Owner

@tilucsi @dth1112 Sorry I removed your changes because they required Day/Time which is not the same as datetime.

Please sign in to comment.
Something went wrong with that request. Please try again.