Add LSdefaut copyable feature and use it in showTechInfo

This commit is contained in:
Benjamin Renard 2021-04-14 15:46:36 +02:00
parent aa48cd3980
commit 639f46d8a4
7 changed files with 164 additions and 112 deletions

View file

@ -354,7 +354,7 @@ class LSsession {
*/ */
private static function startLStemplate() { private static function startLStemplate() {
if ( self :: loadLSclass('LStemplate') ) { if ( self :: loadLSclass('LStemplate') ) {
return LStemplate :: start( if (!LStemplate :: start(
array( array(
'smarty_path' => LSconfig :: get('Smarty'), 'smarty_path' => LSconfig :: get('Smarty'),
'template_dir' => LS_ROOT_DIR . '/'. LS_TEMPLATES_DIR, 'template_dir' => LS_ROOT_DIR . '/'. LS_TEMPLATES_DIR,
@ -366,7 +366,16 @@ class LSsession {
'debug' => LSdebug, 'debug' => LSdebug,
'debug_smarty' => (isset($_REQUEST) && isset($_REQUEST['LStemplate_debug'])), 'debug_smarty' => (isset($_REQUEST) && isset($_REQUEST['LStemplate_debug'])),
) )
))
return False;
LStemplate :: addHelpInfo(
'LSdefault',
array(
'copy_to_clipboard' => _('Copy to clipboard'),
'copied' => _('Copied!'),
)
); );
return True;
} }
return False; return False;
} }

View file

@ -74,6 +74,17 @@ var LSdefault = new Class({
this.initializeLang(); this.initializeLang();
document.getElements('.copyable').each(function(el) {
var btn = new Element('img');
btn.setProperties({
src: this.imagePath('copy')
});
btn.addClass('btn');
btn.injectAfter(el);
btn.addEvent('click',this.onCopyBtnClick.bind(this, {btn: btn, element: el}));
this.addHelpInfo(btn, 'LSdefault', 'copy_to_clipboard');
}, this);
this.toggle_menu = $('toggle-menu'); this.toggle_menu = $('toggle-menu');
if (this.toggle_menu) { if (this.toggle_menu) {
this.toggle_menu.addEvent('click', this.toggleMenu.bind(this)); this.toggle_menu.addEvent('click', this.toggleMenu.bind(this));
@ -239,29 +250,30 @@ var LSdefault = new Class({
return new Hash(); return new Hash();
}, },
addHelpInfo: function(el,group,name) { addHelpInfo: function(el, group, name) {
if ($type(this.LSjsConfig['helpInfo'])) { var helpInfo = this.getHelpInfo(group, name);
if ($type(el)=='element') { if (helpInfo && $type(el)=='element') {
if ($type(this.LSjsConfig['helpInfo'][group])) { this.addTip(el);
if ($type(this.LSjsConfig['helpInfo'][group][name])) { el.store('tip:title',this.LSjsConfig.helpInfo[group][name]);
this.addTip(el);
el.store('tip:title',this.LSjsConfig['helpInfo'][group][name]);
}
}
}
} }
}, },
setHelpInfo: function(el,group,name) { getHelpInfo: function(group, name) {
if ($type(this.LSjsConfig['helpInfo'])) { if ($type(this.LSjsConfig.helpInfo)) {
if ($type(el)=='element') { if ($type(this.LSjsConfig.helpInfo[group])) {
if ($type(this.LSjsConfig['helpInfo'][group])) { if ($type(this.LSjsConfig.helpInfo[group][name])) {
if ($type(this.LSjsConfig['helpInfo'][group][name])) { return this.LSjsConfig.helpInfo[group][name];
el.store('tip:title',this.LSjsConfig['helpInfo'][group][name]);
}
} }
} }
} }
return null;
},
setHelpInfo: function(el, group, name) {
var helpInfo = this.getHelpInfo(group, name);
if (helpInfo && $type(el)=='element') {
el.store('tip:title', helpInfo);
}
}, },
addTip: function(el) { addTip: function(el) {
@ -288,6 +300,16 @@ var LSdefault = new Class({
toggleMenu: function() { toggleMenu: function() {
$('main').toggleClass('menu-visible'); $('main').toggleClass('menu-visible');
},
onCopyBtnClick: function(params) {
var txt = new Element('textarea');
txt.value = params.element.textContent;
txt.injectInside(document.body);
txt.select();
document.execCommand("copy");
txt.remove();
this.LSinfos.addInfo(this.getHelpInfo('LSdefault', 'copied'), true);
} }
}); });

View file

@ -100,7 +100,8 @@ var LSinfosBox = new Class({
} }
}, },
addInfo: function(html) { addInfo: function(html, clear) {
if (clear) this.clear();
var ul = this.content.getLast("ul"); var ul = this.content.getLast("ul");
var add = 1; var add = 1;
if (!$type(ul)) { if (!$type(ul)) {
@ -151,5 +152,9 @@ var LSinfosBox = new Class({
else { else {
this.displayInUl(html); this.displayInUl(html);
} }
},
clear: function() {
this.content.empty();
} }
}); });

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n" "Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2021-03-16 17:50+0100\n" "PO-Revision-Date: 2021-04-14 15:39+0200\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n" "Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise." "Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n" "org>\n"
@ -441,83 +441,83 @@ msgstr "LSformRule_%{type} : Le paramètre %{param} n'est pas défini."
msgid "LSformRule: Unknown rule type %{type}." msgid "LSformRule: Unknown rule type %{type}."
msgstr "LSformRule : Type de règle %{type} inconnu." msgstr "LSformRule : Type de règle %{type} inconnu."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:240 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:244
msgid "Failed to set post data on creation form." msgid "Failed to set post data on creation form."
msgstr "Impossible de définir les données dans le formulaire de création." msgstr "Impossible de définir les données dans le formulaire de création."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:246 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:250
msgid "Error validating creation form." msgid "Error validating creation form."
msgstr "Une erreur est survenue en validant le formulaire de création." msgstr "Une erreur est survenue en validant le formulaire de création."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:251 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:255
msgid "Failed to validate object data." msgid "Failed to validate object data."
msgstr "Impossible de valider les données de l'objet." msgstr "Impossible de valider les données de l'objet."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:258 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:262
msgid "Failed to generate DN for this object." msgid "Failed to generate DN for this object."
msgstr "Impossible de générer le DN de cet objet." msgstr "Impossible de générer le DN de cet objet."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:272 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:276
msgid "Error creating object on LDAP server." msgid "Error creating object on LDAP server."
msgstr "Une erreur est survenue en création cet objet dans l'annuaire LDAP." msgstr "Une erreur est survenue en création cet objet dans l'annuaire LDAP."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:278 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:282
msgid "An object already exist on LDAP server with DN %{dn}." msgid "An object already exist on LDAP server with DN %{dn}."
msgstr "Un objet existe déjà dans l'annuaire LDAP avec le DN %{dn}." msgstr "Un objet existe déjà dans l'annuaire LDAP avec le DN %{dn}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:289 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:293
msgid "" msgid ""
"Failed to load existing object %{dn} from LDAP server. Can't update object." "Failed to load existing object %{dn} from LDAP server. Can't update object."
msgstr "" msgstr ""
"Impossible de charger l'objet existant %{dn} depuis l'annuaire LDAP. " "Impossible de charger l'objet existant %{dn} depuis l'annuaire LDAP. "
"Impossible de mettre à jour cet objet." "Impossible de mettre à jour cet objet."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:297 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:301
msgid "Failed to set post data on update form." msgid "Failed to set post data on update form."
msgstr "Impossible de définir les données dans le formulaire de mise à jours." msgstr "Impossible de définir les données dans le formulaire de mise à jours."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:303 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:307
msgid "Error validating update form." msgid "Error validating update form."
msgstr "Une erreur est survenue en validant le formulaire de mise à jour." msgstr "Une erreur est survenue en validant le formulaire de mise à jour."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:313 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:317
msgid "Error updating object on LDAP server." msgid "Error updating object on LDAP server."
msgstr "" msgstr ""
"Une erreur est survenue en mettant à jour cet objet dans l'annuaire LDAP." "Une erreur est survenue en mettant à jour cet objet dans l'annuaire LDAP."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:681 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:689
msgid "LSio: Post data not found or not completed." msgid "LSio: Post data not found or not completed."
msgstr "LSio : les données transmises sont introuvables ou incomplètes." msgstr "LSio : les données transmises sont introuvables ou incomplètes."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:684 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:692
msgid "LSio: object type invalid." msgid "LSio: object type invalid."
msgstr "LSio : type d'objet invalide." msgstr "LSio : type d'objet invalide."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:687 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:695
msgid "LSio: input/output format %{format} invalid." msgid "LSio: input/output format %{format} invalid."
msgstr "LSio : Le format d'entrée/sortie %{format} est invalide." msgstr "LSio : Le format d'entrée/sortie %{format} est invalide."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:690 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:698
msgid "LSio: Fail to initialize input/output driver." msgid "LSio: Fail to initialize input/output driver."
msgstr "LSio : Impossible d'initialiser le pilote d'entrée/sortie." msgstr "LSio : Impossible d'initialiser le pilote d'entrée/sortie."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:693 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:701
msgid "LSio: Fail to load objects's data from input file." msgid "LSio: Fail to load objects's data from input file."
msgstr "" msgstr ""
"LSio: Impossible de charger les données des objets depuis le fichier " "LSio: Impossible de charger les données des objets depuis le fichier "
"d'import." "d'import."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:696 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:704
msgid "LSio: Fail to load objects's data to export from LDAP directory." msgid "LSio: Fail to load objects's data to export from LDAP directory."
msgstr "" msgstr ""
"LSio: Impossible de charger les données des objets à exporter depuis " "LSio: Impossible de charger les données des objets à exporter depuis "
"l'annuaire LDAP." "l'annuaire LDAP."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:699 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:707
msgid "LSio: Fail to export objects's data." msgid "LSio: Fail to export objects's data."
msgstr "LSio: Impossible d'exporter les données des objets." msgstr "LSio: Impossible d'exporter les données des objets."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattr_ldap_pwdHistory.php:76 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattr_ldap_pwdHistory.php:77
msgid "Unknown (%{raw_value})" msgid "Unknown (%{raw_value})"
msgstr "Inconnue (%{raw_value})" msgstr "Inconnue (%{raw_value})"
@ -556,7 +556,7 @@ msgid "Attribute"
msgstr "Attribut" msgstr "Attribut"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_mailQuota.php:101 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_mailQuota.php:101
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:126 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:135
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_quota.php:102 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_quota.php:102
#: templates/default/LSformElement_mailQuota_field.tpl:17 #: templates/default/LSformElement_mailQuota_field.tpl:17
msgid "Incorrect value" msgid "Incorrect value"
@ -651,7 +651,7 @@ msgstr "Affichier la clé en entier."
msgid "Unknown type" msgid "Unknown type"
msgstr "Type inconnu" msgstr "Type inconnu"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:234 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:243
msgid "" msgid ""
"LSformElement_valueWithUnit : Units configuration data are missing for the " "LSformElement_valueWithUnit : Units configuration data are missing for the "
"attribute %{attr}." "attribute %{attr}."
@ -770,31 +770,39 @@ msgstr ""
"LStemplate : Le fichier de template '%{tpl}' est maintenant déprécié. Merci " "LStemplate : Le fichier de template '%{tpl}' est maintenant déprécié. Merci "
"de mettre à jour vos templates en vous référant à la documentation." "de mettre à jour vos templates en vous référant à la documentation."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:426 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:378
msgid "Copy to clipboard"
msgstr "Copier dans le presse-papier"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:379
msgid "Copied!"
msgstr "Copié !"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:433
msgid "Smarty - An exception occured displaying template '%{template}'" msgid "Smarty - An exception occured displaying template '%{template}'"
msgstr "" msgstr ""
"Smarty - Un erreur est survenue en affichant le modèle de page '%{template}'." "Smarty - Un erreur est survenue en affichant le modèle de page '%{template}'."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:446 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:453
msgid "Smarty - An exception occured fetching template '%{template}'" msgid "Smarty - An exception occured fetching template '%{template}'"
msgstr "Smarty - Un erreur est survenue en générant le modèle '%{template}'." msgstr "Smarty - Un erreur est survenue en générant le modèle '%{template}'."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:461 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:468
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:471 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:478
msgid "A fatal error occured. If problem persist, please contact support." msgid "A fatal error occured. If problem persist, please contact support."
msgstr "" msgstr ""
"Une erreur irrécupérable est survenue. Si le problème persiste, merci de " "Une erreur irrécupérable est survenue. Si le problème persiste, merci de "
"contacter le support." "contacter le support."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:470 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:477
msgid "A fatal error occured." msgid "A fatal error occured."
msgstr "Une erreur fatale est survenue." msgstr "Une erreur fatale est survenue."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:670 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:677
msgid "LStemplate : Template %{file} not found." msgid "LStemplate : Template %{file} not found."
msgstr "LStemplate : le template %{file} est introuvable." msgstr "LStemplate : le template %{file} est introuvable."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:673 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:680
msgid "" msgid ""
"LStemplate : Fail to execute trigger %{callable} on event %{event} : is not " "LStemplate : Fail to execute trigger %{callable} on event %{event} : is not "
"callable." "callable."
@ -802,7 +810,7 @@ msgstr ""
"LStemplate : Échec d'exécution du déclencheur %{callable} lors de événement " "LStemplate : Échec d'exécution du déclencheur %{callable} lors de événement "
"%{event} : il n'est pas un callable." "%{event} : il n'est pas un callable."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:676 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:683
msgid "" msgid ""
"LStemplate : Error during the execution of the trigger %{callable} on event " "LStemplate : Error during the execution of the trigger %{callable} on event "
"%{event}." "%{event}."
@ -898,11 +906,11 @@ msgstr ""
"LSformRule_differentPassword : Les autres attributs mots de passe doivent " "LSformRule_differentPassword : Les autres attributs mots de passe doivent "
"utiliser LSattr_ldap :: password. Ce n'est pas le cas de l'attribut %{attr}." "utiliser LSattr_ldap :: password. Ce n'est pas le cas de l'attribut %{attr}."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:256 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:261
msgid "The value of field %{label} is invalid." msgid "The value of field %{label} is invalid."
msgstr "La valeur du champ %{label} est incorrecte." msgstr "La valeur du champ %{label} est incorrecte."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:744 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:754
msgid "" msgid ""
"LSattribute : Attribute %{attr} : LDAP or HTML types unknow (LDAP = %{ldap} " "LSattribute : Attribute %{attr} : LDAP or HTML types unknow (LDAP = %{ldap} "
"& HTML = %{html})." "& HTML = %{html})."
@ -910,7 +918,7 @@ msgstr ""
"LSattribute : Attribut %{attr} : Les types LDAP ou HTML sont inconnus (LDAP " "LSattribute : Attribut %{attr} : Les types LDAP ou HTML sont inconnus (LDAP "
"= %{ldap} & HTML = %{html})." "= %{ldap} & HTML = %{html})."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:747 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:757
msgid "" msgid ""
"LSattribute : The function %{func} to display the attribute %{attr} is " "LSattribute : The function %{func} to display the attribute %{attr} is "
"unknow." "unknow."
@ -918,14 +926,14 @@ msgstr ""
"LSattribute : La fonction %{func} pour afficher l'attribut %{attr} est " "LSattribute : La fonction %{func} pour afficher l'attribut %{attr} est "
"inconnue." "inconnue."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:750 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:760
msgid "" msgid ""
"LSattribute : The rule %{rule} to validate the attribute %{attr} is unknow." "LSattribute : The rule %{rule} to validate the attribute %{attr} is unknow."
msgstr "" msgstr ""
"LSattribute : La règle %{rule} de validation de l'attribut %{attr} n'existe " "LSattribute : La règle %{rule} de validation de l'attribut %{attr} n'existe "
"pas." "pas."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:753 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:763
msgid "" msgid ""
"LSattribute : Configuration data to verify the attribute %{attr} are " "LSattribute : Configuration data to verify the attribute %{attr} are "
"incorrect." "incorrect."
@ -933,22 +941,22 @@ msgstr ""
"LSattribute : Les données de configuration pour vérifier l'attribut %{attr} " "LSattribute : Les données de configuration pour vérifier l'attribut %{attr} "
"sont incorrecte." "sont incorrecte."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:756 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:766
msgid "" msgid ""
"LSattribute : The function %{func} to save the attribute %{attr} is unknow." "LSattribute : The function %{func} to save the attribute %{attr} is unknow."
msgstr "" msgstr ""
"LSattribute : La fonction %{func} pour sauvegarder l'attribut %{attr} est " "LSattribute : La fonction %{func} pour sauvegarder l'attribut %{attr} est "
"inconnue." "inconnue."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:759 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:769
msgid "LSattribute : The value of the attribute %{attr} can't be generated." msgid "LSattribute : The value of the attribute %{attr} can't be generated."
msgstr "LSattribute : La valeur de l'attribut %{attr} ne peut être générée." msgstr "LSattribute : La valeur de l'attribut %{attr} ne peut être générée."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:762 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:772
msgid "LSattribute : Generation of the attribute %{attr} failed." msgid "LSattribute : Generation of the attribute %{attr} failed."
msgstr "LSattribute : La génération de l'attribut %{attr} a échouée." msgstr "LSattribute : La génération de l'attribut %{attr} a échouée."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:765 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:775
msgid "" msgid ""
"LSattribute : Generation of the attribute %{attr} did not return a correct " "LSattribute : Generation of the attribute %{attr} did not return a correct "
"value." "value."
@ -956,7 +964,7 @@ msgstr ""
"LSattribute : La génération de l'attribut %{attr} n'a pas retournée de " "LSattribute : La génération de l'attribut %{attr} n'a pas retournée de "
"valeur correcte." "valeur correcte."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:768 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:778
msgid "" msgid ""
"LSattribute : The attr_%{type} of the attribute %{name} is not yet defined." "LSattribute : The attr_%{type} of the attribute %{name} is not yet defined."
msgstr "" msgstr ""
@ -2380,7 +2388,7 @@ msgid "Data entry form"
msgstr "Masque de saisie" msgstr "Masque de saisie"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:955 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:955
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1673 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1702
msgid "Object has been added." msgid "Object has been added."
msgstr "L'objet a été ajouté." msgstr "L'objet a été ajouté."
@ -2389,17 +2397,17 @@ msgid "My account"
msgstr "Mon compte" msgstr "Mon compte"
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1155 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1155
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1847 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1876
msgid "The object has been partially modified." msgid "The object has been partially modified."
msgstr "L'objet a été partiellement modifié." msgstr "L'objet a été partiellement modifié."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1158 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1158
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1850 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1879
msgid "The object has been modified successfully." msgid "The object has been modified successfully."
msgstr "L'objet a bien été modifié." msgstr "L'objet a bien été modifié."
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1273 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1273
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1891 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1920
msgid "%{objectname} has been successfully deleted." msgid "%{objectname} has been successfully deleted."
msgstr "%{objectname} a bien été supprimé." msgstr "%{objectname} a bien été supprimé."

View file

@ -364,76 +364,76 @@ msgstr ""
msgid "LSformRule: Unknown rule type %{type}." msgid "LSformRule: Unknown rule type %{type}."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:240 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:244
msgid "Failed to set post data on creation form." msgid "Failed to set post data on creation form."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:246 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:250
msgid "Error validating creation form." msgid "Error validating creation form."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:251 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:255
msgid "Failed to validate object data." msgid "Failed to validate object data."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:258 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:262
msgid "Failed to generate DN for this object." msgid "Failed to generate DN for this object."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:272 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:276
msgid "Error creating object on LDAP server." msgid "Error creating object on LDAP server."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:278 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:282
msgid "An object already exist on LDAP server with DN %{dn}." msgid "An object already exist on LDAP server with DN %{dn}."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:289 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:293
msgid "" msgid ""
"Failed to load existing object %{dn} from LDAP server. Can't update object." "Failed to load existing object %{dn} from LDAP server. Can't update object."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:297 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:301
msgid "Failed to set post data on update form." msgid "Failed to set post data on update form."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:303 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:307
msgid "Error validating update form." msgid "Error validating update form."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:313 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:317
msgid "Error updating object on LDAP server." msgid "Error updating object on LDAP server."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:681 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:689
msgid "LSio: Post data not found or not completed." msgid "LSio: Post data not found or not completed."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:684 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:692
msgid "LSio: object type invalid." msgid "LSio: object type invalid."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:687 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:695
msgid "LSio: input/output format %{format} invalid." msgid "LSio: input/output format %{format} invalid."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:690 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:698
msgid "LSio: Fail to initialize input/output driver." msgid "LSio: Fail to initialize input/output driver."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:693 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:701
msgid "LSio: Fail to load objects's data from input file." msgid "LSio: Fail to load objects's data from input file."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:696 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:704
msgid "LSio: Fail to load objects's data to export from LDAP directory." msgid "LSio: Fail to load objects's data to export from LDAP directory."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:699 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSio.php:707
msgid "LSio: Fail to export objects's data." msgid "LSio: Fail to export objects's data."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattr_ldap_pwdHistory.php:76 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattr_ldap_pwdHistory.php:77
msgid "Unknown (%{raw_value})" msgid "Unknown (%{raw_value})"
msgstr "" msgstr ""
@ -470,7 +470,7 @@ msgid "Attribute"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_mailQuota.php:101 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_mailQuota.php:101
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:126 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:135
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_quota.php:102 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_quota.php:102
#: templates/default/LSformElement_mailQuota_field.tpl:17 #: templates/default/LSformElement_mailQuota_field.tpl:17
msgid "Incorrect value" msgid "Incorrect value"
@ -559,7 +559,7 @@ msgstr ""
msgid "Unknown type" msgid "Unknown type"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:234 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSformElement_valueWithUnit.php:243
msgid "" msgid ""
"LSformElement_valueWithUnit : Units configuration data are missing for the " "LSformElement_valueWithUnit : Units configuration data are missing for the "
"attribute %{attr}." "attribute %{attr}."
@ -667,34 +667,42 @@ msgid ""
"upgrade documentation to adapt your templates." "upgrade documentation to adapt your templates."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:426 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:378
msgid "Copy to clipboard"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:379
msgid "Copied!"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:433
msgid "Smarty - An exception occured displaying template '%{template}'" msgid "Smarty - An exception occured displaying template '%{template}'"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:446 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:453
msgid "Smarty - An exception occured fetching template '%{template}'" msgid "Smarty - An exception occured fetching template '%{template}'"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:461 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:468
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:471 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:478
msgid "A fatal error occured. If problem persist, please contact support." msgid "A fatal error occured. If problem persist, please contact support."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:470 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:477
msgid "A fatal error occured." msgid "A fatal error occured."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:670 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:677
msgid "LStemplate : Template %{file} not found." msgid "LStemplate : Template %{file} not found."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:673 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:680
msgid "" msgid ""
"LStemplate : Fail to execute trigger %{callable} on event %{event} : is not " "LStemplate : Fail to execute trigger %{callable} on event %{event} : is not "
"callable." "callable."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:676 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LStemplate.php:683
msgid "" msgid ""
"LStemplate : Error during the execution of the trigger %{callable} on event " "LStemplate : Error during the execution of the trigger %{callable} on event "
"%{event}." "%{event}."
@ -765,53 +773,53 @@ msgid ""
"LSattr_ldap :: password. It's not the case of the attribure %{attr}." "LSattr_ldap :: password. It's not the case of the attribure %{attr}."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:256 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:261
msgid "The value of field %{label} is invalid." msgid "The value of field %{label} is invalid."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:744 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:754
msgid "" msgid ""
"LSattribute : Attribute %{attr} : LDAP or HTML types unknow (LDAP = %{ldap} " "LSattribute : Attribute %{attr} : LDAP or HTML types unknow (LDAP = %{ldap} "
"& HTML = %{html})." "& HTML = %{html})."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:747 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:757
msgid "" msgid ""
"LSattribute : The function %{func} to display the attribute %{attr} is " "LSattribute : The function %{func} to display the attribute %{attr} is "
"unknow." "unknow."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:750 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:760
msgid "" msgid ""
"LSattribute : The rule %{rule} to validate the attribute %{attr} is unknow." "LSattribute : The rule %{rule} to validate the attribute %{attr} is unknow."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:753 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:763
msgid "" msgid ""
"LSattribute : Configuration data to verify the attribute %{attr} are " "LSattribute : Configuration data to verify the attribute %{attr} are "
"incorrect." "incorrect."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:756 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:766
msgid "" msgid ""
"LSattribute : The function %{func} to save the attribute %{attr} is unknow." "LSattribute : The function %{func} to save the attribute %{attr} is unknow."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:759 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:769
msgid "LSattribute : The value of the attribute %{attr} can't be generated." msgid "LSattribute : The value of the attribute %{attr} can't be generated."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:762 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:772
msgid "LSattribute : Generation of the attribute %{attr} failed." msgid "LSattribute : Generation of the attribute %{attr} failed."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:765 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:775
msgid "" msgid ""
"LSattribute : Generation of the attribute %{attr} did not return a correct " "LSattribute : Generation of the attribute %{attr} did not return a correct "
"value." "value."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:768 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/class/class.LSattribute.php:778
msgid "" msgid ""
"LSattribute : The attr_%{type} of the attribute %{name} is not yet defined." "LSattribute : The attr_%{type} of the attribute %{name} is not yet defined."
msgstr "" msgstr ""
@ -2024,7 +2032,7 @@ msgid "Data entry form"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:955 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:955
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1673 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1702
msgid "Object has been added." msgid "Object has been added."
msgstr "" msgstr ""
@ -2033,17 +2041,17 @@ msgid "My account"
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1155 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1155
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1847 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1876
msgid "The object has been partially modified." msgid "The object has been partially modified."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1158 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1158
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1850 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1879
msgid "The object has been modified successfully." msgid "The object has been modified successfully."
msgstr "" msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1273 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1273
#: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1891 #: /home/brenard/dev/ldapsaisie_clean3/src/includes/routes.php:1920
msgid "%{objectname} has been successfully deleted." msgid "%{objectname} has been successfully deleted."
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@
{include file='ls:LSview_actions.tpl'} {include file='ls:LSview_actions.tpl'}
<dl> <dl>
<dt>DN</dt> <dt>DN</dt>
<dd>{$object->getDn()|escape:"htmlall"}</dd> <dd><span class="copyable">{$object->getDn()|escape:"htmlall"}</span></dd>
{if $object_classes} {if $object_classes}
<dt>{tr msg='Object classes'}</dt> <dt>{tr msg='Object classes'}</dt>
@ -13,9 +13,9 @@
<ul> <ul>
{foreach $object_classes as $class} {foreach $object_classes as $class}
{if $structural_object_class == $class} {if $structural_object_class == $class}
<li><strong>{$class|escape:"htmlall"}</strong> <img class='LStips' src="{img name='help'}" alt='?' title="{tr msg="Structural object class"|escape:"htmlall"}"/></li> <li><strong class="copyable">{$class|escape:"htmlall"}</strong> <img class='LStips' src="{img name='help'}" alt='?' title="{tr msg="Structural object class"|escape:"htmlall"}"/></li>
{else} {else}
<li>{$class|escape:"htmlall"}</li> <li><span class="copyable">{$class|escape:"htmlall"}</span></li>
{/if} {/if}
{/foreach} {/foreach}
</ul> </ul>
@ -28,11 +28,11 @@
{if is_array($info.values)} {if is_array($info.values)}
<ul> <ul>
{foreach $info.values as $value} {foreach $info.values as $value}
<li>{$value|escape:"htmlall"}</li> <li><span class="copyable">{$value|escape:"htmlall"}</span></li>
{/foreach} {/foreach}
</ul> </ul>
{else} {else}
{$info.values|escape:"htmlall"} <span class="copyable">{$info.values|escape:"htmlall"}</span>
{/if} {/if}
</dd> </dd>
{/foreach} {/foreach}
@ -43,16 +43,16 @@
<dl> <dl>
{foreach $other_internal_attrs as $attr => $values} {foreach $other_internal_attrs as $attr => $values}
{if $attr == 'objectClass'}{continue}{/if} {if $attr == 'objectClass'}{continue}{/if}
<dt>{$attr|escape:"htmlall"}</dt> <dt><span class="copyable">{$attr|escape:"htmlall"}</span></dt>
<dd> <dd>
{if is_array($values)} {if is_array($values)}
<ul> <ul>
{foreach $values as $value} {foreach $values as $value}
<li>{$value|escape:"htmlall"}</li> <li><span class="copyable">{$value|escape:"htmlall"}</span></li>
{/foreach} {/foreach}
</ul> </ul>
{else} {else}
{$values|escape:"htmlall"} <span class="copyable">{$values|escape:"htmlall"}</span>
{/if} {/if}
</dd> </dd>
{/foreach} {/foreach}