Changeset 17809 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 4 Jun 2024, 07:54:30 (5 months ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r17787 r17809 338 338 339 339 # 340 # Login/logout and language switch pages ...340 # Login/logout and language switch pages 341 341 # 342 342 … … 532 532 533 533 # 534 # Contact form ...534 # Contact form 535 535 # 536 536 … … 624 624 625 625 # 626 # University related pages ...626 # University related pages 627 627 # 628 628 … … 840 840 841 841 # 842 # User container pages ...842 # User container pages 843 843 # 844 844 … … 1186 1186 1187 1187 # 1188 # Search pages ...1188 # Search pages 1189 1189 # 1190 1190 … … 1214 1214 1215 1215 # 1216 # Configuration pages ...1216 # Configuration pages 1217 1217 # 1218 1218 … … 1344 1344 1345 1345 # 1346 # Datacenter pages ...1346 # Datacenter pages 1347 1347 # 1348 1348 … … 1498 1498 return 1499 1499 normalized_filename = self.getNormalizedFileName(filename) 1500 if len(normalized_filename.split('.')[0]) > 65: 1501 self.flash(_("Maximum file name length is 65 characters! " 1502 "Please choose a shorter file name."), 1503 type='danger') 1504 return 1500 1505 finished_file = os.path.join( 1501 1506 self.context.storage, 'finished', normalized_filename) … … 2558 2563 2559 2564 # 2560 # Courses pages2561 2565 # 2562 2566 class CoursePage(KofaDisplayFormPage, LocalRoleAssignmentUtilityView): … … 2747 2751 2748 2752 # 2749 # Certificate course pages...2753 # CertificateCourse pages... 2750 2754 # 2751 2755 class CertificateCoursePage(KofaPage): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenteruploadpage.pt
r13813 r17809 34 34 </div> 35 35 </div> 36 <br /> 36 <br /><br /> 37 <span i18n:translate=""> 38 Please note that the file name must not exceed 65 characters 39 (including the officer's user name, which will become part of the file name). 40 </span> 37 41 <form method="post" enctype="multipart/form-data"> 38 42 <br /> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r16818 r17809 225 225 return 226 226 227 def test_forbidden_filename(self): 228 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 229 self.browser.open(self.datacenter_path) 230 self.assertEqual(self.browser.headers['Status'], '200 Ok') 231 self.assertEqual(self.browser.url, self.datacenter_path) 232 self.browser.getLink("Upload data").click() 233 file = open(FORBIDDEN_FILE) 234 ctrl = self.browser.getControl(name='uploadfile:file') 235 file_ctrl = ctrl.mech_control 236 file_ctrl.add_file(file, filename='123456789012345678901234567890123456789012345678901234567890123456.csv') 237 self.browser.getControl('Upload').click() 238 self.assertTrue( 239 'Maximum file name length is 65 characters!' 240 in self.browser.contents) 241 227 242 class DataCenterUIExportTests(UniversitySetup, FunctionalAsyncTestCase): 228 243 # Tests for DataCenter class views and pages.
Note: See TracChangeset for help on using the changeset viewer.