1,208
edits
Changes
→Family_Ident field
The Family_Ident field exists as a legacy field in the database that is no longer used by the application. We've added it back to the "Modify Info" screen. It is key to our family management that every student from the same family shares the same family_ident value.
The following page fragment plugin will add the family_ident field to the "Modify Info" screen along with a link to assign the next available Family ID when needed.*[[Media:Familyid_23.03.zip|Familyid_23.03.zip]]
The file needs to be placed installed via the Plugin Management Dashboard. It was enhanced during the PSUG Middle East & Africa conference in admin/students{| class="wikitable"|-! File (download and unzip) !! Code|-| [[Media:Modifydata.familyid.content.footer.zip|modifydata.familyid.content.footer.txt]] || <pre class="mw-collapsible mw-collapsed"><!-- create a hidden table with added rowsAmman, use jQuery Jordan to move the inserted rows to target table --><table id="familyidhiddentable" style="display: none;"><tr id="familyidrow"> <td class="bold">Family ID</td> <td><input type="text" id="familyidfield" name="[Students]Family_Ident" value=""> <correctly get a href="javascript:void(0)" id="usenextfamilyid"><strong>Copy next available Family ID: <span id="nextfamilyidval">~[tlist_sql;select true max(and ignore any alpha characters that may exist in your family_ident)+1 from students]~(maxFamilyID;t)[/tlist_sql]</span></strong> </td></tr></table><script>$j(function() { /* place the family id row at the beginning of the table */ $j("table:first").prepend($j("#familyidrow")); /* remove the hidden table */ $j("#familyidhiddentable").remove(); /* Function to add click listener to copy the next available ID */ $j("#usenextfamilyid").click(function() { if($j("#familyidfield").val() == "") { $j("#familyidfield").val( $j("#nextfamilyidval")field.html() ); } }); });</script></pre>|}
[[File:Familyidentscreenshot.png|frame|none|Family ID Screenshot]]