summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-20 14:32:30 +0400
committerAndrew Dolgov <[email protected]>2011-04-20 14:32:30 +0400
commit258d48a04749d57fd3e91524ac9c5da51440e739 (patch)
treef3bc38def809b07d4a36218a279c9ea62d44dedc /modules
parent323103323b5ca370bd64e96b77b49f0b48bc05ed (diff)
show partial access key in main instance editor, better key input checking
Diffstat (limited to 'modules')
-rw-r--r--modules/popup-dialog.php2
-rw-r--r--modules/pref-instances.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 906e89f4f..f5a30a06e 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -1019,7 +1019,7 @@
print __("Access key:") . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
- placeHolder=\"".__("Access key")."\"
+ placeHolder=\"".__("Access key")."\" regExp='\w{40}'
style=\"width: 20em\" name=\"access_key\" id=\"instance_add_key\"
value=\"$access_key\">";
diff --git a/modules/pref-instances.php b/modules/pref-instances.php
index ab3d78c44..45df2eb39 100644
--- a/modules/pref-instances.php
+++ b/modules/pref-instances.php
@@ -70,7 +70,7 @@
print __("Access key:") . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
- placeHolder=\"".__("Access key")."\"
+ placeHolder=\"".__("Access key")."\" regExp='\w{40}'
style=\"width: 20em\" name=\"access_key\" id=\"instance_edit_key\"
value=\"$access_key\">";
@@ -143,6 +143,7 @@
print "<tr class=\"title\">
<td align='center' width=\"5%\">&nbsp;</td>
<td width=''><a href=\"#\" onclick=\"updateInstanceList('access_url')\">".__('Instance URL')."</a></td>
+ <td width='20%'><a href=\"#\" onclick=\"updateInstanceList('access_key')\">".__('Access key')."</a></td>
<td width='20%'><a href=\"#\" onclick=\"updateUsersList('last_connected')\">".__('Last connected')."</a></td>
</tr>";
@@ -163,7 +164,11 @@
$onclick = "onclick='editInstance($id, event)' title='".__('Click to edit')."'";
+ $access_key = mb_substr($line['access_key'], 0, 4) . '...' .
+ mb_substr($line['access_key'], -4);
+
print "<td $onclick>" . htmlspecialchars($line['access_url']) . "</td>";
+ print "<td $onclick>" . htmlspecialchars($access_key) . "</td>";
print "<td $onclick>" . htmlspecialchars($line['last_connected']) . "</td>";
print "</tr>";