예제 #1
0
 def _vs_upload(self):
     return Dictionary(title=_('Icon'),
                       optional_keys=False,
                       render="form",
                       elements=[('icon',
                                  ImageUpload(
                                      title=_('Icon'),
                                      allow_empty=False,
                                      max_size=(80, 80),
                                      validate=self._validate_icon,
                                  )),
                                 ('category',
                                  DropdownChoice(
                                      title=_('Category'),
                                      choices=config.wato_icon_categories,
                                      no_preselect=True,
                                  ))])
예제 #2
0
파일: icons.py 프로젝트: m3rlinux/checkmk
 def _vs_upload(self):
     return Dictionary(
         title=_("Upload icon"),
         optional_keys=False,
         render="form",
         elements=[
             (
                 "icon",
                 ImageUpload(
                     title=_("Icon"),
                     max_size=(80, 80),
                     validate=self._validate_icon,
                 ),
             ),
             (
                 "category",
                 DropdownChoice(
                     title=_("Category"),
                     choices=active_config.wato_icon_categories,
                     no_preselect_title="",
                 ),
             ),
         ],
     )