reformatting

This commit is contained in:
Roland Gruber 2008-08-23 16:08:50 +00:00
parent e83ede210a
commit f20f468dbb
1 changed files with 43 additions and 39 deletions

View File

@ -86,35 +86,35 @@ class shadowAccount extends baseModule {
$return['profile_options'] = array( $return['profile_options'] = array(
// password warning // password warning
array( array(
0 => array('kind' => 'text', 'text' => _('Password warning')), array('kind' => 'text', 'text' => _('Password warning')),
1 => array('kind' => 'input', 'name' => 'shadowAccount_shadowWarning', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => ""), array('kind' => 'input', 'name' => 'shadowAccount_shadowWarning', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => ""),
2 => array('kind' => 'help', 'value' => 'shadowWarning')), array('kind' => 'help', 'value' => 'shadowWarning')),
// password expiration // password expiration
array( array(
0 => array('kind' => 'text', 'text' => _('Password expiration')), array('kind' => 'text', 'text' => _('Password expiration')),
1 => array('kind' => 'input', 'name' => 'shadowAccount_shadowInactive', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => ""), array('kind' => 'input', 'name' => 'shadowAccount_shadowInactive', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => ""),
2 => array('kind' => 'help', 'value' => 'shadowInactive')), array('kind' => 'help', 'value' => 'shadowInactive')),
// minimum password age // minimum password age
array( array(
0 => array('kind' => 'text', 'text' => _('Minimum password age')), array('kind' => 'text', 'text' => _('Minimum password age')),
1 => array('kind' => 'input', 'name' => 'shadowAccount_shadowMin', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => ""), array('kind' => 'input', 'name' => 'shadowAccount_shadowMin', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => ""),
2 => array('kind' => 'help', 'value' => 'shadowMin')), array('kind' => 'help', 'value' => 'shadowMin')),
// maximum password age // maximum password age
array( array(
0 => array('kind' => 'text', 'text' => _('Maximum password age')), array('kind' => 'text', 'text' => _('Maximum password age')),
1 => array('kind' => 'input', 'name' => 'shadowAccount_shadowMax', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => ""), array('kind' => 'input', 'name' => 'shadowAccount_shadowMax', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => ""),
2 => array('kind' => 'help', 'value' => 'shadowMax')), array('kind' => 'help', 'value' => 'shadowMax')),
// expiration date // expiration date
array( array(
0 => array('kind' => 'text', 'text' => _('Account expiration date')), array('kind' => 'text', 'text' => _('Account expiration date')),
1 => array('kind' => 'table', 'value' => array( array('kind' => 'table', 'value' => array(
0 => array ( array (
0 => array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_day', 'options' => $day, 'options_selected' => array('1')), array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_day', 'options' => $day, 'options_selected' => array('1')),
1 => array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_mon', 'options' => $mon, 'options_selected' => array('1')), array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_mon', 'options' => $mon, 'options_selected' => array('1')),
2 => array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_yea', 'options' => $year, 'options_selected' => array('2030')) array('kind' => 'select', 'name' => 'shadowAccount_shadowExpire_yea', 'options' => $year, 'options_selected' => array('2030'))
) )
)), )),
2 => array('kind' => 'help', 'value' => 'shadowExpire')) array('kind' => 'help', 'value' => 'shadowExpire'))
); );
// profile checks // profile checks
$return['profile_checks']['shadowAccount_shadowMin'] = array( $return['profile_checks']['shadowAccount_shadowMin'] = array(
@ -266,24 +266,28 @@ class shadowAccount extends baseModule {
if (isset($this->attributes['shadowWarning'][0])) { if (isset($this->attributes['shadowWarning'][0])) {
$shWarning = $this->attributes['shadowWarning'][0]; $shWarning = $this->attributes['shadowWarning'][0];
} }
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password warning') ), $return[] = array(
1 => array ( 'kind' => 'input', 'name' => 'shadowWarning', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => $shWarning), array('kind' => 'text', 'text' => _('Password warning')),
2 => array ( 'kind' => 'help', 'value' => 'shadowWarning' )); array('kind' => 'input', 'name' => 'shadowWarning', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => $shWarning),
array('kind' => 'help', 'value' => 'shadowWarning'));
$shPwdExpiration = ''; $shPwdExpiration = '';
if (isset($this->attributes['shadowInactive'][0])) $shPwdExpiration = $this->attributes['shadowInactive'][0]; if (isset($this->attributes['shadowInactive'][0])) $shPwdExpiration = $this->attributes['shadowInactive'][0];
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password expiration') ), $return[] = array(
1 => array ( 'kind' => 'input', 'name' => 'shadowInactive', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => $shPwdExpiration), array('kind' => 'text', 'text' => _('Password expiration')),
2 => array ( 'kind' => 'help', 'value' => 'shadowInactive' )); array('kind' => 'input', 'name' => 'shadowInactive', 'type' => 'text', 'size' => '5', 'maxlength' => '4', 'value' => $shPwdExpiration),
array('kind' => 'help', 'value' => 'shadowInactive'));
$shMinAge = ''; $shMinAge = '';
if (isset($this->attributes['shadowMin'][0])) $shMinAge = $this->attributes['shadowMin'][0]; if (isset($this->attributes['shadowMin'][0])) $shMinAge = $this->attributes['shadowMin'][0];
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Minimum password age') ), $return[] = array(
1 => array ( 'kind' => 'input', 'name' => 'shadowMin', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $shMinAge), array('kind' => 'text', 'text' => _('Minimum password age')),
2 => array ( 'kind' => 'help', 'value' => 'shadowMin' )); array('kind' => 'input', 'name' => 'shadowMin', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $shMinAge),
array('kind' => 'help', 'value' => 'shadowMin'));
$shMaxAge = ''; $shMaxAge = '';
if (isset($this->attributes['shadowMax'][0])) $shMaxAge = $this->attributes['shadowMax'][0]; if (isset($this->attributes['shadowMax'][0])) $shMaxAge = $this->attributes['shadowMax'][0];
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Maximum password age') ), $return[] = array(
1 => array ( 'kind' => 'input', 'name' => 'shadowMax', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $shMaxAge), array('kind' => 'text', 'text' => _('Maximum password age')),
2 => array ( 'kind' => 'help', 'value' => 'shadowMax' )); array('kind' => 'input', 'name' => 'shadowMax', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $shMaxAge),
array('kind' => 'help', 'value' => 'shadowMax'));
$expirationDate = "     -      "; $expirationDate = "     -      ";
if (isset($this->attributes['shadowExpire'][0])) { if (isset($this->attributes['shadowExpire'][0])) {
@ -337,14 +341,14 @@ class shadowAccount extends baseModule {
for ( $i=1; $i<=31; $i++ ) $mday[] = $i; for ( $i=1; $i<=31; $i++ ) $mday[] = $i;
for ( $i=1; $i<=12; $i++ ) $mon[] = $i; for ( $i=1; $i<=12; $i++ ) $mon[] = $i;
for ( $i=2003; $i<=2030; $i++ ) $year[] = $i; for ( $i=2003; $i<=2030; $i++ ) $year[] = $i;
$return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Account expiration date') ), $return[] = array(
1 => array ( 'kind' => 'table', 'value' => array ( 0 => array ( 0 => array ( 'kind' => 'select', 'name' => 'shadowExpire_day', array('kind' => 'text', 'text' => _('Account expiration date')),
'options' => $mday, 'options_selected' => $date['mday']), array('kind' => 'table', 'value' => array(
1 => array ( 'kind' => 'select', 'name' => 'shadowExpire_mon', array(
'options' => $mon, 'options_selected' => $date['mon']), array('kind' => 'select', 'name' => 'shadowExpire_day', 'options' => $mday, 'options_selected' => $date['mday']),
2 => array ( 'kind' => 'select', 'name' => 'shadowExpire_yea', array('kind' => 'select', 'name' => 'shadowExpire_mon', 'options' => $mon, 'options_selected' => $date['mon']),
'options' => $year, 'options_selected' => $date['year'])))), array('kind' => 'select', 'name' => 'shadowExpire_yea', 'options' => $year, 'options_selected' => $date['year'])))),
2 => array ( 'kind' => 'help', 'value' => 'shadowExpire' )); array('kind' => 'help', 'value' => 'shadowExpire'));
$buttons = array(); $buttons = array();
$buttons[] = array('kind' => 'input', 'name' => 'form_subpage_shadowAccount_attributes_change', 'type' => 'submit', 'value' => _('Change')); $buttons[] = array('kind' => 'input', 'name' => 'form_subpage_shadowAccount_attributes_change', 'type' => 'submit', 'value' => _('Change'));
if (isset($this->attributes['shadowExpire'][0])) { if (isset($this->attributes['shadowExpire'][0])) {