Skip to content

Commit

Permalink
update apiFilePost parameters in postContentItem
Browse files Browse the repository at this point in the history
  • Loading branch information
taheralfayad committed May 2, 2024
2 parents 50f85bc + c096ab5 commit 87397e5
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 15 deletions.
3 changes: 1 addition & 2 deletions assets/js/Components/Admin/UsersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ class UsersPage extends React.Component {
.then((responseStr) => responseStr.json())
.then((response) => {
let users = this.state.users
console.log('response', response);
if (response && response.id) {
const ind = users.findIndex((el) => { el.id === response.id })
users[ind] = response
Expand All @@ -183,4 +182,4 @@ class UsersPage extends React.Component {
}
}

export default UsersPage;
export default UsersPage;
1 change: 0 additions & 1 deletion assets/js/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ class App extends React.Component {
});
}
if (data.data && data.data.id) {
console.log('new data', data.data)
report = data.data
hasNewReport = true
}
Expand Down
7 changes: 7 additions & 0 deletions assets/js/Components/FilesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ class FilesModal extends React.Component {
return
}

if(file.size > 1024 * 1024 * 10) {
this.addMessage({severity: 'error', message: this.props.t('msg.file.replace.file_size'), timeout: 5000})
this.setState({ replaceFileObj: null })
this.forceUpdate()
return
}

this.setState({ replaceFileObj: file })
}

Expand Down
6 changes: 2 additions & 4 deletions assets/js/Components/Forms/HeadingEmptyForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,15 @@ export default class HeadingEmptyForm extends React.Component {
if(!this.state.deleteHeader) {
this.checkTextNotEmpty()
}


if (this.formErrors.length > 0) {
this.setState({ textInputErrors: this.formErrors })
}
}

else {
this.setState({ textInputErrors: []})
let issue = this.props.activeIssue
issue.newHtml = this.processHtml()
console.log(issue.newHtml)
this.props.handleIssueSave(issue)
}
}
Expand Down
1 change: 0 additions & 1 deletion assets/js/Components/Forms/TableHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default class TableHeaders extends React.Component {
}

handleSubmit() {
console.log('activeIssue', this.props.activeIssue)
let issue = this.props.activeIssue
issue.newHtml = this.fixHeaders()
this.props.handleIssueSave(issue)
Expand Down
2 changes: 0 additions & 2 deletions assets/js/Services/Html.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export function setInnerText(element, newText) {
const children = element.childNodes
let textNodeFound = false

console.log(children)

children.forEach(node => {
if(node.nodeType === Node.TEXT_NODE) {
if(textNodeFound != true) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/getInitialData.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function getInitialData() {
data = JSON.parse(settingsElement.textContent)

if (Object.keys(data).length > 0) {
console.log('data', data)
console.log('Data was found and loaded!')
} else {
console.error('No data loaded!')
}
Expand Down
3 changes: 2 additions & 1 deletion build/nginx/deploy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ server {

rewrite ^/udoit3/(.*)$ /$1 break;
try_files $uri @symfonyFront;
client_max_body_size 10M;
}

set $symfonyRoot /var/www/html/public;
Expand All @@ -29,4 +30,4 @@ server {
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
}
3 changes: 2 additions & 1 deletion build/nginx/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ server {

rewrite ^/udoit3/(.*)$ /$1 break;
try_files $uri @symfonyFront;
client_max_body_size 10M;
}

set $symfonyRoot /var/www/html/public;
Expand All @@ -29,4 +30,4 @@ server {
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
}
2 changes: 2 additions & 0 deletions build/nginx/php-custom.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
max_execution_time = 180
memory_limit = 800M
upload_max_filesize = 10M
post_max_size = 10M
5 changes: 3 additions & 2 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"msg.sync.started": "Course scan started.",
"msg.sync.failed": "Course scan failed. Course is missing.",
"msg.file.replace.file_type": "File type not accepted. Please input a file with the correct filetype.",
"msg.file.replace.file_size": "File size too large. Please input a file of a size less than 10MB",
"msg.sync.completed": "Course scan completed.",
"msg.sync.course_inactive": "Course scan failed. Course is inactive.",

Expand Down Expand Up @@ -358,7 +359,7 @@
"rule.desc.NoHeadings": "<p>If appropriate, add headings to the page to organize the content for sighted and <a href='https://en.wikipedia.org/wiki/Screen_reader' target='_blank'>screen reader</a> users. The headings should represent an accurate outline of the content</p>",
"rule.desc.ObjectMustContainText": "<p>Multimedia objects should be accompanied by a link to a transcript of the content.</p>",
"rule.desc.ObjectTagDetected": "<p>Multimedia embedded using the 'Object' tag may require the user to install a plugin for their web browser. This can create support and access issues for some users. Additionally, users on mobile devices may not be able to view the multimedia content at all. Consider using an alternative format that the user's browser can display natively.</p>",
"rule.desc.ParagraphNotUsedAsHeader": "<p>Bold and Italics are used to emphasize text, whereas headings are used to define the structure of the document. Headings like <code>h1-h6</code> are extremely useful for non-sighted users to navigate the structure of the page, and formatting a paragraph to just be big or bold, while it might visually look like a heading, does not make it one.</p>",
"rule.desc.ParagraphNotUsedAsHeader": "<p>Bold and Italics are used to emphasize text, whereas headings are used to define the structure of the document. Headings like <code>h1-h6</code> are extremely useful for non-sighted users to navigate the structure of the page, and formatting a paragraph to just be big or bold, while it might visually look like a heading, does not make it one. UDOIT has flagged this as a potential usage of style for document structure, please ensure that this is not the case when you review the content in the HTML editor.</p>",
"rule.desc.PreShouldNotBeUsedForTabularValues": "<p>If a <code>pre</code> element is used for tabular data, change the data to use a well-formed table.</p>",
"rule.desc.RedirectedLink": "<p>When the address of a web page changes, the content owner may set up a redirect so that the link is not broken. However, that redirect could go away in the future, so it's best to update the link now. The real url has been populated into the form below.</p>",
"rule.desc.TableDataShouldHaveTableHeader": "<p>Table headers provide a description of the table structure for sighted and <a href='https://en.wikipedia.org/wiki/Screen_reader' target='_blank'>screen reader</a> users.</p>",
Expand All @@ -384,4 +385,4 @@

"rule.label.SearchKeyWord": "Keyword found",
"rule.desc.SearchKeyWord": "The keyword has been found"
}
}
1 change: 1 addition & 0 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"msg.sync.started": "Se inició el escaneo del curso.",
"msg.sync.failed": "Falló el escaneo del curso. Falta el curso.",
"msg.file.replace.file_type": "El tipo de archivo no es válido. Por favor aporte un archivo de tipo correcto.",
"msg.file.replace.file_size": "El tamaño del archivo es demasiado grande. Por favor aporte un archivo de tamaño menor a 10MB",
"msg.sync.completed": "Escaneo del curso completado.",
"msg.sync.course_inactive": "Falló el escaneo del curso. El curso está inactivo.",

Expand Down

0 comments on commit 87397e5

Please sign in to comment.