updated docs about module_complete() and module_ready()

This commit is contained in:
Roland Gruber 2005-08-13 09:14:05 +00:00
parent 9c71e24ac1
commit 568bb97cc1
2 changed files with 21 additions and 13 deletions

View File

@ -198,6 +198,10 @@ This function is called <span style="font-weight: bold;">process_&lt;page
name&gt;()</span> where <span style="font-style: italic;">&lt;page name&gt;()</span> where <span style="font-style: italic;">&lt;page
name&gt;</span> is the name of your subpage.<br> name&gt;</span> is the name of your subpage.<br>
<br> <br>
If all input data is ok then return "0" or an array containing no error
message. If you return one or more error messages then the user will be
redirected to your page.<br>
<br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br
style="font-weight: bold; text-decoration: underline;"> style="font-weight: bold; text-decoration: underline;">
<br> <br>
@ -305,14 +309,20 @@ $this-&gt;inputCorrect = true;<br>
<h2>5. Defining that your module is ready for LDAP add/modify</h2> <h2>5. Defining that your module is ready for LDAP add/modify</h2>
Before a new account can be created or modified all modules are asked Before a new account can be created or modified all modules are asked
if they are ready.<br> if they are ready.<br>
There are two functions which control the module status. The <span <br>
style="font-weight: bold;">module_ready()</span> function has to There are two functions which control the module status:<br>
The <span style="font-weight: bold;">module_ready()</span> function
has to
return <span style="font-style: italic;">true</span> if the user may return <span style="font-style: italic;">true</span> if the user may
move to another module page. If it is <span style="font-style: italic;">false</span> move to your module page. If it is <span style="font-style: italic;">false</span>
the user will be redirected to your module page. The second function is the user will be shown an error message that your module is not yet
ready. You can use this if your module depends on input data from other
modules (e.g. you need the user name from posixAccount first).<br>
The second function is
<span style="font-weight: bold;">module_complete()</span>. The user <span style="font-weight: bold;">module_complete()</span>. The user
cannot do the LDAP operation if one or modules return <span cannot do the LDAP operation if one or more modules return <span
style="font-style: italic;">false</span>.<br> style="font-style: italic;">false</span>. This defines if all needed
input data for your module was entered.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br
style="font-weight: bold; text-decoration: underline;"> style="font-weight: bold; text-decoration: underline;">

View File

@ -529,7 +529,7 @@ several helper functions.<br>
</table> </table>
<br> <br>
Your module might depend on input of other modules. This function Your module might depend on input of other modules. This function
determines if the module button on the account page is active or not.<br> determines if the user can change to your module page or not.<br>
The return value is <span style="font-weight: bold;">true</span> if The return value is <span style="font-weight: bold;">true</span> if
your module accepts input, otherwise <span style="font-weight: bold;">false</span>.<br> your module accepts input, otherwise <span style="font-weight: bold;">false</span>.<br>
<br> <br>
@ -545,12 +545,10 @@ your module accepts input, otherwise <span style="font-weight: bold;">false</spa
</tbody> </tbody>
</table> </table>
<br> <br>
This function is called after your module has processed the POST input This function tells LAM if it can create/modify the LDAP account. If
data.<br> your module needs any additional input then set this to <span
If there was an input error and you want to display a page again then style="font-weight: bold;">false</span>. The user will be notified
return <span style="font-weight: bold;">false</span>. If <span that your module needs more input.<br>
style="font-weight: bold;">true</span> is returned the next module
page will be displayed.<br>
<br> <br>
<h3>2.2.4. get_help</h3> <h3>2.2.4. get_help</h3>
<br> <br>