diff --git a/server/src/server/settings.py.sample b/server/src/server/settings.py.sample index 103c7b7b2..19eea110b 100644 --- a/server/src/server/settings.py.sample +++ b/server/src/server/settings.py.sample @@ -22,10 +22,6 @@ ADMINS = ( MANAGERS = ADMINS -# Compressor settings (for css/js) -COMPRESS_ENABLED = True -COMPRESS_OUTPUT_DIR = 'cache' - #USE_X_FORWARDED_HOST = True SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # For testing begind a reverse proxy @@ -46,7 +42,6 @@ DATABASES = { } } #DB_SECTION_END - ALLOWED_HOSTS = '*' # Local time zone for this installation. Choices can be found here: @@ -146,13 +141,15 @@ TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + ( ) MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'uds.core.util.request.GlobalRequestMiddleware', + 'uds.core.util.middleware.XUACompatibleMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) SESSION_EXPIRE_AT_BROWSER_CLOSE = True @@ -177,7 +174,6 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'south', - 'compressor', 'uds', ) @@ -232,6 +228,17 @@ LOGGING = { 'backupCount': 3, 'encoding': 'utf-8' }, + + 'database':{ + 'level':'ERROR', + 'class':'logging.handlers.RotatingFileHandler', + 'formatter': 'simple', + 'filename': LOGDIR + '/' + 'db.log', + 'mode': 'a', + 'maxBytes': ROTATINGSIZE, + 'backupCount': 3, + 'encoding': 'utf-8' + }, 'servicesFile':{ 'level':'DEBUG', @@ -271,11 +278,6 @@ LOGGING = { 'class':'logging.StreamHandler', 'formatter': 'simple' }, - 'database':{ - 'level':'DEBUG', - 'class':'logging.StreamHandler', - 'formatter': 'database' - }, 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler', diff --git a/server/src/uds/REST/mixins.py b/server/src/uds/REST/mixins.py index 4f7df23eb..dbd9e7e13 100644 --- a/server/src/uds/REST/mixins.py +++ b/server/src/uds/REST/mixins.py @@ -183,7 +183,7 @@ class ModelTypeHandlerMixin(object): 'name': 'comments', 'value':'', 'gui': { - 'required':True, + 'required':False, 'defvalue':'', 'value':'', 'label': _('Comments'), diff --git a/server/src/uds/core/util/Cache.py b/server/src/uds/core/util/Cache.py index 72873bcad..bc285a091 100644 --- a/server/src/uds/core/util/Cache.py +++ b/server/src/uds/core/util/Cache.py @@ -30,7 +30,7 @@ ''' @author: Adolfo Gómez, dkmaster at dkmon dot com ''' - +from __future__ import unicode_literals from django.db import transaction from uds.models import Cache as dbCache, getSqlDatetime from datetime import datetime, timedelta diff --git a/server/src/uds/core/util/middleware/__init__.py b/server/src/uds/core/util/middleware/__init__.py new file mode 100644 index 000000000..0e73d0f6c --- /dev/null +++ b/server/src/uds/core/util/middleware/__init__.py @@ -0,0 +1,16 @@ +from __future__ import unicode_literals +import logging + +logger = logging.getLogger(__name__) + + +class XUACompatibleMiddleware(object): + """ + Add a X-UA-Compatible header to the response + This header tells to Internet Explorer to render page with latest + possible version or to use chrome frame if it is installed. + """ + def process_response(self, request, response): + if response.get('content-type', '').startswith('text/html'): + response['X-UA-Compatible'] = 'IE=edge' + return response \ No newline at end of file diff --git a/server/src/uds/locale/de/LC_MESSAGES/django.mo b/server/src/uds/locale/de/LC_MESSAGES/django.mo index 21b420027..c235eb9ec 100644 Binary files a/server/src/uds/locale/de/LC_MESSAGES/django.mo and b/server/src/uds/locale/de/LC_MESSAGES/django.mo differ diff --git a/server/src/uds/locale/de/LC_MESSAGES/django.po b/server/src/uds/locale/de/LC_MESSAGES/django.po index 93c413899..d814a6ebd 100644 --- a/server/src/uds/locale/de/LC_MESSAGES/django.po +++ b/server/src/uds/locale/de/LC_MESSAGES/django.po @@ -32,7 +32,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,22 +42,32 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: REST/methods/authenticators.py:80 -msgid "Current authenticators" -msgstr "Aktuelle Authentifikatoren" - -#: REST/methods/authenticators.py:82 REST/methods/networks.py:68 -#: REST/methods/osmanagers.py:71 REST/methods/providers.py:69 -#: REST/methods/transports.py:71 REST/methods/users.py:77 +#: REST/mixins.py:172 REST/methods/authenticators.py:82 +#: REST/methods/networks.py:68 REST/methods/osmanagers.py:71 +#: REST/methods/providers.py:75 REST/methods/transports.py:79 +#: REST/methods/users_groups.py:73 msgid "Name" msgstr "Name" -#: REST/methods/authenticators.py:83 REST/methods/osmanagers.py:72 -#: REST/methods/providers.py:70 REST/methods/transports.py:72 -#: REST/methods/users.py:78 +#: REST/mixins.py:175 +msgid "Name of this element" +msgstr "Name dieses Elements" + +#: REST/mixins.py:189 REST/methods/authenticators.py:83 +#: REST/methods/osmanagers.py:72 REST/methods/providers.py:76 +#: REST/methods/transports.py:80 REST/methods/users_groups.py:74 +#: REST/methods/users_groups.py:102 msgid "Comments" msgstr "Kommentare" +#: REST/mixins.py:192 +msgid "Comments for this element" +msgstr "Kommentare für dieses element" + +#: REST/methods/authenticators.py:80 +msgid "Current authenticators" +msgstr "Aktuelle Authentifikatoren" + #: REST/methods/authenticators.py:84 msgid "Users" msgstr "Benutzer" @@ -72,7 +82,7 @@ msgid "Networks" msgstr "Netzwerke" #: REST/methods/networks.py:70 REST/methods/osmanagers.py:73 -#: REST/methods/transports.py:73 +#: REST/methods/transports.py:81 msgid "Used by" msgstr "Von verwendet" @@ -80,40 +90,49 @@ msgstr "Von verwendet" msgid "Current OS Managers" msgstr "Aktuelle OS-Manager" -#: REST/methods/providers.py:67 +#: REST/methods/providers.py:73 msgid "Current service providers" msgstr "Aktuelle Service-Provider" -#: REST/methods/providers.py:71 templates/uds/index.html:51 +#: REST/methods/providers.py:77 templates/uds/index.html:51 #: templates/uds/html5/index.html:68 msgid "Services" msgstr "Dienstleistungen" -#: REST/methods/transports.py:69 +#: REST/methods/transports.py:77 msgid "Current Transports" msgstr "Aktuelle Transporte" -#: REST/methods/users.py:70 +#: REST/methods/users_groups.py:66 #, python-brace-format msgid "Users of {0}" msgstr "Benutzer von {0}" -#: REST/methods/users.py:72 +#: REST/methods/users_groups.py:68 msgid "Current users" msgstr "Momentane Benutzer" -#: REST/methods/users.py:76 +#: REST/methods/users_groups.py:72 REST/methods/users_groups.py:101 msgid "User Id" msgstr "Benutzer-Id" -#: REST/methods/users.py:79 +#: REST/methods/users_groups.py:75 REST/methods/users_groups.py:103 msgid "state" msgstr "Zustand" -#: REST/methods/users.py:80 +#: REST/methods/users_groups.py:76 msgid "Last access" msgstr "Zuletzt online" +#: REST/methods/users_groups.py:95 +#, python-brace-format +msgid "Groups of {0}" +msgstr "Gruppen von {0}" + +#: REST/methods/users_groups.py:97 +msgid "Current groups" +msgstr "Aktuelle Gruppen" + #: admin/views.py:55 admin/views.py:63 admin/views.py:77 web/views.py:422 msgid "Forbidden" msgstr "Verboten" @@ -144,7 +163,9 @@ msgstr "Verwendung SSL" #: auths/ActiveDirectory_enterprise/Authenticator.py:30 msgid "If checked, will use a ssl connection to Active Directory" -msgstr "Wenn diese Option aktiviert, wird eine Ssl-Verbindung mit Active Directory verwenden." +msgstr "" +"Wenn diese Option aktiviert, wird eine Ssl-Verbindung mit Active Directory " +"verwenden." #: auths/ActiveDirectory_enterprise/Authenticator.py:31 msgid "Compatibility" @@ -164,8 +185,8 @@ msgid "" "Username with read privileges on the base selected (use USER@DOMAIN.DOM form " "for this)" msgstr "" -"Benutzernamen mit lesen Berechtigungen auf der Basis ausgewählt (USER@DOMAIN verwenden.DOM-Formular " -"dafür)" +"Benutzernamen mit lesen Berechtigungen auf der Basis ausgewählt (USER@DOMAIN " +"verwenden.DOM-Formular dafür)" #: auths/ActiveDirectory_enterprise/Authenticator.py:34 #: auths/ActiveDirectory_enterprise/Authenticator.py:52 @@ -369,7 +390,8 @@ msgstr "Erwartete Gruppenattribut " msgid "" "Ldap user class or user id attr is probably wrong (Ldap is an eDirectory?)" msgstr "" -"LDAP-Benutzer Klasse oder Benutzer-Id-Attr ist vermutlich falsch (Ldap ist eine eDirectory?)" +"LDAP-Benutzer Klasse oder Benutzer-Id-Attr ist vermutlich falsch (Ldap ist " +"eine eDirectory?)" #: auths/IP/Authenticator.py:48 auths/IP/Authenticator.py:50 msgid "IP Authenticator" @@ -531,7 +553,8 @@ msgstr "IDP-Metadaten" msgid "" "You can enter here the URL or the IDP metadata or the metadata itself (xml)" msgstr "" -"Sie können hier die URL oder die IDP-Metadaten oder die Metadaten selbst (Xml) eingeben." +"Sie können hier die URL oder die IDP-Metadaten oder die Metadaten selbst " +"(Xml) eingeben." #: auths/SAML_enterprise/SAML.py:127 msgid "Entity ID" @@ -582,8 +605,8 @@ msgid "" "Private key should be a valid PEM (PEM private keys starts with -----BEGIN " "RSA PRIVATE KEY-----" msgstr "" -"Der Private Schlüssel sollte ein gültiger PEM (PEM private Schlüssel beginnt mit---BEGIN " -"RSA PRIVATE KEY---" +"Der Private Schlüssel sollte ein gültiger PEM (PEM private Schlüssel beginnt " +"mit---BEGIN RSA PRIVATE KEY---" #: auths/SAML_enterprise/SAML.py:197 #, python-brace-format @@ -1158,7 +1181,9 @@ msgstr "Hyper-v Cluster verknüpften Klon (experimentell)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:55 #: services/HyperV_enterprise/HyperVLinkedService.py:58 msgid "Hyper Services based on templates and differential disks (experimental)" -msgstr "Hyper-Dienste basierend auf Vorlagen und differenzielle Datenträger (experimentell)" +msgstr "" +"Hyper-Dienste basierend auf Vorlagen und differenzielle Datenträger " +"(experimentell)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:72 #: services/HyperV_enterprise/HyperVLinkedService.py:75 @@ -1202,7 +1227,8 @@ msgstr "Netzwerk" msgid "" "If more than 1 interface is found in machine, use one on this network as main" msgstr "" -"Wenn mehr als 1 Schnittstelle im Computer gefunden wird, verwenden Sie eine in diesem Netzwerk als wichtigsten" +"Wenn mehr als 1 Schnittstelle im Computer gefunden wird, verwenden Sie eine " +"in diesem Netzwerk als wichtigsten" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:98 #: services/HyperV_enterprise/HyperVLinkedService.py:101 @@ -1280,7 +1306,8 @@ msgstr "Hyper-v Cluster Service-Provider" #: services/HyperV_enterprise/HyperVClusterProvider.py:89 #: services/HyperV_enterprise/HyperVProvider.py:81 msgid "HyperV Server IP or Hostname (must enable first WSMAN access)" -msgstr "Hyper-v Server IP oder Hostname (müssen erste WSMAN-Zugriff aktivieren)" +msgstr "" +"Hyper-v Server IP oder Hostname (müssen erste WSMAN-Zugriff aktivieren)" #: services/HyperV_enterprise/HyperVClusterProvider.py:90 #: services/HyperV_enterprise/HyperVProvider.py:82 @@ -1653,7 +1680,8 @@ msgstr "VMWare Linked Clone base" msgid "" "This service provides access to Linked Clones machines on a Virtual Center" msgstr "" -"Dieser Service bietet Zugriff auf verknüpfte Klone Maschinen auf ein Virtual Center" +"Dieser Service bietet Zugriff auf verknüpfte Klone Maschinen auf ein Virtual " +"Center" #: templates/404.html:3 templates/500.html:3 msgid "Page not found" @@ -1788,15 +1816,27 @@ msgstr "Ausfahrt dashboard" msgid "logout" msgstr "Logout" -#: templates/uds/admin/tmpl/authenticators.html:4 -msgid "administration of authenticators" -msgstr "Verwaltung von Authentifikatoren" - #: templates/uds/admin/tmpl/connectivity.html:4 #: templates/uds/admin/tmpl/dashboard.html:4 msgid "overview" msgstr "Übersicht" +#: templates/uds/admin/tmpl/modal.html:18 +msgid "Close" +msgstr "Schließen" + +#: templates/uds/admin/tmpl/modal.html:25 +msgid "Save" +msgstr "Speichern" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "Yes" +msgstr "Ja" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "No" +msgstr "Nr." + #: templates/uds/html5/detectJava.html:4 msgid "Login redirection to UDS" msgstr "Login-Umleitung zu UDS" @@ -2253,7 +2293,9 @@ msgstr "Einstellbare Qualität" #: transports/RGS-enterprise/RGSTransport.py:48 #: transports/RGS-enterprise/TRGSTransport.py:53 msgid "If checked, the image quality will be adjustable with bandwidth" -msgstr "Wenn diese Option aktiviert, wird die Bildqualität mit Bandbreite einstellbar sein" +msgstr "" +"Wenn diese Option aktiviert, wird die Bildqualität mit Bandbreite " +"einstellbar sein" #: transports/RGS-enterprise/RGSTransport.py:49 #: transports/RGS-enterprise/TRGSTransport.py:54 @@ -2266,8 +2308,8 @@ msgid "" "The lowest image quality applied to images to maintain the minimum update " "rate." msgstr "" -"Die niedrigste Bildqualität auf Bilder weiterhin das minimale Update angewendet " -"Rate." +"Die niedrigste Bildqualität auf Bilder weiterhin das minimale Update " +"angewendet Rate." #: transports/RGS-enterprise/RGSTransport.py:51 #: transports/RGS-enterprise/TRGSTransport.py:56 @@ -2333,7 +2375,8 @@ msgstr "RGS-Transport für getunnelte Verbindung" #: transports/RGS-enterprise/web.py:82 msgid "In order to use this service, you should first install RGS Receiver." -msgstr "Um diesen Service zu nutzen, sollten Sie zunächst RGS-Empfänger installieren." +msgstr "" +"Um diesen Service zu nutzen, sollten Sie zunächst RGS-Empfänger installieren." #: transports/RGS-enterprise/web.py:83 msgid "HP Website" diff --git a/server/src/uds/locale/de/LC_MESSAGES/djangojs.mo b/server/src/uds/locale/de/LC_MESSAGES/djangojs.mo index 5d5277acc..ede7bc985 100644 Binary files a/server/src/uds/locale/de/LC_MESSAGES/djangojs.mo and b/server/src/uds/locale/de/LC_MESSAGES/djangojs.mo differ diff --git a/server/src/uds/locale/de/LC_MESSAGES/djangojs.po b/server/src/uds/locale/de/LC_MESSAGES/djangojs.po index aeaf3378b..95fd510aa 100644 --- a/server/src/uds/locale/de/LC_MESSAGES/djangojs.po +++ b/server/src/uds/locale/de/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,146 +18,234 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: static/adm/js/api-tools.js:46 +msgid "Just a moment..." +msgstr "Einen Moment..." + +#: static/adm/js/api-tools.js:75 +msgid "Sunday" +msgstr "Sonntag" + +#: static/adm/js/api-tools.js:75 +msgid "Monday" +msgstr "Montag" + +#: static/adm/js/api-tools.js:75 +msgid "Tuesday" +msgstr "Dienstag" + +#: static/adm/js/api-tools.js:75 +msgid "Wednesday" +msgstr "Mittwoch" + +#: static/adm/js/api-tools.js:76 +msgid "Thursday" +msgstr "Donnerstag" + +#: static/adm/js/api-tools.js:76 +msgid "Friday" +msgstr "Freitag" + +#: static/adm/js/api-tools.js:76 +msgid "Saturday" +msgstr "Samstag" + +#: static/adm/js/api-tools.js:77 +msgid "January" +msgstr "Januar" + +#: static/adm/js/api-tools.js:77 +msgid "February" +msgstr "Februar" + +#: static/adm/js/api-tools.js:77 +msgid "March" +msgstr "März" + +#: static/adm/js/api-tools.js:77 +msgid "April" +msgstr "April" + +#: static/adm/js/api-tools.js:77 +msgid "May" +msgstr "Mai" + +#: static/adm/js/api-tools.js:78 +msgid "June" +msgstr "Juni" + +#: static/adm/js/api-tools.js:78 +msgid "July" +msgstr "Juli" + +#: static/adm/js/api-tools.js:78 +msgid "August" +msgstr "August" + +#: static/adm/js/api-tools.js:78 +msgid "September" +msgstr "September" + +#: static/adm/js/api-tools.js:78 +msgid "October" +msgstr "Oktober" + +#: static/adm/js/api-tools.js:79 +msgid "November" +msgstr "November" + +#: static/adm/js/api-tools.js:79 +msgid "December" +msgstr "Dezember" + +#: static/adm/js/dataTables.bootstrap.js:6 static/adm/js/gui.js:19 +msgid "_MENU_ records per page" +msgstr "_MENU_ Datensätze pro Seite" + #: static/adm/js/gui-elements.js:33 msgid "Service Providers" msgstr "Service-Provider" -#: static/adm/js/gui.js:18 -msgid "_MENU_ records per page" -msgstr "_MENU_ Datensätze pro Seite" +#: static/adm/js/gui-elements.js:40 +msgid "Edit service provider" +msgstr "Dienstleister bearbeiten" -#: static/adm/js/gui.js:19 +#: static/adm/js/gui-elements.js:104 +msgid "Edit authenticator" +msgstr "Authentifikator bearbeiten" + +#: static/adm/js/gui-elements.js:149 +msgid "Edit transport" +msgstr "Bearbeiten Verkehr" + +#: static/adm/js/gui-elements.js:159 +msgid "New transport" +msgstr "Neue Verkehrsmittel" + +#: static/adm/js/gui.js:20 msgid "Empty" msgstr "Leer" -#: static/adm/js/gui.js:20 +#: static/adm/js/gui.js:21 msgid "Records _START_ to _END_ of _TOTAL_" msgstr "Zeichnet _START_, _END_ von _TOTAL_" -#: static/adm/js/gui.js:21 +#: static/adm/js/gui.js:22 msgid "No records" msgstr "Keine Datensätze" -#: static/adm/js/gui.js:22 +#: static/adm/js/gui.js:23 msgid "(filtered from _MAX_ total records)" msgstr "(von _MAX_ Datensätze gefiltert)" -#: static/adm/js/gui.js:23 +#: static/adm/js/gui.js:24 msgid "Please wait, processing" msgstr "Bitte warten, Verarbeitung" -#: static/adm/js/gui.js:24 +#: static/adm/js/gui.js:25 msgid "Filter" msgstr "Filter" -#: static/adm/js/gui.js:27 +#: static/adm/js/gui.js:28 msgid "First" msgstr "Erste" -#: static/adm/js/gui.js:28 +#: static/adm/js/gui.js:29 msgid "Last" msgstr "Letzter" -#: static/adm/js/gui.js:29 +#: static/adm/js/gui.js:30 msgid "Next" msgstr "Nächste" -#: static/adm/js/gui.js:30 +#: static/adm/js/gui.js:31 msgid "Previous" msgstr "Vorherige" -#: static/adm/js/gui.js:75 -msgid "Deployed services" -msgstr "Bereitgestellten Dienste" +#: static/adm/js/gui.js:37 +msgid "New" +msgstr "Neu" -#: static/adm/js/gui.js:360 +#: static/adm/js/gui.js:41 msgid "Edit" msgstr "Bearbeiten" -#: static/adm/js/gui.js:369 +#: static/adm/js/gui.js:45 msgid "Delete" msgstr "Löschen" -#: static/adm/js/gui.js:378 +#: static/adm/js/gui.js:49 msgid "Refresh" msgstr "Aktualisieren" -#: static/adm/js/strftime.js:30 -msgid "Sunday" -msgstr "Sonntag" +#: static/adm/js/gui.js:53 +msgid "Xls" +msgstr "Xls" -#: static/adm/js/strftime.js:30 -msgid "Monday" -msgstr "Montag" +#: static/adm/js/gui.js:166 +msgid "Deployed services" +msgstr "Bereitgestellten Dienste" -#: static/adm/js/strftime.js:30 -msgid "Tuesday" -msgstr "Dienstag" +#: static/adm/js/gui.js:204 +msgid "This field is required." +msgstr "Dieses Feld ist erforderlich." -#: static/adm/js/strftime.js:31 -msgid "Wednesday" -msgstr "Mittwoch" +#: static/adm/js/gui.js:205 +msgid "Please fix this field." +msgstr "Bitte korrigieren Sie in diesem Feld." -#: static/adm/js/strftime.js:31 -msgid "Thursday" -msgstr "Donnerstag" +#: static/adm/js/gui.js:206 +msgid "Please enter a valid email address." +msgstr "Bitte geben Sie eine gültige e-Mail-Adresse." -#: static/adm/js/strftime.js:31 -msgid "Friday" -msgstr "Freitag" +#: static/adm/js/gui.js:207 +msgid "Please enter a valid URL." +msgstr "Bitte geben Sie eine gültige URL." -#: static/adm/js/strftime.js:31 -msgid "Saturday" -msgstr "Samstag" +#: static/adm/js/gui.js:208 +msgid "Please enter a valid date." +msgstr "Bitte geben Sie ein gültiges Datum." -#: static/adm/js/strftime.js:32 -msgid "January" -msgstr "Januar" +#: static/adm/js/gui.js:209 +msgid "Please enter a valid date (ISO)." +msgstr "Bitte geben Sie ein gültiges Datum (ISO)." -#: static/adm/js/strftime.js:32 -msgid "February" -msgstr "Februar" +#: static/adm/js/gui.js:210 +msgid "Please enter a valid number." +msgstr "Bitte geben Sie eine gültige Nummer." -#: static/adm/js/strftime.js:32 -msgid "March" -msgstr "März" +#: static/adm/js/gui.js:211 +msgid "Please enter only digits." +msgstr "Bitte geben Sie nur Ziffern." -#: static/adm/js/strftime.js:33 -msgid "April" -msgstr "April" +#: static/adm/js/gui.js:212 +msgid "Please enter a valid credit card number." +msgstr "Bitte geben Sie eine gültige Kreditkartennummer." -#: static/adm/js/strftime.js:33 -msgid "May" -msgstr "Mai" +#: static/adm/js/gui.js:213 +msgid "Please enter the same value again." +msgstr "Bitte geben Sie den gleichen Wert wieder." -#: static/adm/js/strftime.js:33 -msgid "June" -msgstr "Juni" +#: static/adm/js/gui.js:214 +msgid "Please enter no more than {0} characters." +msgstr "Bitte geben Sie nicht mehr als {0} Zeichen." -#: static/adm/js/strftime.js:33 -msgid "July" -msgstr "Juli" +#: static/adm/js/gui.js:215 +msgid "Please enter at least {0} characters." +msgstr "Bitte geben Sie mindestens {0} Zeichen." -#: static/adm/js/strftime.js:34 -msgid "August" -msgstr "August" +#: static/adm/js/gui.js:216 +msgid "Please enter a value between {0} and {1} characters long." +msgstr "Bitte geben Sie einen Wert zwischen {0} und {1} Zeichen lang." -#: static/adm/js/strftime.js:34 -msgid "September" -msgstr "September" +#: static/adm/js/gui.js:217 +msgid "Please enter a value between {0} and {1}." +msgstr "Bitte geben Sie einen Wert zwischen {0} und {1}." -#: static/adm/js/strftime.js:34 -msgid "October" -msgstr "Oktober" +#: static/adm/js/gui.js:218 +msgid "Please enter a value less than or equal to {0}." +msgstr "Bitte geben Sie einen Wert kleiner oder gleich {0}." -#: static/adm/js/strftime.js:34 -msgid "November" -msgstr "November" - -#: static/adm/js/strftime.js:35 -msgid "December" -msgstr "Dezember" - -#: static/adm/js/tools.js:46 -msgid "Just a moment..." -msgstr "Einen Moment..." +#: static/adm/js/gui.js:219 +msgid "Please enter a value greater than or equal to {0}." +msgstr "Bitte geben Sie einen Wert größer oder gleich {0}." diff --git a/server/src/uds/locale/es/LC_MESSAGES/django.mo b/server/src/uds/locale/es/LC_MESSAGES/django.mo index c8040d336..ba1510082 100644 Binary files a/server/src/uds/locale/es/LC_MESSAGES/django.mo and b/server/src/uds/locale/es/LC_MESSAGES/django.mo differ diff --git a/server/src/uds/locale/es/LC_MESSAGES/django.po b/server/src/uds/locale/es/LC_MESSAGES/django.po index 867f77d11..a328b9461 100644 --- a/server/src/uds/locale/es/LC_MESSAGES/django.po +++ b/server/src/uds/locale/es/LC_MESSAGES/django.po @@ -31,7 +31,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: 2013-04-22 06:24+0200\n" "Last-Translator: \n" "Language-Team: Spanish \n" @@ -42,22 +42,32 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "X-Generator: Lokalize 1.4\n" -#: REST/methods/authenticators.py:80 -msgid "Current authenticators" -msgstr "Autenticadores actuales" - -#: REST/methods/authenticators.py:82 REST/methods/networks.py:68 -#: REST/methods/osmanagers.py:71 REST/methods/providers.py:69 -#: REST/methods/transports.py:71 REST/methods/users.py:77 +#: REST/mixins.py:172 REST/methods/authenticators.py:82 +#: REST/methods/networks.py:68 REST/methods/osmanagers.py:71 +#: REST/methods/providers.py:75 REST/methods/transports.py:79 +#: REST/methods/users_groups.py:73 msgid "Name" msgstr "Nombre" -#: REST/methods/authenticators.py:83 REST/methods/osmanagers.py:72 -#: REST/methods/providers.py:70 REST/methods/transports.py:72 -#: REST/methods/users.py:78 +#: REST/mixins.py:175 +msgid "Name of this element" +msgstr "Nombre de este elemento" + +#: REST/mixins.py:189 REST/methods/authenticators.py:83 +#: REST/methods/osmanagers.py:72 REST/methods/providers.py:76 +#: REST/methods/transports.py:80 REST/methods/users_groups.py:74 +#: REST/methods/users_groups.py:102 msgid "Comments" msgstr "Comentarios" +#: REST/mixins.py:192 +msgid "Comments for this element" +msgstr "Comentarios para este elemento" + +#: REST/methods/authenticators.py:80 +msgid "Current authenticators" +msgstr "Autenticadores actuales" + #: REST/methods/authenticators.py:84 msgid "Users" msgstr "Usuarios" @@ -72,7 +82,7 @@ msgid "Networks" msgstr "Redes" #: REST/methods/networks.py:70 REST/methods/osmanagers.py:73 -#: REST/methods/transports.py:73 +#: REST/methods/transports.py:81 msgid "Used by" msgstr "Utilizado por" @@ -80,40 +90,49 @@ msgstr "Utilizado por" msgid "Current OS Managers" msgstr "Actual OS administradores" -#: REST/methods/providers.py:67 +#: REST/methods/providers.py:73 msgid "Current service providers" msgstr "Proveedores de servicio actuales" -#: REST/methods/providers.py:71 templates/uds/index.html:51 +#: REST/methods/providers.py:77 templates/uds/index.html:51 #: templates/uds/html5/index.html:68 msgid "Services" msgstr "Servicios" -#: REST/methods/transports.py:69 +#: REST/methods/transports.py:77 msgid "Current Transports" msgstr "Transportes actuales" -#: REST/methods/users.py:70 +#: REST/methods/users_groups.py:66 #, python-brace-format msgid "Users of {0}" msgstr "Usuarios de {0}" -#: REST/methods/users.py:72 +#: REST/methods/users_groups.py:68 msgid "Current users" msgstr "Usuarios actuales" -#: REST/methods/users.py:76 +#: REST/methods/users_groups.py:72 REST/methods/users_groups.py:101 msgid "User Id" msgstr "Id de usuario" -#: REST/methods/users.py:79 +#: REST/methods/users_groups.py:75 REST/methods/users_groups.py:103 msgid "state" msgstr "estado" -#: REST/methods/users.py:80 +#: REST/methods/users_groups.py:76 msgid "Last access" msgstr "Último acceso" +#: REST/methods/users_groups.py:95 +#, python-brace-format +msgid "Groups of {0}" +msgstr "Grupos de {0}" + +#: REST/methods/users_groups.py:97 +msgid "Current groups" +msgstr "Grupos actuales" + #: admin/views.py:55 admin/views.py:63 admin/views.py:77 web/views.py:422 msgid "Forbidden" msgstr "Prohibido" @@ -164,8 +183,8 @@ msgid "" "Username with read privileges on the base selected (use USER@DOMAIN.DOM form " "for this)" msgstr "" -"Nombre de usuario con privilegios de lectura en la base seleccionada (uso USER@DOMAIN.Formulario de DOM " -"para esto)" +"Nombre de usuario con privilegios de lectura en la base seleccionada (uso " +"USER@DOMAIN.Formulario de DOM para esto)" #: auths/ActiveDirectory_enterprise/Authenticator.py:34 #: auths/ActiveDirectory_enterprise/Authenticator.py:52 @@ -244,7 +263,8 @@ msgstr "Grupo" #: auths/ActiveDirectory_enterprise/Authenticator.py:67 #: auths/ActiveDirectory_enterprise/Authenticator.py:442 msgid "Must specify the username in the form USERNAME@DOMAIN.DOM" -msgstr "Debe especificar el nombre de usuario en el formulario USERNAME@DOMAIN.DOM" +msgstr "" +"Debe especificar el nombre de usuario en el formulario USERNAME@DOMAIN.DOM" #: auths/ActiveDirectory_enterprise/Authenticator.py:164 #: auths/EDirectory_enterprise/Authenticator.py:123 @@ -371,7 +391,8 @@ msgstr "Atributo de grupo esperados " msgid "" "Ldap user class or user id attr is probably wrong (Ldap is an eDirectory?)" msgstr "" -"LDAP usuario clase o usuario id attr es probablemente incorrecto (Ldap es un eDirectory?)" +"LDAP usuario clase o usuario id attr es probablemente incorrecto (Ldap es un " +"eDirectory?)" #: auths/IP/Authenticator.py:48 auths/IP/Authenticator.py:50 msgid "IP Authenticator" @@ -522,7 +543,8 @@ msgstr "Certificado" #: auths/SAML_enterprise/SAML.py:123 msgid "Server certificate (public), , as generated in base 64 from openssl" -msgstr "Certificado del servidor (público), como generados en base 64 de openssl" +msgstr "" +"Certificado del servidor (público), como generados en base 64 de openssl" #: auths/SAML_enterprise/SAML.py:124 msgid "IDP Metadata" @@ -532,7 +554,8 @@ msgstr "IDP metadatos" msgid "" "You can enter here the URL or the IDP metadata or the metadata itself (xml)" msgstr "" -"Aquí puede introducir la URL o los metadatos IDP o los metadatos de sí mismo (xml)" +"Aquí puede introducir la URL o los metadatos IDP o los metadatos de sí mismo " +"(xml)" #: auths/SAML_enterprise/SAML.py:127 msgid "Entity ID" @@ -540,7 +563,9 @@ msgstr "ID de entidad" #: auths/SAML_enterprise/SAML.py:128 msgid "ID of the SP. If left blank, this will be autogenerated from server URL" -msgstr "ID del SP. Si deja en blanco, este será generadas automáticamente desde la dirección URL del servidor" +msgstr "" +"ID del SP. Si deja en blanco, este será generadas automáticamente desde la " +"dirección URL del servidor" #: auths/SAML_enterprise/SAML.py:130 msgid "User name attrs" @@ -571,8 +596,8 @@ msgid "" "Server certificate should be a valid PEM (PEM certificates starts with -----" "BEGIN CERTIFICATE-----)" msgstr "" -"Certificado del servidor debe ser un PEM válido (PEM certificados comienza con---" -"BEGIN CERTIFICADO---)" +"Certificado del servidor debe ser un PEM válido (PEM certificados comienza " +"con---BEGIN CERTIFICADO---)" #: auths/SAML_enterprise/SAML.py:165 msgid "Invalid server certificate. " @@ -583,8 +608,8 @@ msgid "" "Private key should be a valid PEM (PEM private keys starts with -----BEGIN " "RSA PRIVATE KEY-----" msgstr "" -"Clave privada debe ser un PEM válido (PEM claves privadas comienza con---BEGIN " -"CLAVE PRIVADA RSA---" +"Clave privada debe ser un PEM válido (PEM claves privadas comienza con---" +"BEGIN CLAVE PRIVADA RSA---" #: auths/SAML_enterprise/SAML.py:197 #, python-brace-format @@ -1151,7 +1176,8 @@ msgstr "Cluster HyperV ligado clon (Experimental)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:55 #: services/HyperV_enterprise/HyperVLinkedService.py:58 msgid "Hyper Services based on templates and differential disks (experimental)" -msgstr "Hiper servicios basados en plantillas y diferenciales discos (experimentales)" +msgstr "" +"Hiper servicios basados en plantillas y diferenciales discos (experimentales)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:72 #: services/HyperV_enterprise/HyperVLinkedService.py:75 @@ -1192,7 +1218,8 @@ msgstr "Red" msgid "" "If more than 1 interface is found in machine, use one on this network as main" msgstr "" -"Si más de una interfaz se encuentra en la máquina, utilice uno de esta red como principal" +"Si más de una interfaz se encuentra en la máquina, utilice uno de esta red " +"como principal" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:98 #: services/HyperV_enterprise/HyperVLinkedService.py:101 @@ -1215,7 +1242,8 @@ msgstr "Unidades de almacén de datos" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:101 #: services/HyperV_enterprise/HyperVLinkedService.py:104 msgid "Datastores where to put incrementals & publications" -msgstr "Almacenes de datos dónde poner los backups incrementales & publicaciones" +msgstr "" +"Almacenes de datos dónde poner los backups incrementales & publicaciones" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:102 #: services/HyperV_enterprise/HyperVLinkedService.py:105 @@ -1270,7 +1298,8 @@ msgstr "Proveedor de servicios de clúster HyperV" #: services/HyperV_enterprise/HyperVClusterProvider.py:89 #: services/HyperV_enterprise/HyperVProvider.py:81 msgid "HyperV Server IP or Hostname (must enable first WSMAN access)" -msgstr "HyperV servidor IP o nombre de host (debe permitir el acceso WSMAN primera)" +msgstr "" +"HyperV servidor IP o nombre de host (debe permitir el acceso WSMAN primera)" #: services/HyperV_enterprise/HyperVClusterProvider.py:90 #: services/HyperV_enterprise/HyperVProvider.py:82 @@ -1639,7 +1668,8 @@ msgstr "VMWare vinculado base clon" msgid "" "This service provides access to Linked Clones machines on a Virtual Center" msgstr "" -"Este servicio proporciona acceso a máquinas de Clones enlazados en un Centro Virtual" +"Este servicio proporciona acceso a máquinas de Clones enlazados en un Centro " +"Virtual" #: templates/404.html:3 templates/500.html:3 msgid "Page not found" @@ -1774,15 +1804,27 @@ msgstr "Tablero de salida" msgid "logout" msgstr "logout" -#: templates/uds/admin/tmpl/authenticators.html:4 -msgid "administration of authenticators" -msgstr "Administración de autenticadores" - #: templates/uds/admin/tmpl/connectivity.html:4 #: templates/uds/admin/tmpl/dashboard.html:4 msgid "overview" msgstr "Resumen" +#: templates/uds/admin/tmpl/modal.html:18 +msgid "Close" +msgstr "Cerrar" + +#: templates/uds/admin/tmpl/modal.html:25 +msgid "Save" +msgstr "Salvar" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "Yes" +msgstr "Sí" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "No" +msgstr "No" + #: templates/uds/html5/detectJava.html:4 msgid "Login redirection to UDS" msgstr "Redirección de inicio de sesión para UDS" @@ -2231,7 +2273,8 @@ msgstr "Calidad ajustable" #: transports/RGS-enterprise/RGSTransport.py:48 #: transports/RGS-enterprise/TRGSTransport.py:53 msgid "If checked, the image quality will be adjustable with bandwidth" -msgstr "Si está marcada, la calidad de imagen será ajustable con ancho de banda" +msgstr "" +"Si está marcada, la calidad de imagen será ajustable con ancho de banda" #: transports/RGS-enterprise/RGSTransport.py:49 #: transports/RGS-enterprise/TRGSTransport.py:54 @@ -2244,8 +2287,8 @@ msgid "" "The lowest image quality applied to images to maintain the minimum update " "rate." msgstr "" -"La menor calidad de imagen aplicada a las imágenes para mantener la actualización mínima " -"tasa." +"La menor calidad de imagen aplicada a las imágenes para mantener la " +"actualización mínima tasa." #: transports/RGS-enterprise/RGSTransport.py:51 #: transports/RGS-enterprise/TRGSTransport.py:56 @@ -2255,7 +2298,8 @@ msgstr "Velocidad de fotogramas ajustable" #: transports/RGS-enterprise/RGSTransport.py:52 #: transports/RGS-enterprise/TRGSTransport.py:57 msgid "Update rate threshold to begin adjusting image quality" -msgstr "Umbral de tasa de actualización para comenzar a ajustar la calidad de imagen" +msgstr "" +"Umbral de tasa de actualización para comenzar a ajustar la calidad de imagen" #: transports/RGS-enterprise/RGSTransport.py:53 #: transports/RGS-enterprise/TRGSTransport.py:58 @@ -2311,7 +2355,8 @@ msgstr "RGS transporte para la conexión de túnel" #: transports/RGS-enterprise/web.py:82 msgid "In order to use this service, you should first install RGS Receiver." -msgstr "Para poder utilizar este servicio, usted debe instalar primero RGS receptor." +msgstr "" +"Para poder utilizar este servicio, usted debe instalar primero RGS receptor." #: transports/RGS-enterprise/web.py:83 msgid "HP Website" diff --git a/server/src/uds/locale/es/LC_MESSAGES/djangojs.mo b/server/src/uds/locale/es/LC_MESSAGES/djangojs.mo index 6dd28c80c..5954b39e1 100644 Binary files a/server/src/uds/locale/es/LC_MESSAGES/djangojs.mo and b/server/src/uds/locale/es/LC_MESSAGES/djangojs.mo differ diff --git a/server/src/uds/locale/es/LC_MESSAGES/djangojs.po b/server/src/uds/locale/es/LC_MESSAGES/djangojs.po index cab259af1..d94edc8db 100644 --- a/server/src/uds/locale/es/LC_MESSAGES/djangojs.po +++ b/server/src/uds/locale/es/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,146 +18,234 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: static/adm/js/api-tools.js:46 +msgid "Just a moment..." +msgstr "Un momento..." + +#: static/adm/js/api-tools.js:75 +msgid "Sunday" +msgstr "Domingo" + +#: static/adm/js/api-tools.js:75 +msgid "Monday" +msgstr "Lunes" + +#: static/adm/js/api-tools.js:75 +msgid "Tuesday" +msgstr "Martes" + +#: static/adm/js/api-tools.js:75 +msgid "Wednesday" +msgstr "Miércoles" + +#: static/adm/js/api-tools.js:76 +msgid "Thursday" +msgstr "Jueves" + +#: static/adm/js/api-tools.js:76 +msgid "Friday" +msgstr "Viernes" + +#: static/adm/js/api-tools.js:76 +msgid "Saturday" +msgstr "Sábado" + +#: static/adm/js/api-tools.js:77 +msgid "January" +msgstr "Enero" + +#: static/adm/js/api-tools.js:77 +msgid "February" +msgstr "Febrero" + +#: static/adm/js/api-tools.js:77 +msgid "March" +msgstr "Marzo" + +#: static/adm/js/api-tools.js:77 +msgid "April" +msgstr "Abril" + +#: static/adm/js/api-tools.js:77 +msgid "May" +msgstr "Mayo" + +#: static/adm/js/api-tools.js:78 +msgid "June" +msgstr "Junio" + +#: static/adm/js/api-tools.js:78 +msgid "July" +msgstr "Julio" + +#: static/adm/js/api-tools.js:78 +msgid "August" +msgstr "Agosto" + +#: static/adm/js/api-tools.js:78 +msgid "September" +msgstr "Septiembre" + +#: static/adm/js/api-tools.js:78 +msgid "October" +msgstr "Octubre" + +#: static/adm/js/api-tools.js:79 +msgid "November" +msgstr "Noviembre" + +#: static/adm/js/api-tools.js:79 +msgid "December" +msgstr "Diciembre" + +#: static/adm/js/dataTables.bootstrap.js:6 static/adm/js/gui.js:19 +msgid "_MENU_ records per page" +msgstr "Registros _MENU_ por página" + #: static/adm/js/gui-elements.js:33 msgid "Service Providers" msgstr "Proveedores de servicios" -#: static/adm/js/gui.js:18 -msgid "_MENU_ records per page" -msgstr "Registros _MENU_ por página" +#: static/adm/js/gui-elements.js:40 +msgid "Edit service provider" +msgstr "Editar proveedor" -#: static/adm/js/gui.js:19 +#: static/adm/js/gui-elements.js:104 +msgid "Edit authenticator" +msgstr "Editar autenticador" + +#: static/adm/js/gui-elements.js:149 +msgid "Edit transport" +msgstr "Editar transporte" + +#: static/adm/js/gui-elements.js:159 +msgid "New transport" +msgstr "Nuevo transporte" + +#: static/adm/js/gui.js:20 msgid "Empty" msgstr "Vacío" -#: static/adm/js/gui.js:20 +#: static/adm/js/gui.js:21 msgid "Records _START_ to _END_ of _TOTAL_" msgstr "Registros de _START_ a _END_ de _TOTAL_" -#: static/adm/js/gui.js:21 +#: static/adm/js/gui.js:22 msgid "No records" msgstr "No hay registros" -#: static/adm/js/gui.js:22 +#: static/adm/js/gui.js:23 msgid "(filtered from _MAX_ total records)" msgstr "(filtrado de registros total _MAX_)" -#: static/adm/js/gui.js:23 +#: static/adm/js/gui.js:24 msgid "Please wait, processing" msgstr "Por favor espere, procesando" -#: static/adm/js/gui.js:24 +#: static/adm/js/gui.js:25 msgid "Filter" msgstr "Filtro" -#: static/adm/js/gui.js:27 +#: static/adm/js/gui.js:28 msgid "First" msgstr "Primero" -#: static/adm/js/gui.js:28 +#: static/adm/js/gui.js:29 msgid "Last" msgstr "Duran" -#: static/adm/js/gui.js:29 +#: static/adm/js/gui.js:30 msgid "Next" msgstr "Próxima" -#: static/adm/js/gui.js:30 +#: static/adm/js/gui.js:31 msgid "Previous" msgstr "Anterior" -#: static/adm/js/gui.js:75 -msgid "Deployed services" -msgstr "Servicios desplegados" +#: static/adm/js/gui.js:37 +msgid "New" +msgstr "Nuevo" -#: static/adm/js/gui.js:360 +#: static/adm/js/gui.js:41 msgid "Edit" msgstr "Editar" -#: static/adm/js/gui.js:369 +#: static/adm/js/gui.js:45 msgid "Delete" msgstr "Borrar" -#: static/adm/js/gui.js:378 +#: static/adm/js/gui.js:49 msgid "Refresh" msgstr "Actualización" -#: static/adm/js/strftime.js:30 -msgid "Sunday" -msgstr "Domingo" +#: static/adm/js/gui.js:53 +msgid "Xls" +msgstr "XLS" -#: static/adm/js/strftime.js:30 -msgid "Monday" -msgstr "Lunes" +#: static/adm/js/gui.js:166 +msgid "Deployed services" +msgstr "Servicios desplegados" -#: static/adm/js/strftime.js:30 -msgid "Tuesday" -msgstr "Martes" +#: static/adm/js/gui.js:204 +msgid "This field is required." +msgstr "Este campo es requerido." -#: static/adm/js/strftime.js:31 -msgid "Wednesday" -msgstr "Miércoles" +#: static/adm/js/gui.js:205 +msgid "Please fix this field." +msgstr "Por favor arreglar este campo." -#: static/adm/js/strftime.js:31 -msgid "Thursday" -msgstr "Jueves" +#: static/adm/js/gui.js:206 +msgid "Please enter a valid email address." +msgstr "Introduzca una dirección de correo electrónico válida." -#: static/adm/js/strftime.js:31 -msgid "Friday" -msgstr "Viernes" +#: static/adm/js/gui.js:207 +msgid "Please enter a valid URL." +msgstr "Por favor, introduzca una URL válida." -#: static/adm/js/strftime.js:31 -msgid "Saturday" -msgstr "Sábado" +#: static/adm/js/gui.js:208 +msgid "Please enter a valid date." +msgstr "Por favor, introduzca una fecha válida." -#: static/adm/js/strftime.js:32 -msgid "January" -msgstr "Enero" +#: static/adm/js/gui.js:209 +msgid "Please enter a valid date (ISO)." +msgstr "Por favor, introduzca una fecha válida (ISO)." -#: static/adm/js/strftime.js:32 -msgid "February" -msgstr "Febrero" +#: static/adm/js/gui.js:210 +msgid "Please enter a valid number." +msgstr "Por favor, introduzca un número válido." -#: static/adm/js/strftime.js:32 -msgid "March" -msgstr "Marzo" +#: static/adm/js/gui.js:211 +msgid "Please enter only digits." +msgstr "Introduce sólo dígitos." -#: static/adm/js/strftime.js:33 -msgid "April" -msgstr "Abril" +#: static/adm/js/gui.js:212 +msgid "Please enter a valid credit card number." +msgstr "Por favor, introduzca un número de tarjeta de crédito válida." -#: static/adm/js/strftime.js:33 -msgid "May" -msgstr "Mayo" +#: static/adm/js/gui.js:213 +msgid "Please enter the same value again." +msgstr "Por favor, introduzca el valor mismo otra vez." -#: static/adm/js/strftime.js:33 -msgid "June" -msgstr "Junio" +#: static/adm/js/gui.js:214 +msgid "Please enter no more than {0} characters." +msgstr "Introduce no más de {0} caracteres." -#: static/adm/js/strftime.js:33 -msgid "July" -msgstr "Julio" +#: static/adm/js/gui.js:215 +msgid "Please enter at least {0} characters." +msgstr "Introduce al menos {0} caracteres." -#: static/adm/js/strftime.js:34 -msgid "August" -msgstr "Agosto" +#: static/adm/js/gui.js:216 +msgid "Please enter a value between {0} and {1} characters long." +msgstr "Por favor, introduzca un valor entre caracteres {0} y {1} durante mucho tiempo." -#: static/adm/js/strftime.js:34 -msgid "September" -msgstr "Septiembre" +#: static/adm/js/gui.js:217 +msgid "Please enter a value between {0} and {1}." +msgstr "Por favor, introduzca un valor entre {0} y {1}." -#: static/adm/js/strftime.js:34 -msgid "October" -msgstr "Octubre" +#: static/adm/js/gui.js:218 +msgid "Please enter a value less than or equal to {0}." +msgstr "Por favor, introduzca un valor menor o igual a {0}." -#: static/adm/js/strftime.js:34 -msgid "November" -msgstr "Noviembre" - -#: static/adm/js/strftime.js:35 -msgid "December" -msgstr "Diciembre" - -#: static/adm/js/tools.js:46 -msgid "Just a moment..." -msgstr "Un momento..." +#: static/adm/js/gui.js:219 +msgid "Please enter a value greater than or equal to {0}." +msgstr "Por favor, introduzca un valor mayor o igual a {0}." diff --git a/server/src/uds/locale/fr/LC_MESSAGES/django.mo b/server/src/uds/locale/fr/LC_MESSAGES/django.mo index 6a70275a2..ac4a9d093 100644 Binary files a/server/src/uds/locale/fr/LC_MESSAGES/django.mo and b/server/src/uds/locale/fr/LC_MESSAGES/django.mo differ diff --git a/server/src/uds/locale/fr/LC_MESSAGES/django.po b/server/src/uds/locale/fr/LC_MESSAGES/django.po index 3a509021b..1fa7772a1 100644 --- a/server/src/uds/locale/fr/LC_MESSAGES/django.po +++ b/server/src/uds/locale/fr/LC_MESSAGES/django.po @@ -32,7 +32,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -42,22 +42,32 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -#: REST/methods/authenticators.py:80 -msgid "Current authenticators" -msgstr "Authentificateurs actuels" - -#: REST/methods/authenticators.py:82 REST/methods/networks.py:68 -#: REST/methods/osmanagers.py:71 REST/methods/providers.py:69 -#: REST/methods/transports.py:71 REST/methods/users.py:77 +#: REST/mixins.py:172 REST/methods/authenticators.py:82 +#: REST/methods/networks.py:68 REST/methods/osmanagers.py:71 +#: REST/methods/providers.py:75 REST/methods/transports.py:79 +#: REST/methods/users_groups.py:73 msgid "Name" msgstr "Nom" -#: REST/methods/authenticators.py:83 REST/methods/osmanagers.py:72 -#: REST/methods/providers.py:70 REST/methods/transports.py:72 -#: REST/methods/users.py:78 +#: REST/mixins.py:175 +msgid "Name of this element" +msgstr "Nom de cet élément" + +#: REST/mixins.py:189 REST/methods/authenticators.py:83 +#: REST/methods/osmanagers.py:72 REST/methods/providers.py:76 +#: REST/methods/transports.py:80 REST/methods/users_groups.py:74 +#: REST/methods/users_groups.py:102 msgid "Comments" msgstr "Commentaires" +#: REST/mixins.py:192 +msgid "Comments for this element" +msgstr "Commentaires pour cet élément" + +#: REST/methods/authenticators.py:80 +msgid "Current authenticators" +msgstr "Authentificateurs actuels" + #: REST/methods/authenticators.py:84 msgid "Users" msgstr "Utilisateurs" @@ -72,7 +82,7 @@ msgid "Networks" msgstr "Réseaux" #: REST/methods/networks.py:70 REST/methods/osmanagers.py:73 -#: REST/methods/transports.py:73 +#: REST/methods/transports.py:81 msgid "Used by" msgstr "Utilisé par" @@ -80,40 +90,49 @@ msgstr "Utilisé par" msgid "Current OS Managers" msgstr "Dirigeants de OS actuels" -#: REST/methods/providers.py:67 +#: REST/methods/providers.py:73 msgid "Current service providers" msgstr "Fournisseurs de services actuels" -#: REST/methods/providers.py:71 templates/uds/index.html:51 +#: REST/methods/providers.py:77 templates/uds/index.html:51 #: templates/uds/html5/index.html:68 msgid "Services" msgstr "Services" -#: REST/methods/transports.py:69 +#: REST/methods/transports.py:77 msgid "Current Transports" msgstr "Transports actuels" -#: REST/methods/users.py:70 +#: REST/methods/users_groups.py:66 #, python-brace-format msgid "Users of {0}" msgstr "Utilisateurs de {0}" -#: REST/methods/users.py:72 +#: REST/methods/users_groups.py:68 msgid "Current users" msgstr "Utilisateurs actuels" -#: REST/methods/users.py:76 +#: REST/methods/users_groups.py:72 REST/methods/users_groups.py:101 msgid "User Id" msgstr "Id de l'utilisateur" -#: REST/methods/users.py:79 +#: REST/methods/users_groups.py:75 REST/methods/users_groups.py:103 msgid "state" msgstr "État" -#: REST/methods/users.py:80 +#: REST/methods/users_groups.py:76 msgid "Last access" msgstr "Dernier accès" +#: REST/methods/users_groups.py:95 +#, python-brace-format +msgid "Groups of {0}" +msgstr "Groupes de {0}" + +#: REST/methods/users_groups.py:97 +msgid "Current groups" +msgstr "Groupes actuels" + #: admin/views.py:55 admin/views.py:63 admin/views.py:77 web/views.py:422 msgid "Forbidden" msgstr "Interdit" @@ -152,7 +171,9 @@ msgstr "Compatibilité" #: auths/ActiveDirectory_enterprise/Authenticator.py:31 msgid "Compatibility of AD connection (Usually windows 2000 and later)" -msgstr "Compatibilité de connexion AD (généralement windows 2000 et versions ultérieures)" +msgstr "" +"Compatibilité de connexion AD (généralement windows 2000 et versions " +"ultérieures)" #: auths/ActiveDirectory_enterprise/Authenticator.py:33 #: auths/RegexLdap/Authenticator.py:52 auths/SimpleLDAP/Authenticator.py:52 @@ -164,8 +185,8 @@ msgid "" "Username with read privileges on the base selected (use USER@DOMAIN.DOM form " "for this)" msgstr "" -"Nom d'utilisateur avec des privilèges de lecture sur la base sélectionnée (utilisation USER@DOMAIN.Forme de DOM " -"pour cela)" +"Nom d'utilisateur avec des privilèges de lecture sur la base sélectionnée " +"(utilisation USER@DOMAIN.Forme de DOM pour cela)" #: auths/ActiveDirectory_enterprise/Authenticator.py:34 #: auths/ActiveDirectory_enterprise/Authenticator.py:52 @@ -280,17 +301,22 @@ msgstr "Domaine semble être incorrect, veuillez bien consulter le" #: auths/ActiveDirectory_enterprise/Authenticator.py:456 msgid "Ldap does not seem an Active Directory (do not have user objects)" -msgstr "LDAP ne semble pas un serveur Active Directory (n'ont pas les objets utilisateur)" +msgstr "" +"LDAP ne semble pas un serveur Active Directory (n'ont pas les objets " +"utilisateur)" #: auths/ActiveDirectory_enterprise/Authenticator.py:464 msgid "Ldap does not seem an Active Directory (no not have group objects)" -msgstr "LDAP ne semble pas un serveur Active Directory (ne pas ont des objets de groupe)" +msgstr "" +"LDAP ne semble pas un serveur Active Directory (ne pas ont des objets de " +"groupe)" #: auths/ActiveDirectory_enterprise/Authenticator.py:472 msgid "" "Ldap does not seem an Active Directory (do not have any user nor groups)" msgstr "" -"LDAP ne semble pas un serveur Active Directory (n'ont pas l'utilisateur ou groupes)" +"LDAP ne semble pas un serveur Active Directory (n'ont pas l'utilisateur ou " +"groupes)" #: auths/ActiveDirectory_enterprise/Authenticator.py:477 #: auths/EDirectory_enterprise/Authenticator.py:358 @@ -370,7 +396,8 @@ msgstr "Attribut groupe attendue " msgid "" "Ldap user class or user id attr is probably wrong (Ldap is an eDirectory?)" msgstr "" -"LDAP user class ou utilisateur id attr est probablement faux (Ldap est un eDirectory?)" +"LDAP user class ou utilisateur id attr est probablement faux (Ldap est un " +"eDirectory?)" #: auths/IP/Authenticator.py:48 auths/IP/Authenticator.py:50 msgid "IP Authenticator" @@ -533,7 +560,8 @@ msgstr "Métadonnées de l'IDP" msgid "" "You can enter here the URL or the IDP metadata or the metadata itself (xml)" msgstr "" -"Ici, vous pouvez entrer le URL ou les métadonnées d'IDP ou les métadonnées lui-même (xml)" +"Ici, vous pouvez entrer le URL ou les métadonnées d'IDP ou les métadonnées " +"lui-même (xml)" #: auths/SAML_enterprise/SAML.py:127 msgid "Entity ID" @@ -541,7 +569,9 @@ msgstr "ID de l'entité" #: auths/SAML_enterprise/SAML.py:128 msgid "ID of the SP. If left blank, this will be autogenerated from server URL" -msgstr "ID de la SP. Si laissé vide, ce sera généré automatiquement des URL du serveur" +msgstr "" +"ID de la SP. Si laissé vide, ce sera généré automatiquement des URL du " +"serveur" #: auths/SAML_enterprise/SAML.py:130 msgid "User name attrs" @@ -572,8 +602,8 @@ msgid "" "Server certificate should be a valid PEM (PEM certificates starts with -----" "BEGIN CERTIFICATE-----)" msgstr "" -"Certificat de serveur doit être un PEM valide (PEM certificats commence par---" -"BEGIN CERTIFICATE---)" +"Certificat de serveur doit être un PEM valide (PEM certificats commence " +"par---BEGIN CERTIFICATE---)" #: auths/SAML_enterprise/SAML.py:165 msgid "Invalid server certificate. " @@ -1157,7 +1187,9 @@ msgstr "Cluster HyperV lié Clone (expérimental)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:55 #: services/HyperV_enterprise/HyperVLinkedService.py:58 msgid "Hyper Services based on templates and differential disks (experimental)" -msgstr "Hyper Services basés sur des modèles et des disques différentiels (expérimentales)" +msgstr "" +"Hyper Services basés sur des modèles et des disques différentiels " +"(expérimentales)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:72 #: services/HyperV_enterprise/HyperVLinkedService.py:75 @@ -1199,7 +1231,8 @@ msgstr "Réseau" msgid "" "If more than 1 interface is found in machine, use one on this network as main" msgstr "" -"Si plus d'une interface se trouve dans la machine, utiliser un sur ce réseau comme principal" +"Si plus d'une interface se trouve dans la machine, utiliser un sur ce réseau " +"comme principal" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:98 #: services/HyperV_enterprise/HyperVLinkedService.py:101 @@ -1222,7 +1255,8 @@ msgstr "Lecteurs de magasin de données" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:101 #: services/HyperV_enterprise/HyperVLinkedService.py:104 msgid "Datastores where to put incrementals & publications" -msgstr "Entrepôts de données où mettre les sauvegardes incrémentielles & publications" +msgstr "" +"Entrepôts de données où mettre les sauvegardes incrémentielles & publications" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:102 #: services/HyperV_enterprise/HyperVLinkedService.py:105 @@ -1278,7 +1312,8 @@ msgstr "Fournisseur de Service de Cluster HyperV" #: services/HyperV_enterprise/HyperVClusterProvider.py:89 #: services/HyperV_enterprise/HyperVProvider.py:81 msgid "HyperV Server IP or Hostname (must enable first WSMAN access)" -msgstr "HyperV serveur IP ou nom d'hôte (doit permettre l'accès WSMAN première)" +msgstr "" +"HyperV serveur IP ou nom d'hôte (doit permettre l'accès WSMAN première)" #: services/HyperV_enterprise/HyperVClusterProvider.py:90 #: services/HyperV_enterprise/HyperVProvider.py:82 @@ -1786,15 +1821,27 @@ msgstr "Tableau de bord de sortie" msgid "logout" msgstr "logout" -#: templates/uds/admin/tmpl/authenticators.html:4 -msgid "administration of authenticators" -msgstr "administration des authentificateurs" - #: templates/uds/admin/tmpl/connectivity.html:4 #: templates/uds/admin/tmpl/dashboard.html:4 msgid "overview" msgstr "vue d'ensemble" +#: templates/uds/admin/tmpl/modal.html:18 +msgid "Close" +msgstr "Fermer" + +#: templates/uds/admin/tmpl/modal.html:25 +msgid "Save" +msgstr "Enregistrer" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "Yes" +msgstr "Oui" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "No" +msgstr "Non" + #: templates/uds/html5/detectJava.html:4 msgid "Login redirection to UDS" msgstr "Redirection de connexion à l'UDS" @@ -2259,8 +2306,8 @@ msgid "" "The lowest image quality applied to images to maintain the minimum update " "rate." msgstr "" -"La qualité d'image le plus bas appliquée aux images de maintenir la mise à jour minimale " -"Ravel" +"La qualité d'image le plus bas appliquée aux images de maintenir la mise à " +"jour minimale Ravel" #: transports/RGS-enterprise/RGSTransport.py:51 #: transports/RGS-enterprise/TRGSTransport.py:56 @@ -2270,7 +2317,8 @@ msgstr "Cadence réglable" #: transports/RGS-enterprise/RGSTransport.py:52 #: transports/RGS-enterprise/TRGSTransport.py:57 msgid "Update rate threshold to begin adjusting image quality" -msgstr "Seuil de taux de mise à jour pour commencer le réglage qualité de l'image" +msgstr "" +"Seuil de taux de mise à jour pour commencer le réglage qualité de l'image" #: transports/RGS-enterprise/RGSTransport.py:53 #: transports/RGS-enterprise/TRGSTransport.py:58 @@ -2283,8 +2331,8 @@ msgid "" "Change the Sender's resolution to match the Receiver's resolution when " "connecting" msgstr "" -"Changer la résolution de l'expéditeur pour l'adapter résolution du récepteur lorsque " -"connexion" +"Changer la résolution de l'expéditeur pour l'adapter résolution du récepteur " +"lorsque connexion" #: transports/RGS-enterprise/RGSTransport.py:55 #: transports/RGS-enterprise/TRGSTransport.py:60 @@ -2326,7 +2374,8 @@ msgstr "RGS Transport pour connexion par tunnel" #: transports/RGS-enterprise/web.py:82 msgid "In order to use this service, you should first install RGS Receiver." -msgstr "Pour utiliser ce service, vous devez commencer par installer récepteur RGS." +msgstr "" +"Pour utiliser ce service, vous devez commencer par installer récepteur RGS." #: transports/RGS-enterprise/web.py:83 msgid "HP Website" diff --git a/server/src/uds/locale/fr/LC_MESSAGES/djangojs.mo b/server/src/uds/locale/fr/LC_MESSAGES/djangojs.mo index 4412a3071..bdaa1e149 100644 Binary files a/server/src/uds/locale/fr/LC_MESSAGES/djangojs.mo and b/server/src/uds/locale/fr/LC_MESSAGES/djangojs.mo differ diff --git a/server/src/uds/locale/fr/LC_MESSAGES/djangojs.po b/server/src/uds/locale/fr/LC_MESSAGES/djangojs.po index 098fc6f3e..48083a586 100644 --- a/server/src/uds/locale/fr/LC_MESSAGES/djangojs.po +++ b/server/src/uds/locale/fr/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,146 +18,234 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#: static/adm/js/api-tools.js:46 +msgid "Just a moment..." +msgstr "Un instant..." + +#: static/adm/js/api-tools.js:75 +msgid "Sunday" +msgstr "Dimanche" + +#: static/adm/js/api-tools.js:75 +msgid "Monday" +msgstr "Lundi" + +#: static/adm/js/api-tools.js:75 +msgid "Tuesday" +msgstr "Mardi" + +#: static/adm/js/api-tools.js:75 +msgid "Wednesday" +msgstr "Mercredi" + +#: static/adm/js/api-tools.js:76 +msgid "Thursday" +msgstr "Jeudi" + +#: static/adm/js/api-tools.js:76 +msgid "Friday" +msgstr "Vendredi" + +#: static/adm/js/api-tools.js:76 +msgid "Saturday" +msgstr "Samedi" + +#: static/adm/js/api-tools.js:77 +msgid "January" +msgstr "Janvier" + +#: static/adm/js/api-tools.js:77 +msgid "February" +msgstr "Février" + +#: static/adm/js/api-tools.js:77 +msgid "March" +msgstr "Mars" + +#: static/adm/js/api-tools.js:77 +msgid "April" +msgstr "Avril" + +#: static/adm/js/api-tools.js:77 +msgid "May" +msgstr "Mai" + +#: static/adm/js/api-tools.js:78 +msgid "June" +msgstr "Juin" + +#: static/adm/js/api-tools.js:78 +msgid "July" +msgstr "Juillet" + +#: static/adm/js/api-tools.js:78 +msgid "August" +msgstr "Août" + +#: static/adm/js/api-tools.js:78 +msgid "September" +msgstr "Septembre" + +#: static/adm/js/api-tools.js:78 +msgid "October" +msgstr "Octobre" + +#: static/adm/js/api-tools.js:79 +msgid "November" +msgstr "Novembre" + +#: static/adm/js/api-tools.js:79 +msgid "December" +msgstr "Décembre" + +#: static/adm/js/dataTables.bootstrap.js:6 static/adm/js/gui.js:19 +msgid "_MENU_ records per page" +msgstr "Documents _MENU_ par page" + #: static/adm/js/gui-elements.js:33 msgid "Service Providers" msgstr "Fournisseurs de services" -#: static/adm/js/gui.js:18 -msgid "_MENU_ records per page" -msgstr "Documents _MENU_ par page" +#: static/adm/js/gui-elements.js:40 +msgid "Edit service provider" +msgstr "Modifier le fournisseur de services" -#: static/adm/js/gui.js:19 +#: static/adm/js/gui-elements.js:104 +msgid "Edit authenticator" +msgstr "Modifier l'authentificateur" + +#: static/adm/js/gui-elements.js:149 +msgid "Edit transport" +msgstr "Edit de transport" + +#: static/adm/js/gui-elements.js:159 +msgid "New transport" +msgstr "Nouveau transport" + +#: static/adm/js/gui.js:20 msgid "Empty" msgstr "Vide" -#: static/adm/js/gui.js:20 +#: static/adm/js/gui.js:21 msgid "Records _START_ to _END_ of _TOTAL_" msgstr "Dossiers _START_ à _END_ de _TOTAL_" -#: static/adm/js/gui.js:21 +#: static/adm/js/gui.js:22 msgid "No records" msgstr "Aucun enregistrement" -#: static/adm/js/gui.js:22 +#: static/adm/js/gui.js:23 msgid "(filtered from _MAX_ total records)" msgstr "(filtrée de total d'enregistrements _MAX_)" -#: static/adm/js/gui.js:23 +#: static/adm/js/gui.js:24 msgid "Please wait, processing" msgstr "Veuillez patienter, traitement" -#: static/adm/js/gui.js:24 +#: static/adm/js/gui.js:25 msgid "Filter" msgstr "Filtre" -#: static/adm/js/gui.js:27 +#: static/adm/js/gui.js:28 msgid "First" msgstr "Première" -#: static/adm/js/gui.js:28 +#: static/adm/js/gui.js:29 msgid "Last" msgstr "Dernière" -#: static/adm/js/gui.js:29 +#: static/adm/js/gui.js:30 msgid "Next" msgstr "Prochaine" -#: static/adm/js/gui.js:30 +#: static/adm/js/gui.js:31 msgid "Previous" msgstr "Précédent" -#: static/adm/js/gui.js:75 -msgid "Deployed services" -msgstr "Services déployés" +#: static/adm/js/gui.js:37 +msgid "New" +msgstr "Nouveau" -#: static/adm/js/gui.js:360 +#: static/adm/js/gui.js:41 msgid "Edit" msgstr "Edit" -#: static/adm/js/gui.js:369 +#: static/adm/js/gui.js:45 msgid "Delete" msgstr "Supprimer" -#: static/adm/js/gui.js:378 +#: static/adm/js/gui.js:49 msgid "Refresh" msgstr "Actualisation" -#: static/adm/js/strftime.js:30 -msgid "Sunday" -msgstr "Dimanche" +#: static/adm/js/gui.js:53 +msgid "Xls" +msgstr "XLS" -#: static/adm/js/strftime.js:30 -msgid "Monday" -msgstr "Lundi" +#: static/adm/js/gui.js:166 +msgid "Deployed services" +msgstr "Services déployés" -#: static/adm/js/strftime.js:30 -msgid "Tuesday" -msgstr "Mardi" +#: static/adm/js/gui.js:204 +msgid "This field is required." +msgstr "Ce champ est obligatoire." -#: static/adm/js/strftime.js:31 -msgid "Wednesday" -msgstr "Mercredi" +#: static/adm/js/gui.js:205 +msgid "Please fix this field." +msgstr "Corrigez ce champ." -#: static/adm/js/strftime.js:31 -msgid "Thursday" -msgstr "Jeudi" +#: static/adm/js/gui.js:206 +msgid "Please enter a valid email address." +msgstr "Veuillez entrer une adresse email valide." -#: static/adm/js/strftime.js:31 -msgid "Friday" -msgstr "Vendredi" +#: static/adm/js/gui.js:207 +msgid "Please enter a valid URL." +msgstr "Veuillez entrer une URL valide." -#: static/adm/js/strftime.js:31 -msgid "Saturday" -msgstr "Samedi" +#: static/adm/js/gui.js:208 +msgid "Please enter a valid date." +msgstr "Veuillez entrer une date valide." -#: static/adm/js/strftime.js:32 -msgid "January" -msgstr "Janvier" +#: static/adm/js/gui.js:209 +msgid "Please enter a valid date (ISO)." +msgstr "Veuillez entrer une date valide (ISO)." -#: static/adm/js/strftime.js:32 -msgid "February" -msgstr "Février" +#: static/adm/js/gui.js:210 +msgid "Please enter a valid number." +msgstr "Veuillez entrer un numéro valide." -#: static/adm/js/strftime.js:32 -msgid "March" -msgstr "Mars" +#: static/adm/js/gui.js:211 +msgid "Please enter only digits." +msgstr "Veuillez saisir uniquement des chiffres." -#: static/adm/js/strftime.js:33 -msgid "April" -msgstr "Avril" +#: static/adm/js/gui.js:212 +msgid "Please enter a valid credit card number." +msgstr "Veuillez entrer un numéro de carte de crédit valide." -#: static/adm/js/strftime.js:33 -msgid "May" -msgstr "Mai" +#: static/adm/js/gui.js:213 +msgid "Please enter the same value again." +msgstr "Entrez à nouveau la même valeur." -#: static/adm/js/strftime.js:33 -msgid "June" -msgstr "Juin" +#: static/adm/js/gui.js:214 +msgid "Please enter no more than {0} characters." +msgstr "S'il vous plaît entrez pas plus de {0} caractères." -#: static/adm/js/strftime.js:33 -msgid "July" -msgstr "Juillet" +#: static/adm/js/gui.js:215 +msgid "Please enter at least {0} characters." +msgstr "Veuillez saisir au moins {0} caractères." -#: static/adm/js/strftime.js:34 -msgid "August" -msgstr "Août" +#: static/adm/js/gui.js:216 +msgid "Please enter a value between {0} and {1} characters long." +msgstr "Veuillez entrer une valeur entre {0} et {1} caractères longtemps." -#: static/adm/js/strftime.js:34 -msgid "September" -msgstr "Septembre" +#: static/adm/js/gui.js:217 +msgid "Please enter a value between {0} and {1}." +msgstr "Veuillez entrer une valeur entre {0} et {1}." -#: static/adm/js/strftime.js:34 -msgid "October" -msgstr "Octobre" +#: static/adm/js/gui.js:218 +msgid "Please enter a value less than or equal to {0}." +msgstr "Veuillez entrer une valeur inférieure ou égale à {0}." -#: static/adm/js/strftime.js:34 -msgid "November" -msgstr "Novembre" - -#: static/adm/js/strftime.js:35 -msgid "December" -msgstr "Décembre" - -#: static/adm/js/tools.js:46 -msgid "Just a moment..." -msgstr "Un instant..." +#: static/adm/js/gui.js:219 +msgid "Please enter a value greater than or equal to {0}." +msgstr "Entrez une valeur supérieure ou égale à {0}." diff --git a/server/src/uds/locale/it/LC_MESSAGES/django.mo b/server/src/uds/locale/it/LC_MESSAGES/django.mo index a7d0afe7c..32307f4db 100644 Binary files a/server/src/uds/locale/it/LC_MESSAGES/django.mo and b/server/src/uds/locale/it/LC_MESSAGES/django.mo differ diff --git a/server/src/uds/locale/it/LC_MESSAGES/django.po b/server/src/uds/locale/it/LC_MESSAGES/django.po index b5414e8f4..227e920f5 100644 --- a/server/src/uds/locale/it/LC_MESSAGES/django.po +++ b/server/src/uds/locale/it/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,22 +18,32 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: REST/methods/authenticators.py:80 -msgid "Current authenticators" -msgstr "Autenticatori correnti" - -#: REST/methods/authenticators.py:82 REST/methods/networks.py:68 -#: REST/methods/osmanagers.py:71 REST/methods/providers.py:69 -#: REST/methods/transports.py:71 REST/methods/users.py:77 +#: REST/mixins.py:172 REST/methods/authenticators.py:82 +#: REST/methods/networks.py:68 REST/methods/osmanagers.py:71 +#: REST/methods/providers.py:75 REST/methods/transports.py:79 +#: REST/methods/users_groups.py:73 msgid "Name" msgstr "Nome" -#: REST/methods/authenticators.py:83 REST/methods/osmanagers.py:72 -#: REST/methods/providers.py:70 REST/methods/transports.py:72 -#: REST/methods/users.py:78 +#: REST/mixins.py:175 +msgid "Name of this element" +msgstr "Nome di questo elemento" + +#: REST/mixins.py:189 REST/methods/authenticators.py:83 +#: REST/methods/osmanagers.py:72 REST/methods/providers.py:76 +#: REST/methods/transports.py:80 REST/methods/users_groups.py:74 +#: REST/methods/users_groups.py:102 msgid "Comments" msgstr "Commenti" +#: REST/mixins.py:192 +msgid "Comments for this element" +msgstr "Commenti per questo elemento" + +#: REST/methods/authenticators.py:80 +msgid "Current authenticators" +msgstr "Autenticatori correnti" + #: REST/methods/authenticators.py:84 msgid "Users" msgstr "Utenti" @@ -48,7 +58,7 @@ msgid "Networks" msgstr "Reti" #: REST/methods/networks.py:70 REST/methods/osmanagers.py:73 -#: REST/methods/transports.py:73 +#: REST/methods/transports.py:81 msgid "Used by" msgstr "Utilizzato da" @@ -56,40 +66,49 @@ msgstr "Utilizzato da" msgid "Current OS Managers" msgstr "Attuale OS Manager" -#: REST/methods/providers.py:67 +#: REST/methods/providers.py:73 msgid "Current service providers" msgstr "Attuali fornitori di servizi" -#: REST/methods/providers.py:71 templates/uds/index.html:51 +#: REST/methods/providers.py:77 templates/uds/index.html:51 #: templates/uds/html5/index.html:68 msgid "Services" msgstr "Servizi" -#: REST/methods/transports.py:69 +#: REST/methods/transports.py:77 msgid "Current Transports" msgstr "Trasporti correnti" -#: REST/methods/users.py:70 +#: REST/methods/users_groups.py:66 #, python-brace-format msgid "Users of {0}" msgstr "Utenti di {0}" -#: REST/methods/users.py:72 +#: REST/methods/users_groups.py:68 msgid "Current users" msgstr "Utenti correnti" -#: REST/methods/users.py:76 +#: REST/methods/users_groups.py:72 REST/methods/users_groups.py:101 msgid "User Id" msgstr "Id utente" -#: REST/methods/users.py:79 +#: REST/methods/users_groups.py:75 REST/methods/users_groups.py:103 msgid "state" msgstr "stato" -#: REST/methods/users.py:80 +#: REST/methods/users_groups.py:76 msgid "Last access" msgstr "Ultimo accesso" +#: REST/methods/users_groups.py:95 +#, python-brace-format +msgid "Groups of {0}" +msgstr "Gruppi di {0}" + +#: REST/methods/users_groups.py:97 +msgid "Current groups" +msgstr "Gruppi di corrente" + #: admin/views.py:55 admin/views.py:63 admin/views.py:77 web/views.py:422 msgid "Forbidden" msgstr "Vietato" @@ -128,7 +147,9 @@ msgstr "Compatibilità" #: auths/ActiveDirectory_enterprise/Authenticator.py:31 msgid "Compatibility of AD connection (Usually windows 2000 and later)" -msgstr "Compatibilità di connessione AD (solitamente windows 2000 e versioni successive)" +msgstr "" +"Compatibilità di connessione AD (solitamente windows 2000 e versioni " +"successive)" #: auths/ActiveDirectory_enterprise/Authenticator.py:33 #: auths/RegexLdap/Authenticator.py:52 auths/SimpleLDAP/Authenticator.py:52 @@ -140,8 +161,8 @@ msgid "" "Username with read privileges on the base selected (use USER@DOMAIN.DOM form " "for this)" msgstr "" -"Nome utente con privilegi di lettura sulla base selezionato (uso USER@DOMAIN.Forma di DOM " -"per questo)" +"Nome utente con privilegi di lettura sulla base selezionato (uso USER@DOMAIN." +"Forma di DOM per questo)" #: auths/ActiveDirectory_enterprise/Authenticator.py:34 #: auths/ActiveDirectory_enterprise/Authenticator.py:52 @@ -265,8 +286,7 @@ msgstr "LDAP non sembra un'Active Directory (no, non sono oggetti di gruppo)" #: auths/ActiveDirectory_enterprise/Authenticator.py:472 msgid "" "Ldap does not seem an Active Directory (do not have any user nor groups)" -msgstr "" -"LDAP non sembra un'Active Directory (non hanno alcun utente né gruppi)" +msgstr "LDAP non sembra un'Active Directory (non hanno alcun utente né gruppi)" #: auths/ActiveDirectory_enterprise/Authenticator.py:477 #: auths/EDirectory_enterprise/Authenticator.py:358 @@ -345,7 +365,8 @@ msgstr "Attributo di gruppo previsto " msgid "" "Ldap user class or user id attr is probably wrong (Ldap is an eDirectory?)" msgstr "" -"LDAP dell'utente utente o classe id attr è probabilmente sbagliato (Ldap è un eDirectory?)" +"LDAP dell'utente utente o classe id attr è probabilmente sbagliato (Ldap è " +"un eDirectory?)" #: auths/IP/Authenticator.py:48 auths/IP/Authenticator.py:50 msgid "IP Authenticator" @@ -486,8 +507,8 @@ msgid "" "Private key used for sign and encription, as generated in base 64 from " "openssl" msgstr "" -"Chiave privata utilizzata per segno ed encription, come generato in base 64 da " -"OpenSSL" +"Chiave privata utilizzata per segno ed encription, come generato in base 64 " +"da OpenSSL" #: auths/SAML_enterprise/SAML.py:122 msgid "Certificate" @@ -513,7 +534,9 @@ msgstr "ID entità" #: auths/SAML_enterprise/SAML.py:128 msgid "ID of the SP. If left blank, this will be autogenerated from server URL" -msgstr "ID della SP. Se lasciato vuoto, questo sarà generato automaticamente dal server URL" +msgstr "" +"ID della SP. Se lasciato vuoto, questo sarà generato automaticamente dal " +"server URL" #: auths/SAML_enterprise/SAML.py:130 msgid "User name attrs" @@ -544,8 +567,8 @@ msgid "" "Server certificate should be a valid PEM (PEM certificates starts with -----" "BEGIN CERTIFICATE-----)" msgstr "" -"Certificato server dovrebbe essere un valido PEM (PEM certificati inizia con---" -"BEGIN CERTIFICATE---)" +"Certificato server dovrebbe essere un valido PEM (PEM certificati inizia " +"con---BEGIN CERTIFICATE---)" #: auths/SAML_enterprise/SAML.py:165 msgid "Invalid server certificate. " @@ -556,8 +579,8 @@ msgid "" "Private key should be a valid PEM (PEM private keys starts with -----BEGIN " "RSA PRIVATE KEY-----" msgstr "" -"Chiave privata deve essere un valido PEM (PEM chiavi private inizia con----BEGIN " -"CHIAVE PRIVATA RSA-" +"Chiave privata deve essere un valido PEM (PEM chiavi private inizia con----" +"BEGIN CHIAVE PRIVATA RSA-" #: auths/SAML_enterprise/SAML.py:197 #, python-brace-format @@ -1172,7 +1195,8 @@ msgstr "Rete" msgid "" "If more than 1 interface is found in machine, use one on this network as main" msgstr "" -"Se più di 1 interfaccia si trova in macchina, utilizzare uno su questa rete come principale" +"Se più di 1 interfaccia si trova in macchina, utilizzare uno su questa rete " +"come principale" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:98 #: services/HyperV_enterprise/HyperVLinkedService.py:101 @@ -1250,7 +1274,9 @@ msgstr "HyperV Cluster Service Provider" #: services/HyperV_enterprise/HyperVClusterProvider.py:89 #: services/HyperV_enterprise/HyperVProvider.py:81 msgid "HyperV Server IP or Hostname (must enable first WSMAN access)" -msgstr "HyperV Server IP o l'Hostname (necessario abilitare l'accesso prima di WS-Management)" +msgstr "" +"HyperV Server IP o l'Hostname (necessario abilitare l'accesso prima di WS-" +"Management)" #: services/HyperV_enterprise/HyperVClusterProvider.py:90 #: services/HyperV_enterprise/HyperVProvider.py:82 @@ -1620,7 +1646,8 @@ msgstr "Base di clone collegato VMWare" msgid "" "This service provides access to Linked Clones machines on a Virtual Center" msgstr "" -"Questo servizio fornisce l'accesso alle macchine collegate cloni su un Virtual Center" +"Questo servizio fornisce l'accesso alle macchine collegate cloni su un " +"Virtual Center" #: templates/404.html:3 templates/500.html:3 msgid "Page not found" @@ -1754,15 +1781,27 @@ msgstr "Cruscotto di uscita" msgid "logout" msgstr "logout" -#: templates/uds/admin/tmpl/authenticators.html:4 -msgid "administration of authenticators" -msgstr "amministrazione di autenticatori" - #: templates/uds/admin/tmpl/connectivity.html:4 #: templates/uds/admin/tmpl/dashboard.html:4 msgid "overview" msgstr "Panoramica" +#: templates/uds/admin/tmpl/modal.html:18 +msgid "Close" +msgstr "Chiudere" + +#: templates/uds/admin/tmpl/modal.html:25 +msgid "Save" +msgstr "Salvare" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "Yes" +msgstr "Sì" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "No" +msgstr "No" + #: templates/uds/html5/detectJava.html:4 msgid "Login redirection to UDS" msgstr "Reindirizzamento login a UDS" @@ -2210,7 +2249,9 @@ msgstr "Qualità regolabili" #: transports/RGS-enterprise/RGSTransport.py:48 #: transports/RGS-enterprise/TRGSTransport.py:53 msgid "If checked, the image quality will be adjustable with bandwidth" -msgstr "Se selezionata, la qualità dell'immagine sarà regolabile con larghezza di banda" +msgstr "" +"Se selezionata, la qualità dell'immagine sarà regolabile con larghezza di " +"banda" #: transports/RGS-enterprise/RGSTransport.py:49 #: transports/RGS-enterprise/TRGSTransport.py:54 @@ -2223,8 +2264,8 @@ msgid "" "The lowest image quality applied to images to maintain the minimum update " "rate." msgstr "" -"La qualità d'immagine più bassa applicata alle immagini per mantenere l'aggiornamento minimo " -"tasso." +"La qualità d'immagine più bassa applicata alle immagini per mantenere " +"l'aggiornamento minimo tasso." #: transports/RGS-enterprise/RGSTransport.py:51 #: transports/RGS-enterprise/TRGSTransport.py:56 @@ -2234,7 +2275,9 @@ msgstr "Frequenza fotogrammi regolabile" #: transports/RGS-enterprise/RGSTransport.py:52 #: transports/RGS-enterprise/TRGSTransport.py:57 msgid "Update rate threshold to begin adjusting image quality" -msgstr "Soglia tasso di aggiornamento per iniziare a regolare la qualità dell'immagine" +msgstr "" +"Soglia tasso di aggiornamento per iniziare a regolare la qualità " +"dell'immagine" #: transports/RGS-enterprise/RGSTransport.py:53 #: transports/RGS-enterprise/TRGSTransport.py:58 @@ -2247,8 +2290,8 @@ msgid "" "Change the Sender's resolution to match the Receiver's resolution when " "connecting" msgstr "" -"Cambiare risoluzione del mittente per abbinare la risoluzione del ricevitore quando " -"collegamento" +"Cambiare risoluzione del mittente per abbinare la risoluzione del ricevitore " +"quando collegamento" #: transports/RGS-enterprise/RGSTransport.py:55 #: transports/RGS-enterprise/TRGSTransport.py:60 @@ -2290,7 +2333,9 @@ msgstr "RGS trasporto per connessione con tunnel" #: transports/RGS-enterprise/web.py:82 msgid "In order to use this service, you should first install RGS Receiver." -msgstr "Per poter utilizzare questo servizio, è necessario prima installare RGS ricevitore." +msgstr "" +"Per poter utilizzare questo servizio, è necessario prima installare RGS " +"ricevitore." #: transports/RGS-enterprise/web.py:83 msgid "HP Website" diff --git a/server/src/uds/locale/it/LC_MESSAGES/djangojs.mo b/server/src/uds/locale/it/LC_MESSAGES/djangojs.mo index f3d169b0b..ab4860591 100644 Binary files a/server/src/uds/locale/it/LC_MESSAGES/djangojs.mo and b/server/src/uds/locale/it/LC_MESSAGES/djangojs.mo differ diff --git a/server/src/uds/locale/it/LC_MESSAGES/djangojs.po b/server/src/uds/locale/it/LC_MESSAGES/djangojs.po index c4c2ee671..3655967ea 100644 --- a/server/src/uds/locale/it/LC_MESSAGES/djangojs.po +++ b/server/src/uds/locale/it/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,146 +18,234 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: static/adm/js/api-tools.js:46 +msgid "Just a moment..." +msgstr "Solo un momento..." + +#: static/adm/js/api-tools.js:75 +msgid "Sunday" +msgstr "Domenica" + +#: static/adm/js/api-tools.js:75 +msgid "Monday" +msgstr "Lunedì" + +#: static/adm/js/api-tools.js:75 +msgid "Tuesday" +msgstr "Martedì" + +#: static/adm/js/api-tools.js:75 +msgid "Wednesday" +msgstr "Mercoledì" + +#: static/adm/js/api-tools.js:76 +msgid "Thursday" +msgstr "Giovedì" + +#: static/adm/js/api-tools.js:76 +msgid "Friday" +msgstr "Venerdì" + +#: static/adm/js/api-tools.js:76 +msgid "Saturday" +msgstr "Sabato" + +#: static/adm/js/api-tools.js:77 +msgid "January" +msgstr "Gennaio" + +#: static/adm/js/api-tools.js:77 +msgid "February" +msgstr "Febbraio" + +#: static/adm/js/api-tools.js:77 +msgid "March" +msgstr "Marzo" + +#: static/adm/js/api-tools.js:77 +msgid "April" +msgstr "Aprile" + +#: static/adm/js/api-tools.js:77 +msgid "May" +msgstr "Maggio" + +#: static/adm/js/api-tools.js:78 +msgid "June" +msgstr "Giugno" + +#: static/adm/js/api-tools.js:78 +msgid "July" +msgstr "Luglio" + +#: static/adm/js/api-tools.js:78 +msgid "August" +msgstr "Agosto" + +#: static/adm/js/api-tools.js:78 +msgid "September" +msgstr "Settembre" + +#: static/adm/js/api-tools.js:78 +msgid "October" +msgstr "Ottobre" + +#: static/adm/js/api-tools.js:79 +msgid "November" +msgstr "Novembre" + +#: static/adm/js/api-tools.js:79 +msgid "December" +msgstr "Dicembre" + +#: static/adm/js/dataTables.bootstrap.js:6 static/adm/js/gui.js:19 +msgid "_MENU_ records per page" +msgstr "Record _MENU_ per pagina" + #: static/adm/js/gui-elements.js:33 msgid "Service Providers" msgstr "Fornitori di servizi" -#: static/adm/js/gui.js:18 -msgid "_MENU_ records per page" -msgstr "Record _MENU_ per pagina" +#: static/adm/js/gui-elements.js:40 +msgid "Edit service provider" +msgstr "Modificare il provider di servizi" -#: static/adm/js/gui.js:19 +#: static/adm/js/gui-elements.js:104 +msgid "Edit authenticator" +msgstr "Modifica autenticatore" + +#: static/adm/js/gui-elements.js:149 +msgid "Edit transport" +msgstr "Modifica trasporto" + +#: static/adm/js/gui-elements.js:159 +msgid "New transport" +msgstr "Nuovo trasporto" + +#: static/adm/js/gui.js:20 msgid "Empty" msgstr "Vuoto" -#: static/adm/js/gui.js:20 +#: static/adm/js/gui.js:21 msgid "Records _START_ to _END_ of _TOTAL_" msgstr "Registra _START_ a _END_ di _TOTAL_" -#: static/adm/js/gui.js:21 +#: static/adm/js/gui.js:22 msgid "No records" msgstr "Nessun record" -#: static/adm/js/gui.js:22 +#: static/adm/js/gui.js:23 msgid "(filtered from _MAX_ total records)" msgstr "(filtrato da record totale _MAX_)" -#: static/adm/js/gui.js:23 +#: static/adm/js/gui.js:24 msgid "Please wait, processing" msgstr "Attendere prego, elaborazione" -#: static/adm/js/gui.js:24 +#: static/adm/js/gui.js:25 msgid "Filter" msgstr "Filtro" -#: static/adm/js/gui.js:27 +#: static/adm/js/gui.js:28 msgid "First" msgstr "Primo" -#: static/adm/js/gui.js:28 +#: static/adm/js/gui.js:29 msgid "Last" msgstr "Ultima" -#: static/adm/js/gui.js:29 +#: static/adm/js/gui.js:30 msgid "Next" msgstr "Prossimo" -#: static/adm/js/gui.js:30 +#: static/adm/js/gui.js:31 msgid "Previous" msgstr "Precedente" -#: static/adm/js/gui.js:75 -msgid "Deployed services" -msgstr "Servizi distribuiti" +#: static/adm/js/gui.js:37 +msgid "New" +msgstr "Nuovo" -#: static/adm/js/gui.js:360 +#: static/adm/js/gui.js:41 msgid "Edit" msgstr "Modifica" -#: static/adm/js/gui.js:369 +#: static/adm/js/gui.js:45 msgid "Delete" msgstr "Eliminare" -#: static/adm/js/gui.js:378 +#: static/adm/js/gui.js:49 msgid "Refresh" msgstr "Aggiornamento" -#: static/adm/js/strftime.js:30 -msgid "Sunday" -msgstr "Domenica" +#: static/adm/js/gui.js:53 +msgid "Xls" +msgstr "Xls" -#: static/adm/js/strftime.js:30 -msgid "Monday" -msgstr "Lunedì" +#: static/adm/js/gui.js:166 +msgid "Deployed services" +msgstr "Servizi distribuiti" -#: static/adm/js/strftime.js:30 -msgid "Tuesday" -msgstr "Martedì" +#: static/adm/js/gui.js:204 +msgid "This field is required." +msgstr "Questo campo è obbligatorio." -#: static/adm/js/strftime.js:31 -msgid "Wednesday" -msgstr "Mercoledì" +#: static/adm/js/gui.js:205 +msgid "Please fix this field." +msgstr "Si prega di correggere questo campo." -#: static/adm/js/strftime.js:31 -msgid "Thursday" -msgstr "Giovedì" +#: static/adm/js/gui.js:206 +msgid "Please enter a valid email address." +msgstr "Inserisci un indirizzo email valido." -#: static/adm/js/strftime.js:31 -msgid "Friday" -msgstr "Venerdì" +#: static/adm/js/gui.js:207 +msgid "Please enter a valid URL." +msgstr "Immettere un URL valido." -#: static/adm/js/strftime.js:31 -msgid "Saturday" -msgstr "Sabato" +#: static/adm/js/gui.js:208 +msgid "Please enter a valid date." +msgstr "Inserisci una data valida." -#: static/adm/js/strftime.js:32 -msgid "January" -msgstr "Gennaio" +#: static/adm/js/gui.js:209 +msgid "Please enter a valid date (ISO)." +msgstr "Inserisci una data valida (ISO)." -#: static/adm/js/strftime.js:32 -msgid "February" -msgstr "Febbraio" +#: static/adm/js/gui.js:210 +msgid "Please enter a valid number." +msgstr "Si prega di inserire un numero valido." -#: static/adm/js/strftime.js:32 -msgid "March" -msgstr "Marzo" +#: static/adm/js/gui.js:211 +msgid "Please enter only digits." +msgstr "Inserire solo cifre." -#: static/adm/js/strftime.js:33 -msgid "April" -msgstr "Aprile" +#: static/adm/js/gui.js:212 +msgid "Please enter a valid credit card number." +msgstr "Si prega di inserire un numero di carta di credito valida." -#: static/adm/js/strftime.js:33 -msgid "May" -msgstr "Maggio" +#: static/adm/js/gui.js:213 +msgid "Please enter the same value again." +msgstr "Inserisci nuovamente lo stesso valore." -#: static/adm/js/strftime.js:33 -msgid "June" -msgstr "Giugno" +#: static/adm/js/gui.js:214 +msgid "Please enter no more than {0} characters." +msgstr "Si prega di inserire non più di {0} caratteri." -#: static/adm/js/strftime.js:33 -msgid "July" -msgstr "Luglio" +#: static/adm/js/gui.js:215 +msgid "Please enter at least {0} characters." +msgstr "Si prega di inserire almeno {0} caratteri." -#: static/adm/js/strftime.js:34 -msgid "August" -msgstr "Agosto" +#: static/adm/js/gui.js:216 +msgid "Please enter a value between {0} and {1} characters long." +msgstr "Per favore inserisci un valore tra {0} e {1} caratteri lungo." -#: static/adm/js/strftime.js:34 -msgid "September" -msgstr "Settembre" +#: static/adm/js/gui.js:217 +msgid "Please enter a value between {0} and {1}." +msgstr "Immettere un valore compreso tra {0} e {1}." -#: static/adm/js/strftime.js:34 -msgid "October" -msgstr "Ottobre" +#: static/adm/js/gui.js:218 +msgid "Please enter a value less than or equal to {0}." +msgstr "Inserisci un valore minore o uguale a {0}." -#: static/adm/js/strftime.js:34 -msgid "November" -msgstr "Novembre" - -#: static/adm/js/strftime.js:35 -msgid "December" -msgstr "Dicembre" - -#: static/adm/js/tools.js:46 -msgid "Just a moment..." -msgstr "Solo un momento..." +#: static/adm/js/gui.js:219 +msgid "Please enter a value greater than or equal to {0}." +msgstr "Immettere un valore maggiore o uguale a {0}." diff --git a/server/src/uds/locale/pt/LC_MESSAGES/django.mo b/server/src/uds/locale/pt/LC_MESSAGES/django.mo index 64638fc25..fabadfad6 100644 Binary files a/server/src/uds/locale/pt/LC_MESSAGES/django.mo and b/server/src/uds/locale/pt/LC_MESSAGES/django.mo differ diff --git a/server/src/uds/locale/pt/LC_MESSAGES/django.po b/server/src/uds/locale/pt/LC_MESSAGES/django.po index e5b1e8f51..43630fe4e 100644 --- a/server/src/uds/locale/pt/LC_MESSAGES/django.po +++ b/server/src/uds/locale/pt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,22 +18,32 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: REST/methods/authenticators.py:80 -msgid "Current authenticators" -msgstr "Autenticadores atuais" - -#: REST/methods/authenticators.py:82 REST/methods/networks.py:68 -#: REST/methods/osmanagers.py:71 REST/methods/providers.py:69 -#: REST/methods/transports.py:71 REST/methods/users.py:77 +#: REST/mixins.py:172 REST/methods/authenticators.py:82 +#: REST/methods/networks.py:68 REST/methods/osmanagers.py:71 +#: REST/methods/providers.py:75 REST/methods/transports.py:79 +#: REST/methods/users_groups.py:73 msgid "Name" msgstr "Nome" -#: REST/methods/authenticators.py:83 REST/methods/osmanagers.py:72 -#: REST/methods/providers.py:70 REST/methods/transports.py:72 -#: REST/methods/users.py:78 +#: REST/mixins.py:175 +msgid "Name of this element" +msgstr "Nome deste elemento" + +#: REST/mixins.py:189 REST/methods/authenticators.py:83 +#: REST/methods/osmanagers.py:72 REST/methods/providers.py:76 +#: REST/methods/transports.py:80 REST/methods/users_groups.py:74 +#: REST/methods/users_groups.py:102 msgid "Comments" msgstr "Comentários" +#: REST/mixins.py:192 +msgid "Comments for this element" +msgstr "Comentários para este elemento" + +#: REST/methods/authenticators.py:80 +msgid "Current authenticators" +msgstr "Autenticadores atuais" + #: REST/methods/authenticators.py:84 msgid "Users" msgstr "Usuários" @@ -48,7 +58,7 @@ msgid "Networks" msgstr "Redes" #: REST/methods/networks.py:70 REST/methods/osmanagers.py:73 -#: REST/methods/transports.py:73 +#: REST/methods/transports.py:81 msgid "Used by" msgstr "Usado por" @@ -56,40 +66,49 @@ msgstr "Usado por" msgid "Current OS Managers" msgstr "Atual OS gerentes" -#: REST/methods/providers.py:67 +#: REST/methods/providers.py:73 msgid "Current service providers" msgstr "Provedores de serviço atual" -#: REST/methods/providers.py:71 templates/uds/index.html:51 +#: REST/methods/providers.py:77 templates/uds/index.html:51 #: templates/uds/html5/index.html:68 msgid "Services" msgstr "Serviços" -#: REST/methods/transports.py:69 +#: REST/methods/transports.py:77 msgid "Current Transports" msgstr "Atuais transportes" -#: REST/methods/users.py:70 +#: REST/methods/users_groups.py:66 #, python-brace-format msgid "Users of {0}" msgstr "Usuários de {0}" -#: REST/methods/users.py:72 +#: REST/methods/users_groups.py:68 msgid "Current users" msgstr "Usuários atuais" -#: REST/methods/users.py:76 +#: REST/methods/users_groups.py:72 REST/methods/users_groups.py:101 msgid "User Id" msgstr "Id de usuário" -#: REST/methods/users.py:79 +#: REST/methods/users_groups.py:75 REST/methods/users_groups.py:103 msgid "state" msgstr "Estado" -#: REST/methods/users.py:80 +#: REST/methods/users_groups.py:76 msgid "Last access" msgstr "Último acesso" +#: REST/methods/users_groups.py:95 +#, python-brace-format +msgid "Groups of {0}" +msgstr "Grupos de {0}" + +#: REST/methods/users_groups.py:97 +msgid "Current groups" +msgstr "Grupos atuais" + #: admin/views.py:55 admin/views.py:63 admin/views.py:77 web/views.py:422 msgid "Forbidden" msgstr "Proibido" @@ -140,8 +159,8 @@ msgid "" "Username with read privileges on the base selected (use USER@DOMAIN.DOM form " "for this)" msgstr "" -"Nome de usuário com privilégios de leitura da base selecionada (uso USER@DOMAIN.Formulário de DOM " -"para isso)" +"Nome de usuário com privilégios de leitura da base selecionada (uso " +"USER@DOMAIN.Formulário de DOM para isso)" #: auths/ActiveDirectory_enterprise/Authenticator.py:34 #: auths/ActiveDirectory_enterprise/Authenticator.py:52 @@ -265,8 +284,7 @@ msgstr "Não parece um Active Directory LDAP (não não têm objetos de grupo)" #: auths/ActiveDirectory_enterprise/Authenticator.py:472 msgid "" "Ldap does not seem an Active Directory (do not have any user nor groups)" -msgstr "" -"Não parece um Active Directory LDAP (não tem nenhum usuário ou grupos)" +msgstr "Não parece um Active Directory LDAP (não tem nenhum usuário ou grupos)" #: auths/ActiveDirectory_enterprise/Authenticator.py:477 #: auths/EDirectory_enterprise/Authenticator.py:358 @@ -345,7 +363,8 @@ msgstr "Atributo esperado grupo " msgid "" "Ldap user class or user id attr is probably wrong (Ldap is an eDirectory?)" msgstr "" -"LDAP usuário classe ou usuário id attr provavelmente está errado (Ldap é do eDirectory?)" +"LDAP usuário classe ou usuário id attr provavelmente está errado (Ldap é do " +"eDirectory?)" #: auths/IP/Authenticator.py:48 auths/IP/Authenticator.py:50 msgid "IP Authenticator" @@ -506,7 +525,8 @@ msgstr "Metadados do IDP" msgid "" "You can enter here the URL or the IDP metadata or the metadata itself (xml)" msgstr "" -"Você pode entrar aqui a URL ou os metadados do IDP ou os metadados em si (xml)" +"Você pode entrar aqui a URL ou os metadados do IDP ou os metadados em si " +"(xml)" #: auths/SAML_enterprise/SAML.py:127 msgid "Entity ID" @@ -514,7 +534,9 @@ msgstr "ID da entidade" #: auths/SAML_enterprise/SAML.py:128 msgid "ID of the SP. If left blank, this will be autogenerated from server URL" -msgstr "ID do SP. Se deixado em branco, este será gerado automaticamente do servidor URL" +msgstr "" +"ID do SP. Se deixado em branco, este será gerado automaticamente do servidor " +"URL" #: auths/SAML_enterprise/SAML.py:130 msgid "User name attrs" @@ -557,8 +579,8 @@ msgid "" "Private key should be a valid PEM (PEM private keys starts with -----BEGIN " "RSA PRIVATE KEY-----" msgstr "" -"A chave privada deve ser um válido PEM (PEM chaves privadas começa com---BEGIN " -"RSA PRIVATE KEY--" +"A chave privada deve ser um válido PEM (PEM chaves privadas começa com---" +"BEGIN RSA PRIVATE KEY--" #: auths/SAML_enterprise/SAML.py:197 #, python-brace-format @@ -1129,7 +1151,8 @@ msgstr "Cluster Hyper-v ligada Clone (Experimental)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:55 #: services/HyperV_enterprise/HyperVLinkedService.py:58 msgid "Hyper Services based on templates and differential disks (experimental)" -msgstr "Hiper serviços baseados em modelos e discos diferenciais (experimentais)" +msgstr "" +"Hiper serviços baseados em modelos e discos diferenciais (experimentais)" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:72 #: services/HyperV_enterprise/HyperVLinkedService.py:75 @@ -1172,7 +1195,8 @@ msgstr "Rede" msgid "" "If more than 1 interface is found in machine, use one on this network as main" msgstr "" -"Se mais de 1 relação encontra-se na máquina, utilize um nesta rede como principal" +"Se mais de 1 relação encontra-se na máquina, utilize um nesta rede como " +"principal" #: services/HyperV_enterprise/HyperVClusterLinkedService.py:98 #: services/HyperV_enterprise/HyperVLinkedService.py:101 @@ -1250,7 +1274,9 @@ msgstr "Provedor de serviço de Cluster Hyper-v" #: services/HyperV_enterprise/HyperVClusterProvider.py:89 #: services/HyperV_enterprise/HyperVProvider.py:81 msgid "HyperV Server IP or Hostname (must enable first WSMAN access)" -msgstr "Hyper-v Server IP ou nome do host (habilite o primeiro acesso do WS-Management)" +msgstr "" +"Hyper-v Server IP ou nome do host (habilite o primeiro acesso do WS-" +"Management)" #: services/HyperV_enterprise/HyperVClusterProvider.py:90 #: services/HyperV_enterprise/HyperVProvider.py:82 @@ -1621,7 +1647,8 @@ msgstr "Base de clones vinculados da VMWare" msgid "" "This service provides access to Linked Clones machines on a Virtual Center" msgstr "" -"Este serviço fornece acesso a máquinas de Clones vinculados em um Virtual Center" +"Este serviço fornece acesso a máquinas de Clones vinculados em um Virtual " +"Center" #: templates/404.html:3 templates/500.html:3 msgid "Page not found" @@ -1756,15 +1783,27 @@ msgstr "Painel de saída" msgid "logout" msgstr "logout" -#: templates/uds/admin/tmpl/authenticators.html:4 -msgid "administration of authenticators" -msgstr "Administração de autenticadores" - #: templates/uds/admin/tmpl/connectivity.html:4 #: templates/uds/admin/tmpl/dashboard.html:4 msgid "overview" msgstr "Visão geral" +#: templates/uds/admin/tmpl/modal.html:18 +msgid "Close" +msgstr "Fechar" + +#: templates/uds/admin/tmpl/modal.html:25 +msgid "Save" +msgstr "Salvar" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "Yes" +msgstr "Sim" + +#: templates/uds/admin/tmpl/fld/checkbox.html:4 +msgid "No" +msgstr "Não" + #: templates/uds/html5/detectJava.html:4 msgid "Login redirection to UDS" msgstr "Redirecionamento de login para UDS" @@ -2221,8 +2260,8 @@ msgid "" "The lowest image quality applied to images to maintain the minimum update " "rate." msgstr "" -"A qualidade de imagem mais baixa aplicada às imagens para manter a atualização mínima " -"taxa." +"A qualidade de imagem mais baixa aplicada às imagens para manter a " +"atualização mínima taxa." #: transports/RGS-enterprise/RGSTransport.py:51 #: transports/RGS-enterprise/TRGSTransport.py:56 @@ -2232,7 +2271,8 @@ msgstr "Taxa de Frame ajustável" #: transports/RGS-enterprise/RGSTransport.py:52 #: transports/RGS-enterprise/TRGSTransport.py:57 msgid "Update rate threshold to begin adjusting image quality" -msgstr "Limite de taxa de atualização para começar a ajustar a qualidade da imagem" +msgstr "" +"Limite de taxa de atualização para começar a ajustar a qualidade da imagem" #: transports/RGS-enterprise/RGSTransport.py:53 #: transports/RGS-enterprise/TRGSTransport.py:58 @@ -2245,8 +2285,8 @@ msgid "" "Change the Sender's resolution to match the Receiver's resolution when " "connecting" msgstr "" -"Alterar a resolução do remetente para coincidir com a resolução do receptor quando " -"Conectando-se" +"Alterar a resolução do remetente para coincidir com a resolução do receptor " +"quando Conectando-se" #: transports/RGS-enterprise/RGSTransport.py:55 #: transports/RGS-enterprise/TRGSTransport.py:60 diff --git a/server/src/uds/locale/pt/LC_MESSAGES/djangojs.mo b/server/src/uds/locale/pt/LC_MESSAGES/djangojs.mo index 4c2e67d32..94e40ba9c 100644 Binary files a/server/src/uds/locale/pt/LC_MESSAGES/djangojs.mo and b/server/src/uds/locale/pt/LC_MESSAGES/djangojs.mo differ diff --git a/server/src/uds/locale/pt/LC_MESSAGES/djangojs.po b/server/src/uds/locale/pt/LC_MESSAGES/djangojs.po index bcb1e8d47..907e2bce3 100644 --- a/server/src/uds/locale/pt/LC_MESSAGES/djangojs.po +++ b/server/src/uds/locale/pt/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-20 04:05+0100\n" +"POT-Creation-Date: 2013-11-23 22:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,146 +18,234 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: static/adm/js/api-tools.js:46 +msgid "Just a moment..." +msgstr "Só um momento..." + +#: static/adm/js/api-tools.js:75 +msgid "Sunday" +msgstr "Domingo" + +#: static/adm/js/api-tools.js:75 +msgid "Monday" +msgstr "Segunda-feira" + +#: static/adm/js/api-tools.js:75 +msgid "Tuesday" +msgstr "Terça-feira" + +#: static/adm/js/api-tools.js:75 +msgid "Wednesday" +msgstr "Quarta-feira" + +#: static/adm/js/api-tools.js:76 +msgid "Thursday" +msgstr "Quinta-feira" + +#: static/adm/js/api-tools.js:76 +msgid "Friday" +msgstr "Sexta-feira" + +#: static/adm/js/api-tools.js:76 +msgid "Saturday" +msgstr "Sábado" + +#: static/adm/js/api-tools.js:77 +msgid "January" +msgstr "Janeiro de" + +#: static/adm/js/api-tools.js:77 +msgid "February" +msgstr "Fevereiro" + +#: static/adm/js/api-tools.js:77 +msgid "March" +msgstr "Março de" + +#: static/adm/js/api-tools.js:77 +msgid "April" +msgstr "Abril" + +#: static/adm/js/api-tools.js:77 +msgid "May" +msgstr "Maio" + +#: static/adm/js/api-tools.js:78 +msgid "June" +msgstr "Junho de" + +#: static/adm/js/api-tools.js:78 +msgid "July" +msgstr "Julho" + +#: static/adm/js/api-tools.js:78 +msgid "August" +msgstr "Agosto" + +#: static/adm/js/api-tools.js:78 +msgid "September" +msgstr "Setembro" + +#: static/adm/js/api-tools.js:78 +msgid "October" +msgstr "Outubro" + +#: static/adm/js/api-tools.js:79 +msgid "November" +msgstr "Novembro" + +#: static/adm/js/api-tools.js:79 +msgid "December" +msgstr "Dezembro de" + +#: static/adm/js/dataTables.bootstrap.js:6 static/adm/js/gui.js:19 +msgid "_MENU_ records per page" +msgstr "Registros _MENU_ por página" + #: static/adm/js/gui-elements.js:33 msgid "Service Providers" msgstr "Prestadores de serviços" -#: static/adm/js/gui.js:18 -msgid "_MENU_ records per page" -msgstr "Registros _MENU_ por página" +#: static/adm/js/gui-elements.js:40 +msgid "Edit service provider" +msgstr "Editar Provedor de serviço" -#: static/adm/js/gui.js:19 +#: static/adm/js/gui-elements.js:104 +msgid "Edit authenticator" +msgstr "Editar autenticador" + +#: static/adm/js/gui-elements.js:149 +msgid "Edit transport" +msgstr "Editar transportes" + +#: static/adm/js/gui-elements.js:159 +msgid "New transport" +msgstr "Novo transporte" + +#: static/adm/js/gui.js:20 msgid "Empty" msgstr "Vazio" -#: static/adm/js/gui.js:20 +#: static/adm/js/gui.js:21 msgid "Records _START_ to _END_ of _TOTAL_" msgstr "Registros _START_ para _END_ de _TOTAL_" -#: static/adm/js/gui.js:21 +#: static/adm/js/gui.js:22 msgid "No records" msgstr "Não há registros" -#: static/adm/js/gui.js:22 +#: static/adm/js/gui.js:23 msgid "(filtered from _MAX_ total records)" msgstr "(filtrada de registros total de _MAX_)" -#: static/adm/js/gui.js:23 +#: static/adm/js/gui.js:24 msgid "Please wait, processing" msgstr "Aguarde, processamento" -#: static/adm/js/gui.js:24 +#: static/adm/js/gui.js:25 msgid "Filter" msgstr "Filtro" -#: static/adm/js/gui.js:27 +#: static/adm/js/gui.js:28 msgid "First" msgstr "Primeiro" -#: static/adm/js/gui.js:28 +#: static/adm/js/gui.js:29 msgid "Last" msgstr "Última" -#: static/adm/js/gui.js:29 +#: static/adm/js/gui.js:30 msgid "Next" msgstr "Próxima" -#: static/adm/js/gui.js:30 +#: static/adm/js/gui.js:31 msgid "Previous" msgstr "Anterior" -#: static/adm/js/gui.js:75 -msgid "Deployed services" -msgstr "Serviços implantados" +#: static/adm/js/gui.js:37 +msgid "New" +msgstr "Novo" -#: static/adm/js/gui.js:360 +#: static/adm/js/gui.js:41 msgid "Edit" msgstr "Editar" -#: static/adm/js/gui.js:369 +#: static/adm/js/gui.js:45 msgid "Delete" msgstr "Excluir" -#: static/adm/js/gui.js:378 +#: static/adm/js/gui.js:49 msgid "Refresh" msgstr "Atualização" -#: static/adm/js/strftime.js:30 -msgid "Sunday" -msgstr "Domingo" +#: static/adm/js/gui.js:53 +msgid "Xls" +msgstr "Xls" -#: static/adm/js/strftime.js:30 -msgid "Monday" -msgstr "Segunda-feira" +#: static/adm/js/gui.js:166 +msgid "Deployed services" +msgstr "Serviços implantados" -#: static/adm/js/strftime.js:30 -msgid "Tuesday" -msgstr "Terça-feira" +#: static/adm/js/gui.js:204 +msgid "This field is required." +msgstr "Este campo é obrigatório." -#: static/adm/js/strftime.js:31 -msgid "Wednesday" -msgstr "Quarta-feira" +#: static/adm/js/gui.js:205 +msgid "Please fix this field." +msgstr "Por favor corrigi este campo." -#: static/adm/js/strftime.js:31 -msgid "Thursday" -msgstr "Quinta-feira" +#: static/adm/js/gui.js:206 +msgid "Please enter a valid email address." +msgstr "Por favor insira um endereço de email válido." -#: static/adm/js/strftime.js:31 -msgid "Friday" -msgstr "Sexta-feira" +#: static/adm/js/gui.js:207 +msgid "Please enter a valid URL." +msgstr "Por favor introduza um URL válido." -#: static/adm/js/strftime.js:31 -msgid "Saturday" -msgstr "Sábado" +#: static/adm/js/gui.js:208 +msgid "Please enter a valid date." +msgstr "Por favor introduza uma data válida." -#: static/adm/js/strftime.js:32 -msgid "January" -msgstr "Janeiro de" +#: static/adm/js/gui.js:209 +msgid "Please enter a valid date (ISO)." +msgstr "Por favor introduza uma data válida (ISO)." -#: static/adm/js/strftime.js:32 -msgid "February" -msgstr "Fevereiro" +#: static/adm/js/gui.js:210 +msgid "Please enter a valid number." +msgstr "Por favor, insira um número válido." -#: static/adm/js/strftime.js:32 -msgid "March" -msgstr "Março de" +#: static/adm/js/gui.js:211 +msgid "Please enter only digits." +msgstr "Por favor, digite somente dígitos." -#: static/adm/js/strftime.js:33 -msgid "April" -msgstr "Abril" +#: static/adm/js/gui.js:212 +msgid "Please enter a valid credit card number." +msgstr "Por favor, insira um número válido de cartão de crédito." -#: static/adm/js/strftime.js:33 -msgid "May" -msgstr "Maio" +#: static/adm/js/gui.js:213 +msgid "Please enter the same value again." +msgstr "Digite novamente o mesmo valor." -#: static/adm/js/strftime.js:33 -msgid "June" -msgstr "Junho de" +#: static/adm/js/gui.js:214 +msgid "Please enter no more than {0} characters." +msgstr "Não mais de {0} caracteres digite." -#: static/adm/js/strftime.js:33 -msgid "July" -msgstr "Julho" +#: static/adm/js/gui.js:215 +msgid "Please enter at least {0} characters." +msgstr "Por favor, insira pelo menos {0} caracteres." -#: static/adm/js/strftime.js:34 -msgid "August" -msgstr "Agosto" +#: static/adm/js/gui.js:216 +msgid "Please enter a value between {0} and {1} characters long." +msgstr "Por favor, insira um valor entre {0} e {1} caracteres longo." -#: static/adm/js/strftime.js:34 -msgid "September" -msgstr "Setembro" +#: static/adm/js/gui.js:217 +msgid "Please enter a value between {0} and {1}." +msgstr "Por favor, insira um valor entre {0} e {1}." -#: static/adm/js/strftime.js:34 -msgid "October" -msgstr "Outubro" +#: static/adm/js/gui.js:218 +msgid "Please enter a value less than or equal to {0}." +msgstr "Por favor digite um valor menor ou igual a {0}." -#: static/adm/js/strftime.js:34 -msgid "November" -msgstr "Novembro" - -#: static/adm/js/strftime.js:35 -msgid "December" -msgstr "Dezembro de" - -#: static/adm/js/tools.js:46 -msgid "Just a moment..." -msgstr "Só um momento..." +#: static/adm/js/gui.js:219 +msgid "Please enter a value greater than or equal to {0}." +msgstr "Por favor, insira um valor maior ou igual a {0}." diff --git a/server/src/uds/static/adm/css/dataTables.bootstrap.css b/server/src/uds/static/adm/css/dataTables.bootstrap.css index 2cfb166f5..90b740a66 100644 --- a/server/src/uds/static/adm/css/dataTables.bootstrap.css +++ b/server/src/uds/static/adm/css/dataTables.bootstrap.css @@ -132,7 +132,7 @@ div.DTTT .btn:hover { } ul.DTTT_dropdown.dropdown-menu { - z-index: 2003; + z-index: 2013; } ul.DTTT_dropdown.dropdown-menu a { @@ -146,10 +146,11 @@ ul.DTTT_dropdown.dropdown-menu li { ul.DTTT_dropdown.dropdown-menu li:hover a { background-color: #0088cc; color: white !important; + cursor: pointer; } div.DTTT_collection_background { - z-index: 2002; + z-index: 2009; } /* TableTools information display */ diff --git a/server/src/uds/static/adm/css/uds-admin.css b/server/src/uds/static/adm/css/uds-admin.css index dec175f50..62fdae212 100644 --- a/server/src/uds/static/adm/css/uds-admin.css +++ b/server/src/uds/static/adm/css/uds-admin.css @@ -35,6 +35,13 @@ body { display: none; } +/*table.dataTable tr.odd td.sorting_1 { background-color: red; } +table.dataTable tr.odd td.sorting_2 { background-color: red; } +table.dataTable tr.odd td.sorting_3 { background-color: red; } +table.dataTable tr.even td.sorting_1 { background-color: blue; } +table.dataTable tr.even td.sorting_2 { background-color: blue; } +table.dataTable tr.even td.sorting_3 { background-color: blue; }*/ + /* collapsable && closeable pannels */ .chevron:before { content: "\f139"; @@ -58,6 +65,9 @@ body { } +.tooltip { + z-index: 2014; +} /* Edit Below to Customize Widths > 768px */ @media (min-width:768px) { diff --git a/server/src/uds/static/adm/js/api-templates.js b/server/src/uds/static/adm/js/api-templates.js index 97718694e..4b9ce31d3 100644 --- a/server/src/uds/static/adm/js/api-templates.js +++ b/server/src/uds/static/adm/js/api-templates.js @@ -9,6 +9,7 @@ // Registers Handlebar useful helpers // Equal comparision (like if helper, but with comparation) + // Use as block as {{#ifequals [element] [element]}}....{{/ifequals}} Handlebars.registerHelper('ifequals', function(context1, context2, options) { console.log('Comparing ', context1, ' with ', context2); if(context1 == context2) { @@ -18,6 +19,22 @@ } }); + // Counters. + // Create a counter with {{counter [id] [startValue]}} + // increment the counter with {{inc_counter [id]}} + // get the counter value tiwh {{get_counter [id}} + // Values are stored on current + Handlebars.registerHelper('set_counter', function(id, value, options){ + options.data['_counter_'+id] = value; + }); + + Handlebars.registerHelper('get_counter', function(id, options){ + return options.data['_counter_'+id]; + }); + + Handlebars.registerHelper('inc_counter', function(id, options){ + options.data['_counter_'+id] += 1; + }); api.templates = {}; // Now initialize templates api @@ -40,7 +57,7 @@ } } $.ajax({ - url : api.template_url + name, + url : api.url_for(name,'template'), type : "GET", dataType : "text", success : function(data) { diff --git a/server/src/uds/static/adm/js/api.js b/server/src/uds/static/adm/js/api.js index 49c501778..13e15efed 100644 --- a/server/src/uds/static/adm/js/api.js +++ b/server/src/uds/static/adm/js/api.js @@ -2,14 +2,13 @@ (function(api, $, undefined) { "use strict"; // "public" methods - api.doLog = function(data) { + api.doLog = function() { if (api.debug) { try { - console.log(data); + console.log.apply(window, arguments); } catch (e) { // nothing can be logged } - } }; @@ -29,6 +28,18 @@ } }; + api.url_for = function(path, type) { + switch(type) { + case 'template': + return api.config.template_url + path; + case undefined: + case 'rest': + return api.config.base_url + path; + default: + throw new Exception('Type of url not found: ' + type); + } + }; + api.getJson = function(path, options) { options = options || {}; var success_fnc = options.success || function(){}; @@ -45,7 +56,7 @@ success_fnc(data); }, beforeSend : function(request) { - request.setRequestHeader(api.auth_header, api.token); + request.setRequestHeader(api.config.auth_header, api.config.token); }, }); }; diff --git a/server/src/uds/static/adm/js/dataTables.bootstrap.js b/server/src/uds/static/adm/js/dataTables.bootstrap.js index 0be29fa7b..9e90f9895 100644 --- a/server/src/uds/static/adm/js/dataTables.bootstrap.js +++ b/server/src/uds/static/adm/js/dataTables.bootstrap.js @@ -3,7 +3,7 @@ $.extend(true, $.fn.dataTable.defaults, { "sDom" : "<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>", "sPaginationType" : "bootstrap", "oLanguage" : { - "sLengthMenu" : "_MENU_ records per page" + "sLengthMenu" : gettext("_MENU_ records per page") } }); @@ -73,6 +73,12 @@ $.extend($.fn.dataTableExt.oPagination, { iStart = oPaging.iPage - iHalf + 1; iEnd = iStart + iListLength - 1; } + + var fnClick = function(e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(), 10) - 1) * oPaging.iLength; + fnDraw(oSettings); + }; for (i = 0, ien = an.length; i < ien; i++) { // Remove the middle elements @@ -82,11 +88,7 @@ $.extend($.fn.dataTableExt.oPagination, { for (j = iStart; j <= iEnd; j++) { sClass = (j == oPaging.iPage + 1) ? 'class="active"' : ''; $('
  • ' + j + '
  • ').insertBefore($('li:last', an[i])[0]).bind( - 'click', function(e) { - e.preventDefault(); - oSettings._iDisplayStart = (parseInt($('a', this).text(), 10) - 1) * oPaging.iLength; - fnDraw(oSettings); - }); + 'click', fnClick); } // Add / remove disabled classes from the static elements diff --git a/server/src/uds/static/adm/js/gui-elements.js b/server/src/uds/static/adm/js/gui-elements.js index d9155a575..bb027ac22 100644 --- a/server/src/uds/static/adm/js/gui-elements.js +++ b/server/src/uds/static/adm/js/gui-elements.js @@ -88,7 +88,7 @@ gui.authenticators.link = function(event) { container : 'users-placeholder', rowSelect : 'multi', buttons : [ 'new', 'edit', 'delete', 'xls' ], - scrollToTable : true, + scrollToTable : false, onLoad: function(k) { api.tools.unblockUI(); }, @@ -101,7 +101,7 @@ gui.authenticators.link = function(event) { onEdit: function(value, event, table) { gui.authenticators.rest.gui(value.type, function(data){ var form = gui.fields(data); - gui.launchModal(gettext('Edit authenticator')+' '+value.name, form); + gui.launchModalForm(gettext('Edit authenticator')+' '+value.name, form); }); }, }); @@ -146,7 +146,7 @@ gui.connectivity.link = function(event) { gui.connectivity.transports.rest.gui(value.type, function(itemGui){ gui.connectivity.transports.rest.item(value.id, function(item) { var form = gui.fields(itemGui, item); - gui.launchModal(gettext('Edit transport')+' '+value.name,form, function(form_selector) { + gui.launchModalForm(gettext('Edit transport')+' '+value.name,form, function(form_selector) { var fields = gui.fields.read(form_selector); return false; }); @@ -154,7 +154,13 @@ gui.connectivity.link = function(event) { }); }, onNew: function(type) { - gui.doLog(type); + gui.connectivity.transports.rest.gui(type, function(itemGui) { + var form = gui.fields(itemGui); + gui.launchModalForm(gettext('New transport'), form, function(form_selector) { + var fields = gui.fields.read(form_selector); + return false; + }); + }); }, }); gui.connectivity.networks.table({ diff --git a/server/src/uds/static/adm/js/gui-fields.js b/server/src/uds/static/adm/js/gui-fields.js index 6abd14d05..3233a16b9 100644 --- a/server/src/uds/static/adm/js/gui-fields.js +++ b/server/src/uds/static/adm/js/gui-fields.js @@ -12,6 +12,10 @@ $.each(itemGui, function(index, f){ gui.doLog(f); gui.doLog(item[f.name]); + // Fix multiline text fields to textbox + if( f.gui.type == 'text' && f.gui.multiline ) { + f.gui.type = 'textbox'; + } form += api.templates.evaluate('tmpl_fld_'+f.gui.type, { value: item[f.name] || f.gui.value || f.gui.defvalue, // If no value present, use default value values: f.gui.values, diff --git a/server/src/uds/static/adm/js/gui.js b/server/src/uds/static/adm/js/gui.js index b0046d083..ebb155c3e 100644 --- a/server/src/uds/static/adm/js/gui.js +++ b/server/src/uds/static/adm/js/gui.js @@ -5,7 +5,7 @@ gui.doLog = function() { if (gui.debug) { try { - console.log(arguments); + console.log.apply(window, arguments); } catch (e) { // nothing can be logged } @@ -105,10 +105,14 @@ }); }; - gui.launchModal = function(title, content, onSuccess) { - var id = Math.random().toString().split('.')[1]; + gui.launchModalForm = function(title, content, onSuccess) { + var id = Math.random().toString().split('.')[1]; // Get a random ID for this modal gui.appendToWorkspace(gui.modal(id, title, content)); id = '#' + id; // for jQuery + + // Get form + var $form = $(id + ' form'); + // For "beauty" switches, initialize them now $(id + ' .make-switch').bootstrapSwitch(); // Activate "cool" selects @@ -116,11 +120,28 @@ // TEST: cooller on mobile devices if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { $(id + ' .selectpicker').selectpicker('mobile'); - } + } // Activate tooltips - $(id + ' [data-toggle="tooltip"]').tooltip({delay: 500, placement: 'auto right'}); + $(id + ' [data-toggle="tooltip"]').tooltip({delay: {show: 1000, hide: 100}, placement: 'auto right'}); + + // Validation + $form.validate({ + debug: true, + errorClass: 'text-danger', + validClass: 'has-success', + highlight: function(element) { + $(element).closest('.form-group').addClass('has-error'); + }, + success: function(element) { + $(element).closest('.form-group').removeClass('has-error'); + $(element).remove(); + }, + }); + // And catch "accept" (default is "Save" in fact) button click $(id + ' .button-accept').click(function(){ + if( !$form.valid() ) + return; if( onSuccess ) { if( onSuccess(id + ' form') === false ) // Some error may have ocurred, do not close dialog return; @@ -184,6 +205,26 @@ }; gui.init = function() { + // Load jquery validator strings + $.extend($.validator.messages, { + required: gettext("This field is required."), + remote: gettext("Please fix this field."), + email: gettext("Please enter a valid email address."), + url: gettext("Please enter a valid URL."), + date: gettext("Please enter a valid date."), + dateISO: gettext("Please enter a valid date (ISO)."), + number: gettext("Please enter a valid number."), + digits: gettext("Please enter only digits."), + creditcard: gettext("Please enter a valid credit card number."), + equalTo: gettext("Please enter the same value again."), + maxlength: $.validator.format(gettext("Please enter no more than {0} characters.")), + minlength: $.validator.format(gettext("Please enter at least {0} characters.")), + rangelength: $.validator.format(gettext("Please enter a value between {0} and {1} characters long.")), + range: $.validator.format(gettext("Please enter a value between {0} and {1}.")), + max: $.validator.format(gettext("Please enter a value less than or equal to {0}.")), + min: $.validator.format(gettext("Please enter a value greater than or equal to {0}.")) + }); + gui.setLinksEvents(); gui.dashboard.link(); }; @@ -266,7 +307,7 @@ GuiElement.prototype = { // 4.- the DataTable that raised the event table : function(options) { "use strict"; - console.log('Types: ', this.types); + gui.doLog('Types: ', this.types); options = options || {}; gui.doLog('Composing table for ' + this.name); var tableId = this.name + '-table'; @@ -365,19 +406,12 @@ GuiElement.prototype = { columns.push(column); } }); - // Generate styles for responsible table, just the name of fields (append header to table) - var respStyles = []; - var counter = 0; - $.each(columns, function(col, value) { - if( value.bVisible === false ) - return; - counter += 1; - respStyles.push('#' + tableId + ' td:nth-of-type(' + counter + '):before { content: "' + - (value.sTitle || '') + '";}\n'); - }); - // If styles already exists, remove them before adding new ones - $('style-' + tableId).remove(); - $('').appendTo('head'); + // Responsive style for tables, using tables.css and this code generates the "titles" for vertical display on small sizes + $('#style-' + tableId).remove(); // Remove existing style for table before adding new one + $(api.templates.evaluate('tmpl_responsive_table', { + tableId: tableId, + columns: columns, + })).appendTo('head'); $this.rest.overview(function(data) { var table = gui.table(title, tableId); @@ -463,11 +497,21 @@ GuiElement.prototype = { } else { // This table has "types, so we create a dropdown with Types var newButtons = []; - $.each($this.types, function(i, val){ + // Order buttons by name, much more easy for users... :-) + var order = []; + $.each($this.types, function(k, v){ + order.push({ + type: k, + css: v.css, + name: v.name, + description: v.description, + }); + }); + $.each(order.sort(function(a,b){return a.name.localeCompare(b.name);}), function(i, val){ newButtons.push({ "sExtends" : "text", - "sButtonText" : ' ' + val.name, - "fnClick" : clickHandlerFor(options.onNew, i, true), + "sButtonText" : ' ' + val.name + '', + "fnClick" : clickHandlerFor(options.onNew, val.type, true), }); }); btn = { @@ -551,8 +595,9 @@ GuiElement.prototype = { }; } - if (btn !== undefined) + if(btn) { btns.push(btn); + } }); } @@ -596,6 +641,12 @@ GuiElement.prototype = { $('#' + tableId + '_filter input').addClass('form-control'); // Add refresh action to panel $(table.refreshSelector).click(refreshFnc); + // Add tooltips to "new" buttons + $('.DTTT_dropdown [data-toggle="tooltip"]').tooltip({ + container:'body', + delay: { show: 1000, hide: 100}, + placement: 'auto right', + }); if (options.scrollToTable === true ) { var tableTop = $('#' + tableId).offset().top; diff --git a/server/src/uds/static/adm/js/jquery.validate.js b/server/src/uds/static/adm/js/jquery.validate.js new file mode 100644 index 000000000..88ba300ea --- /dev/null +++ b/server/src/uds/static/adm/js/jquery.validate.js @@ -0,0 +1,1231 @@ +/*! + * jQuery Validation Plugin 1.11.1 + * + * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ + * http://docs.jquery.com/Plugins/Validation + * + * Copyright 2013 Jörn Zaefferer + * Released under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + */ + +(function($) { + +$.extend($.fn, { + // http://docs.jquery.com/Plugins/Validation/validate + validate: function( options ) { + + // if nothing is selected, return nothing; can't chain anyway + if ( !this.length ) { + if ( options && options.debug && window.console ) { + console.warn( "Nothing selected, can't validate, returning nothing." ); + } + return; + } + + // check if a validator for this form was already created + var validator = $.data( this[0], "validator" ); + if ( validator ) { + return validator; + } + + // Add novalidate tag if HTML5. + this.attr( "novalidate", "novalidate" ); + + validator = new $.validator( options, this[0] ); + $.data( this[0], "validator", validator ); + + if ( validator.settings.onsubmit ) { + + this.validateDelegate( ":submit", "click", function( event ) { + if ( validator.settings.submitHandler ) { + validator.submitButton = event.target; + } + // allow suppressing validation by adding a cancel class to the submit button + if ( $(event.target).hasClass("cancel") ) { + validator.cancelSubmit = true; + } + + // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button + if ( $(event.target).attr("formnovalidate") !== undefined ) { + validator.cancelSubmit = true; + } + }); + + // validate the form on submit + this.submit( function( event ) { + if ( validator.settings.debug ) { + // prevent form submit to be able to see console output + event.preventDefault(); + } + function handle() { + var hidden; + if ( validator.settings.submitHandler ) { + if ( validator.submitButton ) { + // insert a hidden input as a replacement for the missing submit button + hidden = $("").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm); + } + validator.settings.submitHandler.call( validator, validator.currentForm, event ); + if ( validator.submitButton ) { + // and clean up afterwards; thanks to no-block-scope, hidden can be referenced + hidden.remove(); + } + return false; + } + return true; + } + + // prevent submit for invalid forms or custom submit handlers + if ( validator.cancelSubmit ) { + validator.cancelSubmit = false; + return handle(); + } + if ( validator.form() ) { + if ( validator.pendingRequest ) { + validator.formSubmitted = true; + return false; + } + return handle(); + } else { + validator.focusInvalid(); + return false; + } + }); + } + + return validator; + }, + // http://docs.jquery.com/Plugins/Validation/valid + valid: function() { + if ( $(this[0]).is("form")) { + return this.validate().form(); + } else { + var valid = true; + var validator = $(this[0].form).validate(); + this.each(function() { + valid = valid && validator.element(this); + }); + return valid; + } + }, + // attributes: space seperated list of attributes to retrieve and remove + removeAttrs: function( attributes ) { + var result = {}, + $element = this; + $.each(attributes.split(/\s/), function( index, value ) { + result[value] = $element.attr(value); + $element.removeAttr(value); + }); + return result; + }, + // http://docs.jquery.com/Plugins/Validation/rules + rules: function( command, argument ) { + var element = this[0]; + + if ( command ) { + var settings = $.data(element.form, "validator").settings; + var staticRules = settings.rules; + var existingRules = $.validator.staticRules(element); + switch(command) { + case "add": + $.extend(existingRules, $.validator.normalizeRule(argument)); + // remove messages from rules, but allow them to be set separetely + delete existingRules.messages; + staticRules[element.name] = existingRules; + if ( argument.messages ) { + settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages ); + } + break; + case "remove": + if ( !argument ) { + delete staticRules[element.name]; + return existingRules; + } + var filtered = {}; + $.each(argument.split(/\s/), function( index, method ) { + filtered[method] = existingRules[method]; + delete existingRules[method]; + }); + return filtered; + } + } + + var data = $.validator.normalizeRules( + $.extend( + {}, + $.validator.classRules(element), + $.validator.attributeRules(element), + $.validator.dataRules(element), + $.validator.staticRules(element) + ), element); + + // make sure required is at front + if ( data.required ) { + var param = data.required; + delete data.required; + data = $.extend({required: param}, data); + } + + return data; + } +}); + +// Custom selectors +$.extend($.expr[":"], { + // http://docs.jquery.com/Plugins/Validation/blank + blank: function( a ) { return !$.trim("" + $(a).val()); }, + // http://docs.jquery.com/Plugins/Validation/filled + filled: function( a ) { return !!$.trim("" + $(a).val()); }, + // http://docs.jquery.com/Plugins/Validation/unchecked + unchecked: function( a ) { return !$(a).prop("checked"); } +}); + +// constructor for validator +$.validator = function( options, form ) { + this.settings = $.extend( true, {}, $.validator.defaults, options ); + this.currentForm = form; + this.init(); +}; + +$.validator.format = function( source, params ) { + if ( arguments.length === 1 ) { + return function() { + var args = $.makeArray(arguments); + args.unshift(source); + return $.validator.format.apply( this, args ); + }; + } + if ( arguments.length > 2 && params.constructor !== Array ) { + params = $.makeArray(arguments).slice(1); + } + if ( params.constructor !== Array ) { + params = [ params ]; + } + $.each(params, function( i, n ) { + source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() { + return n; + }); + }); + return source; +}; + +$.extend($.validator, { + + defaults: { + messages: {}, + groups: {}, + rules: {}, + errorClass: "error", + validClass: "valid", + errorElement: "label", + focusInvalid: true, + errorContainer: $([]), + errorLabelContainer: $([]), + onsubmit: true, + ignore: ":hidden", + ignoreTitle: false, + onfocusin: function( element, event ) { + this.lastActive = element; + + // hide error label and remove error class on focus if enabled + if ( this.settings.focusCleanup && !this.blockFocusCleanup ) { + if ( this.settings.unhighlight ) { + this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass ); + } + this.addWrapper(this.errorsFor(element)).hide(); + } + }, + onfocusout: function( element, event ) { + if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) { + this.element(element); + } + }, + onkeyup: function( element, event ) { + if ( event.which === 9 && this.elementValue(element) === "" ) { + return; + } else if ( element.name in this.submitted || element === this.lastElement ) { + this.element(element); + } + }, + onclick: function( element, event ) { + // click on selects, radiobuttons and checkboxes + if ( element.name in this.submitted ) { + this.element(element); + } + // or option elements, check parent select in that case + else if ( element.parentNode.name in this.submitted ) { + this.element(element.parentNode); + } + }, + highlight: function( element, errorClass, validClass ) { + if ( element.type === "radio" ) { + this.findByName(element.name).addClass(errorClass).removeClass(validClass); + } else { + $(element).addClass(errorClass).removeClass(validClass); + } + }, + unhighlight: function( element, errorClass, validClass ) { + if ( element.type === "radio" ) { + this.findByName(element.name).removeClass(errorClass).addClass(validClass); + } else { + $(element).removeClass(errorClass).addClass(validClass); + } + } + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults + setDefaults: function( settings ) { + $.extend( $.validator.defaults, settings ); + }, + + messages: { + required: "This field is required.", + remote: "Please fix this field.", + email: "Please enter a valid email address.", + url: "Please enter a valid URL.", + date: "Please enter a valid date.", + dateISO: "Please enter a valid date (ISO).", + number: "Please enter a valid number.", + digits: "Please enter only digits.", + creditcard: "Please enter a valid credit card number.", + equalTo: "Please enter the same value again.", + maxlength: $.validator.format("Please enter no more than {0} characters."), + minlength: $.validator.format("Please enter at least {0} characters."), + rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), + range: $.validator.format("Please enter a value between {0} and {1}."), + max: $.validator.format("Please enter a value less than or equal to {0}."), + min: $.validator.format("Please enter a value greater than or equal to {0}.") + }, + + autoCreateRanges: false, + + prototype: { + + init: function() { + this.labelContainer = $(this.settings.errorLabelContainer); + this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm); + this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer ); + this.submitted = {}; + this.valueCache = {}; + this.pendingRequest = 0; + this.pending = {}; + this.invalid = {}; + this.reset(); + + var groups = (this.groups = {}); + $.each(this.settings.groups, function( key, value ) { + if ( typeof value === "string" ) { + value = value.split(/\s/); + } + $.each(value, function( index, name ) { + groups[name] = key; + }); + }); + var rules = this.settings.rules; + $.each(rules, function( key, value ) { + rules[key] = $.validator.normalizeRule(value); + }); + + function delegate(event) { + var validator = $.data(this[0].form, "validator"), + eventType = "on" + event.type.replace(/^validate/, ""); + if ( validator.settings[eventType] ) { + validator.settings[eventType].call(validator, this[0], event); + } + } + $(this.currentForm) + .validateDelegate(":text, [type='password'], [type='file'], select, textarea, " + + "[type='number'], [type='search'] ,[type='tel'], [type='url'], " + + "[type='email'], [type='datetime'], [type='date'], [type='month'], " + + "[type='week'], [type='time'], [type='datetime-local'], " + + "[type='range'], [type='color'] ", + "focusin focusout keyup", delegate) + .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate); + + if ( this.settings.invalidHandler ) { + $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler); + } + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/form + form: function() { + this.checkForm(); + $.extend(this.submitted, this.errorMap); + this.invalid = $.extend({}, this.errorMap); + if ( !this.valid() ) { + $(this.currentForm).triggerHandler("invalid-form", [this]); + } + this.showErrors(); + return this.valid(); + }, + + checkForm: function() { + this.prepareForm(); + for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) { + this.check( elements[i] ); + } + return this.valid(); + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/element + element: function( element ) { + element = this.validationTargetFor( this.clean( element ) ); + this.lastElement = element; + this.prepareElement( element ); + this.currentElements = $(element); + var result = this.check( element ) !== false; + if ( result ) { + delete this.invalid[element.name]; + } else { + this.invalid[element.name] = true; + } + if ( !this.numberOfInvalids() ) { + // Hide error containers on last error + this.toHide = this.toHide.add( this.containers ); + } + this.showErrors(); + return result; + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/showErrors + showErrors: function( errors ) { + if ( errors ) { + // add items to error list and map + $.extend( this.errorMap, errors ); + this.errorList = []; + for ( var name in errors ) { + this.errorList.push({ + message: errors[name], + element: this.findByName(name)[0] + }); + } + // remove items from success list + this.successList = $.grep( this.successList, function( element ) { + return !(element.name in errors); + }); + } + if ( this.settings.showErrors ) { + this.settings.showErrors.call( this, this.errorMap, this.errorList ); + } else { + this.defaultShowErrors(); + } + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/resetForm + resetForm: function() { + if ( $.fn.resetForm ) { + $(this.currentForm).resetForm(); + } + this.submitted = {}; + this.lastElement = null; + this.prepareForm(); + this.hideErrors(); + this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" ); + }, + + numberOfInvalids: function() { + return this.objectLength(this.invalid); + }, + + objectLength: function( obj ) { + var count = 0; + for ( var i in obj ) { + count++; + } + return count; + }, + + hideErrors: function() { + this.addWrapper( this.toHide ).hide(); + }, + + valid: function() { + return this.size() === 0; + }, + + size: function() { + return this.errorList.length; + }, + + focusInvalid: function() { + if ( this.settings.focusInvalid ) { + try { + $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []) + .filter(":visible") + .focus() + // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find + .trigger("focusin"); + } catch(e) { + // ignore IE throwing errors when focusing hidden elements + } + } + }, + + findLastActive: function() { + var lastActive = this.lastActive; + return lastActive && $.grep(this.errorList, function( n ) { + return n.element.name === lastActive.name; + }).length === 1 && lastActive; + }, + + elements: function() { + var validator = this, + rulesCache = {}; + + // select all valid inputs inside the form (no submit or reset buttons) + return $(this.currentForm) + .find("input, select, textarea") + .not(":submit, :reset, :image, [disabled]") + .not( this.settings.ignore ) + .filter(function() { + if ( !this.name && validator.settings.debug && window.console ) { + console.error( "%o has no name assigned", this); + } + + // select only the first element for each name, and only those with rules specified + if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) { + return false; + } + + rulesCache[this.name] = true; + return true; + }); + }, + + clean: function( selector ) { + return $(selector)[0]; + }, + + errors: function() { + var errorClass = this.settings.errorClass.replace(" ", "."); + return $(this.settings.errorElement + "." + errorClass, this.errorContext); + }, + + reset: function() { + this.successList = []; + this.errorList = []; + this.errorMap = {}; + this.toShow = $([]); + this.toHide = $([]); + this.currentElements = $([]); + }, + + prepareForm: function() { + this.reset(); + this.toHide = this.errors().add( this.containers ); + }, + + prepareElement: function( element ) { + this.reset(); + this.toHide = this.errorsFor(element); + }, + + elementValue: function( element ) { + var type = $(element).attr("type"), + val = $(element).val(); + + if ( type === "radio" || type === "checkbox" ) { + return $("input[name='" + $(element).attr("name") + "']:checked").val(); + } + + if ( typeof val === "string" ) { + return val.replace(/\r/g, ""); + } + return val; + }, + + check: function( element ) { + element = this.validationTargetFor( this.clean( element ) ); + + var rules = $(element).rules(); + var dependencyMismatch = false; + var val = this.elementValue(element); + var result; + + for (var method in rules ) { + var rule = { method: method, parameters: rules[method] }; + try { + + result = $.validator.methods[method].call( this, val, element, rule.parameters ); + + // if a method indicates that the field is optional and therefore valid, + // don't mark it as valid when there are no other rules + if ( result === "dependency-mismatch" ) { + dependencyMismatch = true; + continue; + } + dependencyMismatch = false; + + if ( result === "pending" ) { + this.toHide = this.toHide.not( this.errorsFor(element) ); + return; + } + + if ( !result ) { + this.formatAndAdd( element, rule ); + return false; + } + } catch(e) { + if ( this.settings.debug && window.console ) { + console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e ); + } + throw e; + } + } + if ( dependencyMismatch ) { + return; + } + if ( this.objectLength(rules) ) { + this.successList.push(element); + } + return true; + }, + + // return the custom message for the given element and validation method + // specified in the element's HTML5 data attribute + customDataMessage: function( element, method ) { + return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase())); + }, + + // return the custom message for the given element name and validation method + customMessage: function( name, method ) { + var m = this.settings.messages[name]; + return m && (m.constructor === String ? m : m[method]); + }, + + // return the first defined argument, allowing empty strings + findDefined: function() { + for(var i = 0; i < arguments.length; i++) { + if ( arguments[i] !== undefined ) { + return arguments[i]; + } + } + return undefined; + }, + + defaultMessage: function( element, method ) { + return this.findDefined( + this.customMessage( element.name, method ), + this.customDataMessage( element, method ), + // title is never undefined, so handle empty string as undefined + !this.settings.ignoreTitle && element.title || undefined, + $.validator.messages[method], + "Warning: No message defined for " + element.name + "" + ); + }, + + formatAndAdd: function( element, rule ) { + var message = this.defaultMessage( element, rule.method ), + theregex = /\$?\{(\d+)\}/g; + if ( typeof message === "function" ) { + message = message.call(this, rule.parameters, element); + } else if (theregex.test(message)) { + message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters); + } + this.errorList.push({ + message: message, + element: element + }); + + this.errorMap[element.name] = message; + this.submitted[element.name] = message; + }, + + addWrapper: function( toToggle ) { + if ( this.settings.wrapper ) { + toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) ); + } + return toToggle; + }, + + defaultShowErrors: function() { + var i, elements; + for ( i = 0; this.errorList[i]; i++ ) { + var error = this.errorList[i]; + if ( this.settings.highlight ) { + this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass ); + } + this.showLabel( error.element, error.message ); + } + if ( this.errorList.length ) { + this.toShow = this.toShow.add( this.containers ); + } + if ( this.settings.success ) { + for ( i = 0; this.successList[i]; i++ ) { + this.showLabel( this.successList[i] ); + } + } + if ( this.settings.unhighlight ) { + for ( i = 0, elements = this.validElements(); elements[i]; i++ ) { + this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass ); + } + } + this.toHide = this.toHide.not( this.toShow ); + this.hideErrors(); + this.addWrapper( this.toShow ).show(); + }, + + validElements: function() { + return this.currentElements.not(this.invalidElements()); + }, + + invalidElements: function() { + return $(this.errorList).map(function() { + return this.element; + }); + }, + + showLabel: function( element, message ) { + var label = this.errorsFor( element ); + if ( label.length ) { + // refresh error/success class + label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass ); + // replace message on existing label + label.html(message); + } else { + // create label + label = $("<" + this.settings.errorElement + ">") + .attr("for", this.idOrName(element)) + .addClass(this.settings.errorClass) + .html(message || ""); + if ( this.settings.wrapper ) { + // make sure the element is visible, even in IE + // actually showing the wrapped element is handled elsewhere + label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); + } + if ( !this.labelContainer.append(label).length ) { + if ( this.settings.errorPlacement ) { + this.settings.errorPlacement(label, $(element) ); + } else { + label.insertAfter(element); + } + } + } + if ( !message && this.settings.success ) { + label.text(""); + if ( typeof this.settings.success === "string" ) { + label.addClass( this.settings.success ); + } else { + this.settings.success( label, element ); + } + } + this.toShow = this.toShow.add(label); + }, + + errorsFor: function( element ) { + var name = this.idOrName(element); + return this.errors().filter(function() { + return $(this).attr("for") === name; + }); + }, + + idOrName: function( element ) { + return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name); + }, + + validationTargetFor: function( element ) { + // if radio/checkbox, validate first element in group instead + if ( this.checkable(element) ) { + element = this.findByName( element.name ).not(this.settings.ignore)[0]; + } + return element; + }, + + checkable: function( element ) { + return (/radio|checkbox/i).test(element.type); + }, + + findByName: function( name ) { + return $(this.currentForm).find("[name='" + name + "']"); + }, + + getLength: function( value, element ) { + switch( element.nodeName.toLowerCase() ) { + case "select": + return $("option:selected", element).length; + case "input": + if ( this.checkable( element) ) { + return this.findByName(element.name).filter(":checked").length; + } + } + return value.length; + }, + + depend: function( param, element ) { + return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true; + }, + + dependTypes: { + "boolean": function( param, element ) { + return param; + }, + "string": function( param, element ) { + return !!$(param, element.form).length; + }, + "function": function( param, element ) { + return param(element); + } + }, + + optional: function( element ) { + var val = this.elementValue(element); + return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch"; + }, + + startRequest: function( element ) { + if ( !this.pending[element.name] ) { + this.pendingRequest++; + this.pending[element.name] = true; + } + }, + + stopRequest: function( element, valid ) { + this.pendingRequest--; + // sometimes synchronization fails, make sure pendingRequest is never < 0 + if ( this.pendingRequest < 0 ) { + this.pendingRequest = 0; + } + delete this.pending[element.name]; + if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) { + $(this.currentForm).submit(); + this.formSubmitted = false; + } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) { + $(this.currentForm).triggerHandler("invalid-form", [this]); + this.formSubmitted = false; + } + }, + + previousValue: function( element ) { + return $.data(element, "previousValue") || $.data(element, "previousValue", { + old: null, + valid: true, + message: this.defaultMessage( element, "remote" ) + }); + } + + }, + + classRuleSettings: { + required: {required: true}, + email: {email: true}, + url: {url: true}, + date: {date: true}, + dateISO: {dateISO: true}, + number: {number: true}, + digits: {digits: true}, + creditcard: {creditcard: true} + }, + + addClassRules: function( className, rules ) { + if ( className.constructor === String ) { + this.classRuleSettings[className] = rules; + } else { + $.extend(this.classRuleSettings, className); + } + }, + + classRules: function( element ) { + var rules = {}; + var classes = $(element).attr("class"); + if ( classes ) { + $.each(classes.split(" "), function() { + if ( this in $.validator.classRuleSettings ) { + $.extend(rules, $.validator.classRuleSettings[this]); + } + }); + } + return rules; + }, + + attributeRules: function( element ) { + var rules = {}; + var $element = $(element); + var type = $element[0].getAttribute("type"); + + for (var method in $.validator.methods) { + var value; + + // support for in both html5 and older browsers + if ( method === "required" ) { + value = $element.get(0).getAttribute(method); + // Some browsers return an empty string for the required attribute + // and non-HTML5 browsers might have required="" markup + if ( value === "" ) { + value = true; + } + // force non-HTML5 browsers to return bool + value = !!value; + } else { + value = $element.attr(method); + } + + // convert the value to a number for number inputs, and for text for backwards compability + // allows type="date" and others to be compared as strings + if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) { + value = Number(value); + } + + if ( value ) { + rules[method] = value; + } else if ( type === method && type !== 'range' ) { + // exception: the jquery validate 'range' method + // does not test for the html5 'range' type + rules[method] = true; + } + } + + // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs + if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) { + delete rules.maxlength; + } + + return rules; + }, + + dataRules: function( element ) { + var method, value, + rules = {}, $element = $(element); + for (method in $.validator.methods) { + value = $element.data("rule-" + method.toLowerCase()); + if ( value !== undefined ) { + rules[method] = value; + } + } + return rules; + }, + + staticRules: function( element ) { + var rules = {}; + var validator = $.data(element.form, "validator"); + if ( validator.settings.rules ) { + rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {}; + } + return rules; + }, + + normalizeRules: function( rules, element ) { + // handle dependency check + $.each(rules, function( prop, val ) { + // ignore rule when param is explicitly false, eg. required:false + if ( val === false ) { + delete rules[prop]; + return; + } + if ( val.param || val.depends ) { + var keepRule = true; + switch (typeof val.depends) { + case "string": + keepRule = !!$(val.depends, element.form).length; + break; + case "function": + keepRule = val.depends.call(element, element); + break; + } + if ( keepRule ) { + rules[prop] = val.param !== undefined ? val.param : true; + } else { + delete rules[prop]; + } + } + }); + + // evaluate parameters + $.each(rules, function( rule, parameter ) { + rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter; + }); + + // clean number parameters + $.each(['minlength', 'maxlength'], function() { + if ( rules[this] ) { + rules[this] = Number(rules[this]); + } + }); + $.each(['rangelength', 'range'], function() { + var parts; + if ( rules[this] ) { + if ( $.isArray(rules[this]) ) { + rules[this] = [Number(rules[this][0]), Number(rules[this][1])]; + } else if ( typeof rules[this] === "string" ) { + parts = rules[this].split(/[\s,]+/); + rules[this] = [Number(parts[0]), Number(parts[1])]; + } + } + }); + + if ( $.validator.autoCreateRanges ) { + // auto-create ranges + if ( rules.min && rules.max ) { + rules.range = [rules.min, rules.max]; + delete rules.min; + delete rules.max; + } + if ( rules.minlength && rules.maxlength ) { + rules.rangelength = [rules.minlength, rules.maxlength]; + delete rules.minlength; + delete rules.maxlength; + } + } + + return rules; + }, + + // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true} + normalizeRule: function( data ) { + if ( typeof data === "string" ) { + var transformed = {}; + $.each(data.split(/\s/), function() { + transformed[this] = true; + }); + data = transformed; + } + return data; + }, + + // http://docs.jquery.com/Plugins/Validation/Validator/addMethod + addMethod: function( name, method, message ) { + $.validator.methods[name] = method; + $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name]; + if ( method.length < 3 ) { + $.validator.addClassRules(name, $.validator.normalizeRule(name)); + } + }, + + methods: { + + // http://docs.jquery.com/Plugins/Validation/Methods/required + required: function( value, element, param ) { + // check if dependency is met + if ( !this.depend(param, element) ) { + return "dependency-mismatch"; + } + if ( element.nodeName.toLowerCase() === "select" ) { + // could be an array for select-multiple or a string, both are fine this way + var val = $(element).val(); + return val && val.length > 0; + } + if ( this.checkable(element) ) { + return this.getLength(value, element) > 0; + } + return $.trim(value).length > 0; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/email + email: function( value, element ) { + // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/ + return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/url + url: function( value, element ) { + // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/ + return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/date + date: function( value, element ) { + return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString()); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/dateISO + dateISO: function( value, element ) { + return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/number + number: function( value, element ) { + return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/digits + digits: function( value, element ) { + return this.optional(element) || /^\d+$/.test(value); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/creditcard + // based on http://en.wikipedia.org/wiki/Luhn + creditcard: function( value, element ) { + if ( this.optional(element) ) { + return "dependency-mismatch"; + } + // accept only spaces, digits and dashes + if ( /[^0-9 \-]+/.test(value) ) { + return false; + } + var nCheck = 0, + nDigit = 0, + bEven = false; + + value = value.replace(/\D/g, ""); + + for (var n = value.length - 1; n >= 0; n--) { + var cDigit = value.charAt(n); + nDigit = parseInt(cDigit, 10); + if ( bEven ) { + if ( (nDigit *= 2) > 9 ) { + nDigit -= 9; + } + } + nCheck += nDigit; + bEven = !bEven; + } + + return (nCheck % 10) === 0; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/minlength + minlength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); + return this.optional(element) || length >= param; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/maxlength + maxlength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); + return this.optional(element) || length <= param; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/rangelength + rangelength: function( value, element, param ) { + var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element); + return this.optional(element) || ( length >= param[0] && length <= param[1] ); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/min + min: function( value, element, param ) { + return this.optional(element) || value >= param; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/max + max: function( value, element, param ) { + return this.optional(element) || value <= param; + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/range + range: function( value, element, param ) { + return this.optional(element) || ( value >= param[0] && value <= param[1] ); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/equalTo + equalTo: function( value, element, param ) { + // bind to the blur event of the target in order to revalidate whenever the target field is updated + // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead + var target = $(param); + if ( this.settings.onfocusout ) { + target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { + $(element).valid(); + }); + } + return value === target.val(); + }, + + // http://docs.jquery.com/Plugins/Validation/Methods/remote + remote: function( value, element, param ) { + if ( this.optional(element) ) { + return "dependency-mismatch"; + } + + var previous = this.previousValue(element); + if (!this.settings.messages[element.name] ) { + this.settings.messages[element.name] = {}; + } + previous.originalMessage = this.settings.messages[element.name].remote; + this.settings.messages[element.name].remote = previous.message; + + param = typeof param === "string" && {url:param} || param; + + if ( previous.old === value ) { + return previous.valid; + } + + previous.old = value; + var validator = this; + this.startRequest(element); + var data = {}; + data[element.name] = value; + $.ajax($.extend(true, { + url: param, + mode: "abort", + port: "validate" + element.name, + dataType: "json", + data: data, + success: function( response ) { + validator.settings.messages[element.name].remote = previous.originalMessage; + var valid = response === true || response === "true"; + if ( valid ) { + var submitted = validator.formSubmitted; + validator.prepareElement(element); + validator.formSubmitted = submitted; + validator.successList.push(element); + delete validator.invalid[element.name]; + validator.showErrors(); + } else { + var errors = {}; + var message = response || validator.defaultMessage( element, "remote" ); + errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message; + validator.invalid[element.name] = true; + validator.showErrors(errors); + } + previous.valid = valid; + validator.stopRequest(element, valid); + } + }, param)); + return "pending"; + } + + } + +}); + +// deprecated, use $.validator.format instead +$.format = $.validator.format; + +}(jQuery)); + +// ajax mode: abort +// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); +// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() +(function($) { + var pendingRequests = {}; + // Use a prefilter if available (1.5+) + if ( $.ajaxPrefilter ) { + $.ajaxPrefilter(function( settings, _, xhr ) { + var port = settings.port; + if ( settings.mode === "abort" ) { + if ( pendingRequests[port] ) { + pendingRequests[port].abort(); + } + pendingRequests[port] = xhr; + } + }); + } else { + // Proxy ajax + var ajax = $.ajax; + $.ajax = function( settings ) { + var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode, + port = ( "port" in settings ? settings : $.ajaxSettings ).port; + if ( mode === "abort" ) { + if ( pendingRequests[port] ) { + pendingRequests[port].abort(); + } + pendingRequests[port] = ajax.apply(this, arguments); + return pendingRequests[port]; + } + return ajax.apply(this, arguments); + }; + } +}(jQuery)); + +// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation +// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target +(function($) { + $.extend($.fn, { + validateDelegate: function( delegate, type, handler ) { + return this.bind(type, function( event ) { + var target = $(event.target); + if ( target.is(delegate) ) { + return handler.apply(target, arguments); + } + }); + } + }); +}(jQuery)); diff --git a/server/src/uds/static/adm/js/jquery.validate.min.js b/server/src/uds/static/adm/js/jquery.validate.min.js new file mode 100644 index 000000000..cbaf5109a --- /dev/null +++ b/server/src/uds/static/adm/js/jquery.validate.min.js @@ -0,0 +1,2 @@ +/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation +* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"Warning: No message defined for "+e.name+"")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery); \ No newline at end of file diff --git a/server/src/uds/templates/uds/admin/index.html b/server/src/uds/templates/uds/admin/index.html index 5d83e467b..58b81d6e3 100644 --- a/server/src/uds/templates/uds/admin/index.html +++ b/server/src/uds/templates/uds/admin/index.html @@ -4,13 +4,12 @@ {% endspaceless %} - {% block title %}{% endblock %} + UDS Dashboard - - + - + @@ -52,6 +51,7 @@ + @@ -72,15 +72,15 @@ @@ -119,6 +119,7 @@ {% js_template 'table' %} {% js_template 'modal' %} + {% js_template 'responsive_table' %} {% js_template 'fld/checkbox' %} {% js_template 'fld/choice' %} diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/basic-input.html b/server/src/uds/templates/uds/admin/tmpl/fld/basic-input.html new file mode 100644 index 000000000..fbeddfecd --- /dev/null +++ b/server/src/uds/templates/uds/admin/tmpl/fld/basic-input.html @@ -0,0 +1,6 @@ +{% extends "uds/admin/tmpl/fld/form-group.html" %} +{% block field %} +{% verbatim %} + +{% endverbatim %} +{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/numeric.html b/server/src/uds/templates/uds/admin/tmpl/fld/numeric.html index 30c297842..30265dd99 100644 --- a/server/src/uds/templates/uds/admin/tmpl/fld/numeric.html +++ b/server/src/uds/templates/uds/admin/tmpl/fld/numeric.html @@ -1,7 +1,3 @@ -{% extends "uds/admin/tmpl/fld/form-group.html" %} +{% extends "uds/admin/tmpl/fld/basic-input.html" %} {% load i18n %} -{% block field %} -{% verbatim %} - -{% endverbatim %} -{% endblock %} \ No newline at end of file +{% block type %}numeric{% endblock %} diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/password.html b/server/src/uds/templates/uds/admin/tmpl/fld/password.html index 09f4a91e1..6afb54346 100644 --- a/server/src/uds/templates/uds/admin/tmpl/fld/password.html +++ b/server/src/uds/templates/uds/admin/tmpl/fld/password.html @@ -1,2 +1,3 @@ -{% verbatim %} -{% endverbatim %} \ No newline at end of file +{% extends "uds/admin/tmpl/fld/basic-input.html" %} +{% load i18n %} +{% block type %}password{% endblock %} diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/text.html b/server/src/uds/templates/uds/admin/tmpl/fld/text.html index bde012f15..9f0a87748 100644 --- a/server/src/uds/templates/uds/admin/tmpl/fld/text.html +++ b/server/src/uds/templates/uds/admin/tmpl/fld/text.html @@ -1,7 +1,2 @@ -{% extends "uds/admin/tmpl/fld/form-group.html" %} -{% load i18n %} -{% block field %} -{% verbatim %} - -{% endverbatim %} -{% endblock %} \ No newline at end of file +{% extends "uds/admin/tmpl/fld/basic-input.html" %} +{% block type %}text{% endblock %} diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html b/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html index 09f4a91e1..07cd48fa5 100644 --- a/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html +++ b/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html @@ -1,2 +1,6 @@ +{% extends "uds/admin/tmpl/fld/form-group.html" %} +{% block field %} {% verbatim %} -{% endverbatim %} \ No newline at end of file + +{% endverbatim %} +{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/admin/tmpl/responsive-table.html b/server/src/uds/templates/uds/admin/tmpl/responsive-table.html deleted file mode 100644 index 22ab18150..000000000 --- a/server/src/uds/templates/uds/admin/tmpl/responsive-table.html +++ /dev/null @@ -1,10 +0,0 @@ -{% verbatim %} - -{% endverbatim %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/admin/tmpl/responsive_table.html b/server/src/uds/templates/uds/admin/tmpl/responsive_table.html new file mode 100644 index 000000000..dd1fecfa7 --- /dev/null +++ b/server/src/uds/templates/uds/admin/tmpl/responsive_table.html @@ -0,0 +1,13 @@ +{% verbatim %} + +{% endverbatim %} \ No newline at end of file diff --git a/server/src/uds/templatetags/REST.py b/server/src/uds/templatetags/REST.py index 032ffa0a1..d76e8227e 100644 --- a/server/src/uds/templatetags/REST.py +++ b/server/src/uds/templatetags/REST.py @@ -33,7 +33,9 @@ from __future__ import unicode_literals from django import template +from django.conf import settings from uds.REST import AUTH_TOKEN_HEADER +import re import logging @@ -61,5 +63,8 @@ def js_template_path(context, path): @register.simple_tag(name='js_template', takes_context=True) def js_template(context, template_name, template_id = None): template_id = (template_id or 'tmpl_' + template_name).replace('/', '_') - tmpl = template.loader.get_template(context['template_path'] + '/' + template_name + '.html') - return '' + tmpl = template.loader.get_template(context['template_path'] + '/' + template_name + '.html').render(context) + # Clean tmpl + if not settings.DEBUG: + tmpl = re.sub('\s+', ' ', tmpl) + return ''.format(template_id, tmpl) diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 1bda494ee..65284e5f4 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -59,7 +59,7 @@ class HTML5RDPTransport(Transport): needsJava = False # If this transport needs java for rendering supportedOss = OsDetector.allOss - guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/https & port if needed) as accesible from users'), defvalue = 'https://', length = 64) + guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/https & port if needed) as accesible from users'), defvalue = 'https://', length = 64, required=True) useEmptyCreds = gui.CheckBoxField(label = _('Empty creds'), order = 2, tooltip = _('If checked, the credentials used to connect will be emtpy')) fixedName = gui.TextField(label=_('Username'), order = 3, tooltip = _('If not empty, this username will be always used as credential')) fixedPassword = gui.PasswordField(label=_('Password'), order = 4, tooltip = _('If not empty, this password will be always used as credential'))