Skip to content

Commit

Permalink
form submit fix (#125)
Browse files Browse the repository at this point in the history
* added .txt extention to Database_JobTables

* tried to remove commas from $typeofworkstring

* edit

* added files back to forlder

* added alice's part

* xxx

* Delete Database_JobTables.txt

* comma strip

* Added Educator Job Table

Modified Database_JobTables to include Educator Table

* Updated Tooltip Descriptions

Changed the ears_tipped and pregnant_cats images to have a more meaningful description.

* updated login page

not sure if it'll show up correctly because I couldn't get to run in on my computer... I tested it by changing it to html instead of php..

* minor change to login

* merge problems..

* userprofile.css small modification

* create.account ext rename

* updated createaccount.php

* error msg box added

* Added a couple of tooltips

Tooltips to forms

* tooltip updates

* removed everthing

removed everything

* add everything

added everything back in

* buttons for "text ok" added to forms

* volunteerform

* volunteerform textok

* removed <<<<<HEAD

* small change so add 1 to db if textok is checked

* Rename Database_JobTables.txt to Database_JobTables

* a

* Rename Database_JobTables to Database_JobTables.txt

* a

a

* Added button on the side

Added button on the side to logout and go to catstats

* Add dropdown menu

Add dropdown menu with catstats and log out link

* Uploading the icon

Uploading icon

* updateprofile.php

* able to submit update to profile

* auto populate city&county by zip

* restrict zip to CA

* Update reportform.php

* Update reportform.php

* fixed city problem

* city fix

* Update reportform.php

* display form on checkbox

* email tooltip

* minor form updates

* caregiver/feeder update

* Update script.js

* form update #2

* form update #3

* search.php: removed colony name & ear tipped

* db: removed colony name & ear tipped

* forgot to remove eartipped

* form updates #4

* minor changes

* found it

* added "are there any kittens"

* added friendly/pet

* combined first & last name

* found error with first/last name

* basic Custom Query Builder

* undo

* custom query builder

partially working

* forgot to remove

* again

* custom query builder v2

* custom query builder v2

* Update search.php

* Update search.php

* minor search.php update

* comments1 fix

* reportform updates

* moved css to sacferals folder

* zip fix

* search.php update

* css fix

* map fix

* map fix

* one more try

* a

* map fix2

* custom query update

* report form update

* clean

* report form updates #2

* volunteer table update

* undo

* volunteer table updates

* db fix

added new values to wrong table lol

* db fix

* search.php fix

* oops

* oops#2

* #3

* update#4

* #5

* reportform update

* reportform update

* a

* update

* fixed not updating error

* update

* undo

* undo

* total records

* updateprofile.php updated

* report form update

* updateprofile udpate

* small update to updateprofile.php

added check for empty pwd

* forgot =

* ahhh

* fix =

* reports can now be seen by triage and master

* edit

* Canned Queries

Canned Queries

* Canned Queries Table

* canned query

* table for canned queries in db

* create new query

* Navbar

* update

* cannedquery added to db.txt

* manual query added & renaimed hr

* css update

* reportform & search update

* reportform update

* copy function added

* oops

* volunteerform updated & validation added

* a

* a

* undo

* message when copy successful

* updateprofile update

* authentication update

* email req

* auth fix

* form submit fix
  • Loading branch information
vitadub authored and JustinLangshaw committed Nov 23, 2017
1 parent a9debd7 commit c18fea0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
13 changes: 0 additions & 13 deletions sacferals/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ $(document).ready(function () {
else
$('.todisplay').fadeOut('fast');
});

//for volunteerform and triage updateprofile
$('form').submit(function(){ //dont submit form (clear out) if work not chosen
var work = $('#workchecks').find('input');
for(var i=0; i<work.length; i++){
if(work[i].checked) return true;
}

$('#worklabel').attr('style','color: red');
$('#workerror').html('<small>Must select at least one</small>');
$('#workerror').removeAttr('hidden');
return false;
});
});


Expand Down
14 changes: 13 additions & 1 deletion sacferals/updateprofile.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function formatPhone(phoneId) {
</div>
</div>
<?php
}
}
if($level==2){ //if triage user
?>
<hr>
Expand Down Expand Up @@ -377,6 +377,18 @@ function formatPhone(phoneId) {
}
}
});

$('#updateform').submit(function(){ //dont submit form if at least one isn't selected
var work = $('#workchecks').find('input');
for(var i=0; i<work.length; i++){
if(work[i].checked) return true;
}

$('#worklabel').attr('style','color: red');
$('#workerror').html('<small>Must select at least one</small>');
$('#workerror').removeAttr('hidden');
return false;
});
});
</script>

Expand Down
16 changes: 16 additions & 0 deletions sacferals/volunteerform.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,21 @@ function formatPhone(phoneId) {
</div>
</form>

<script type="text/javascript">
$(document).ready(function(){
$('#volform').submit(function(){ //dont submit form if at least one isn't selected
var work = $('#workchecks').find('input');
for(var i=0; i<work.length; i++){
if(work[i].checked) return true;
}

$('#worklabel').attr('style','color: red');
$('#workerror').html('<small>Must select at least one</small>');
$('#workerror').removeAttr('hidden');
return false;
});
});
</script>

</body>
</html>

0 comments on commit c18fea0

Please sign in to comment.