diff --git a/databases/databaseManager.py b/databases/databaseManager.py index 312f29acf..0f09ea0cc 100644 --- a/databases/databaseManager.py +++ b/databases/databaseManager.py @@ -67,7 +67,8 @@ class DatabaseManager: result = mysqlUtilities.submitDBCreation(dbName, dbUsername, dbPassword, databaseWebsite) if result[0] == 1: - data_ret = {'status': 1, 'createDBStatus': 1, 'error_message': "None"} + data_ret = {'status': 1, 'createDBStatus': 1, 'error_message': "None", + 'dbName': dbName, 'dbUsername': dbUsername} json_data = json.dumps(data_ret) return HttpResponse(json_data) else: diff --git a/databases/static/databases/databases.js b/databases/static/databases/databases.js index 7c6eca78f..10faa9798 100644 --- a/databases/static/databases/databases.js +++ b/databases/static/databases/databases.js @@ -75,9 +75,15 @@ app.controller('createDatabase', function ($scope, $http) { $scope.createDatabaseLoading = true; $scope.dbDetails = false; + var successMessage = 'Database successfully created.'; + if (response.data.dbName && response.data.dbUsername) { + successMessage = 'Database successfully created.\n' + + 'Database Name: ' + response.data.dbName + '\n' + + 'Database User: ' + response.data.dbUsername; + } new PNotify({ title: 'Success!', - text: 'Database successfully created.', + text: successMessage, type: 'success' }); } else { diff --git a/databases/templates/databases/createDatabase.html b/databases/templates/databases/createDatabase.html index abcbeb8cf..662896110 100644 --- a/databases/templates/databases/createDatabase.html +++ b/databases/templates/databases/createDatabase.html @@ -95,6 +95,39 @@ box-shadow: 0 0 0 3px rgba(91,95,207,0.1); } + /* Windows selectbox fixes */ + select.form-control { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 12px center; + background-size: 20px; + padding-right: 40px; + line-height: 1.5; + min-height: 44px; + } + + /* Windows-specific fixes */ + @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + select.form-control { + color: #2f3640 !important; + background-color: white !important; + } + } + + /* Fix for Windows Edge and Chrome */ + select.form-control::-ms-expand { + display: none; + } + + select.form-control:focus { + color: #2f3640; + background-color: white; + } + /* Website selector card */ .website-selector-card { background: #f8f9ff; diff --git a/databases/templates/databases/deleteDatabase.html b/databases/templates/databases/deleteDatabase.html index 6537fd967..b8eae4dd0 100644 --- a/databases/templates/databases/deleteDatabase.html +++ b/databases/templates/databases/deleteDatabase.html @@ -95,6 +95,39 @@ box-shadow: 0 0 0 3px rgba(220,53,69,0.1); } + /* Windows selectbox fixes */ + select.form-control { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 12px center; + background-size: 20px; + padding-right: 40px; + line-height: 1.5; + min-height: 44px; + } + + /* Windows-specific fixes */ + @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + select.form-control { + color: #2f3640 !important; + background-color: white !important; + } + } + + /* Fix for Windows Edge and Chrome */ + select.form-control::-ms-expand { + display: none; + } + + select.form-control:focus { + color: #2f3640; + background-color: white; + } + /* Website selector card */ .website-selector-card { background: #fff5f5; diff --git a/databases/templates/databases/listDataBases.html b/databases/templates/databases/listDataBases.html index c2c7269e4..251956110 100644 --- a/databases/templates/databases/listDataBases.html +++ b/databases/templates/databases/listDataBases.html @@ -102,6 +102,39 @@ box-shadow: 0 0 0 3px rgba(91,95,207,0.1); } + /* Windows selectbox fixes */ + select.form-control { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 12px center; + background-size: 20px; + padding-right: 40px; + line-height: 1.5; + min-height: 44px; + } + + /* Windows-specific fixes */ + @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + select.form-control { + color: #2f3640 !important; + background-color: white !important; + } + } + + /* Fix for Windows Edge and Chrome */ + select.form-control::-ms-expand { + display: none; + } + + select.form-control:focus { + color: #2f3640; + background-color: white; + } + /* Website selector card */ .website-selector-card { background: #f8f9ff;