Validation du champs Shell

tags/ipasserelle-base-0.2.65-1
Daniel Berteaud 13 years ago
parent db39f8e39c
commit 464ed3c13a
  1. 4
      root/etc/e-smith/locale/fr/etc/e-smith/web/functions/userinfo
  2. 2
      root/etc/e-smith/web/functions/userinfo
  3. 9
      root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/userinfo.pm

@ -107,4 +107,8 @@
<base>DIR_DOES_NOT_EXIST</base>
<trans>Ce répertoire n'existe pas</trans>
</entry>
<entry>
<base>IS_NOT_AN_EXECUTABLE</base>
<trans>Veuillez sélectionner un exécutable</trans>
</entry>
</lexicon>

@ -135,7 +135,7 @@ __DATA__
<label>URL</label>
</field>
<field type="text" size="30" id="Shell"
value="get_ldap_value('Shell')">
value="get_ldap_value('Shell')" validation="exec_exists">
<label>SHELL</label>
</field>
<field type="text" size="30" id="DesktopShell"

@ -243,4 +243,13 @@ sub dir_exists {
return $ret;
}
sub exec_exists {
my ($self, $field) = @_;
my $ret = $self->localise('IS_NOT_AN_EXECUTABLE');
$ret = 'OK' if (-x "$field");
return $ret;
}
1;

Loading…
Cancel
Save