diff --git a/trunk/includes/class/class.LSattr_html_ssh_key.php b/trunk/includes/class/class.LSattr_html_ssh_key.php
new file mode 100644
index 00000000..1e4d4dde
--- /dev/null
+++ b/trunk/includes/class/class.LSattr_html_ssh_key.php
@@ -0,0 +1,54 @@
+
+ */
+class LSattr_html_ssh_key extends LSattr_html {
+
+ /**
+ * Ajoute l'attribut au formualaire passer en paramètre
+ *
+ * @param[in] &$form LSform Le formulaire
+ * @param[in] $idForm L'identifiant du formulaire
+ * @param[in] $data Valeur du champs du formulaire
+ *
+ * @retval LSformElement L'element du formulaire ajouté
+ */
+ function addToForm (&$form,$idForm,$data=NULL) {
+ $element=$form -> addElement('ssh_key', $this -> name, $this -> config['label'], $this -> config, $this);
+ if(!$element) {
+ $GLOBALS['LSerror'] -> addErrorCode(206,$this -> name);
+ return;
+ }
+
+ if ($data) {
+ $element -> setValue($data);
+ }
+ return $element;
+ }
+
+}
+
+?>
diff --git a/trunk/includes/class/class.LSformElement_image.php b/trunk/includes/class/class.LSformElement_image.php
index 226e920d..13afcb82 100644
--- a/trunk/includes/class/class.LSformElement_image.php
+++ b/trunk/includes/class/class.LSformElement_image.php
@@ -43,6 +43,7 @@ class LSformElement_image extends LSformElement {
* @retval array
*/
function getDisplay(){
+ $GLOBALS['LSsession'] -> addCssFile('LSformElement_image');
$return = true;
if (!$this -> isFreeze()) {
$id=$this -> name.'_'.rand();
diff --git a/trunk/includes/class/class.LSformElement_password.php b/trunk/includes/class/class.LSformElement_password.php
index 2aab3753..389ed91b 100644
--- a/trunk/includes/class/class.LSformElement_password.php
+++ b/trunk/includes/class/class.LSformElement_password.php
@@ -65,6 +65,7 @@ class LSformElement_password extends LSformElement {
* @retval array
*/
function getDisplay(){
+ $GLOBALS['LSsession'] -> addCssFile('LSformElement_password');
$return = $this -> getLabelInfos();
if (!$this -> isFreeze()) {
$numberId=rand();
diff --git a/trunk/includes/class/class.LSformElement_select_object.php b/trunk/includes/class/class.LSformElement_select_object.php
index 21753e24..ae525427 100644
--- a/trunk/includes/class/class.LSformElement_select_object.php
+++ b/trunk/includes/class/class.LSformElement_select_object.php
@@ -40,6 +40,7 @@ class LSformElement_select_object extends LSformElement {
* @retval array
*/
function getDisplay($refresh=NULL){
+ $GLOBALS['LSsession'] -> addCssFile('LSformElement_select_object');
if ($refresh) {
$this -> values = $this -> attr_html -> getValuesFromSession();
}
diff --git a/trunk/includes/class/class.LSformElement_ssh_key.php b/trunk/includes/class/class.LSformElement_ssh_key.php
new file mode 100644
index 00000000..488d6dfb
--- /dev/null
+++ b/trunk/includes/class/class.LSformElement_ssh_key.php
@@ -0,0 +1,91 @@
+
+ */
+
+class LSformElement_ssh_key extends LSformElement {
+
+ /**
+ * Retourne les infos d'affichage de l'élément
+ *
+ * Cette méthode retourne les informations d'affichage de l'élement
+ *
+ * @retval array
+ */
+ function getDisplay(){
+ $GLOBALS['LSsession'] -> addCssFile('LSformElement_ssh_key');
+ $return = $this -> getLabelInfos();
+ // value
+ $return['html'] = "
\n";
+ return $return;
+ }
+
+ /**
+ * Retourne le code HTML d'un champ vide
+ *
+ * @retval string Code HTML d'un champ vide.
+ */
+ function getEmptyField() {
+ $multiple = $this -> getMultipleData();
+ return "\n".$multiple;
+ }
+
+}
+
+?>
diff --git a/trunk/includes/js/LSformElement_ssh_key.js b/trunk/includes/js/LSformElement_ssh_key.js
new file mode 100644
index 00000000..fbe148bb
--- /dev/null
+++ b/trunk/includes/js/LSformElement_ssh_key.js
@@ -0,0 +1,22 @@
+var LSformElement_ssh_key = new Class({
+ initialize: function(){
+ $$('span.LSformElement_ssh_key_short_display').each(function(span) {
+ span.addEvent('click',this.onShortDisplayClick.bind(this,span));
+ }, this);
+ },
+
+ onShortDisplayClick: function(span) {
+ var p = span.getParent().getFirst('p.LSformElement_ssh_key_value');
+ if (typeof(p)) {
+ if (p.getStyle('display')=='none') {
+ p.setStyle('display','block');
+ }
+ else {
+ p.setStyle('display',' none');
+ }
+ }
+ }
+});
+window.addEvent(window.ie ? 'load' : 'domready', function() {
+ varLSformElement_ssh_key = new LSformElement_ssh_key();
+});
diff --git a/trunk/templates/css/LSform.css b/trunk/templates/css/LSform.css
index 985ddfde..a8bf0725 100644
--- a/trunk/templates/css/LSform.css
+++ b/trunk/templates/css/LSform.css
@@ -42,7 +42,7 @@ li.LSform {
* Champs du formulaire
*/
.LSform input, .LSform select, .LSform textarea {
- border: 1px inset #ccc;
+ border: 1px solid #ccc;
width: 300px;
background-color: #b5e4f6;
}
@@ -63,80 +63,3 @@ input[type='submit'].LSform {
img.LSform-add-field-btn, img.LSform-remove-field-btn {
cursor: pointer;
}
-
-/*
- ************************
- * LSformElement
- ************************
- */
-
-/*
- * LSformElement_select_object
- */
-a.LSformElement_select_object {
- text-decoration: none;
- color: #000;
- font-weight: normal;
-
-}
-
-ul.LSformElement_select_object {
- border: 1px solid #b5e4f6;
- border-bottom: none;
- width: 300px;
-}
-
-li.LSformElement_select_object {
- padding: 0.1em;
- border-bottom: 1px solid #b5e4f6;
-}
-
-li.LSformElement_select_object_addBtn {
- background-color: #b5e4f6;
- text-align: center;
-}
-
-img.LSformElement_select_object_deleteBtn {
- cursor: pointer;
-}
-
-/*
- * LSformElement_password
- */
-img.LSformElement_password_view_btn, img.LSformElement_password_generate_btn, img.LSformElement_password_verify_btn {
- cursor: pointer;
-}
-
-/*
- * LSformElement_image
- */
-div.LSformElement_image {
- float: right;
- clear: both;
- margin: 2em;
- background-color: #52bce5;
- width: 160px;
- padding: 5px;
- text-align: center;
- -moz-border-radius: 1em;
-}
-
-img.LSformElement_image {
- width: 150px;
- border: 1px solid #fff;
- margin: 5px;
-}
-
-div.LSformElement_image_errors {
- background-color: #f59a67;
-}
-
-ul.LSformElement_image_actions {
- list-style-type: none;
- position: absolute;
- margin-top: 8px;
- margin-left: 135px;
- padding: 0;
- visibility: hidden;
- cursor: pointer;
-}
diff --git a/trunk/templates/css/LSformElement_image.css b/trunk/templates/css/LSformElement_image.css
new file mode 100644
index 00000000..a37d71f7
--- /dev/null
+++ b/trunk/templates/css/LSformElement_image.css
@@ -0,0 +1,33 @@
+/*
+ * LSformElement_image
+ */
+div.LSformElement_image {
+ float: right;
+ clear: both;
+ margin: 2em;
+ background-color: #52bce5;
+ width: 160px;
+ padding: 5px;
+ text-align: center;
+ -moz-border-radius: 1em;
+}
+
+img.LSformElement_image {
+ width: 150px;
+ border: 1px solid #fff;
+ margin: 5px;
+}
+
+div.LSformElement_image_errors {
+ background-color: #f59a67;
+}
+
+ul.LSformElement_image_actions {
+ list-style-type: none;
+ position: absolute;
+ margin-top: 8px;
+ margin-left: 135px;
+ padding: 0;
+ visibility: hidden;
+ cursor: pointer;
+}
diff --git a/trunk/templates/css/LSformElement_password.css b/trunk/templates/css/LSformElement_password.css
new file mode 100644
index 00000000..dd2ab0c8
--- /dev/null
+++ b/trunk/templates/css/LSformElement_password.css
@@ -0,0 +1,6 @@
+/*
+ * LSformElement_password
+ */
+img.LSformElement_password_view_btn, img.LSformElement_password_generate_btn, img.LSformElement_password_verify_btn {
+ cursor: pointer;
+}
diff --git a/trunk/templates/css/LSformElement_select_object.css b/trunk/templates/css/LSformElement_select_object.css
new file mode 100644
index 00000000..6afaa42e
--- /dev/null
+++ b/trunk/templates/css/LSformElement_select_object.css
@@ -0,0 +1,29 @@
+/*
+ * LSformElement_select_object
+ */
+a.LSformElement_select_object {
+ text-decoration: none;
+ color: #000;
+ font-weight: normal;
+
+}
+
+ul.LSformElement_select_object {
+ border: 1px solid #b5e4f6;
+ border-bottom: none;
+ width: 300px;
+}
+
+li.LSformElement_select_object {
+ padding: 0.1em;
+ border-bottom: 1px solid #b5e4f6;
+}
+
+li.LSformElement_select_object_addBtn {
+ background-color: #b5e4f6;
+ text-align: center;
+}
+
+img.LSformElement_select_object_deleteBtn {
+ cursor: pointer;
+}
diff --git a/trunk/templates/css/LSformElement_ssh_key.css b/trunk/templates/css/LSformElement_ssh_key.css
new file mode 100644
index 00000000..20e64b0d
--- /dev/null
+++ b/trunk/templates/css/LSformElement_ssh_key.css
@@ -0,0 +1,22 @@
+/*
+ * LSformElement_ssh_key
+ */
+.LSformElement_ssh_key_value {
+ display: none;
+ width: 30em;
+ font-style: italic;
+ font-family: courier;
+ background-color: #b5e4f6;
+ border: 1px solid #ccc;
+ overflow: auto;
+}
+
+.LSformElement_ssh_key_short_display {
+ font-style: italic;
+ font-family: courier;
+ cursor: pointer;
+}
+
+textarea.LSformElement_ssh_key {
+ height: 10em;
+}