예제 #1
0
 def getHTML( self, actionURL ):
     l = []
     for subContrib in self._subContribList:
         l.append("""<li><i>%s</i></li>"""%subContrib.getTitle())
     msg =  _("""
     <font size="+2">Are you sure that you want to <font color="red"><b>DELETE</b></font> the following sub contributions:<ul>%s</ul>?</font><br>
           """)%("".join(l))
     wc = wcomponents.WConfirmation()
     subContribIdList = []
     for subContrib in self._subContribList:
         subContribIdList.append( subContrib.getId() )
     return wc.getHTML( msg, actionURL, {"selectedCateg": subContribIdList}, \
                                         confirmButtonCaption= _("Yes"), \
                                         cancelButtonCaption= _("No") )
예제 #2
0
    def getHTML( self, actionURL ):
        subcontribs = ''.join(list("<li>{0}</li>".format(s.getTitle()) for s in self._subContribList))

        msg = {'challenge': _("Are you sure that you want to delete the following subcontributions?"),
               'target': "<ul>{0}</ul>".format(subcontribs)
               }

        wc = wcomponents.WConfirmation()

        subContribIdList = list(sc.getId() for sc in self._subContribList)

        return wc.getHTML(msg, actionURL, {"selectedCateg": subContribIdList},
                          confirmButtonCaption= _("Yes"),
                          cancelButtonCaption= _("No") )
예제 #3
0
    def _getTabContent(self, params):
        wc = wcomponents.WConfirmation()

        msg = {
            'challenge':
            _("Are you sure you want to change the schedule of this session from '{0}' to '{1}'?"
              ).format(self._session.getScheduleType(), params["tt_type"]),
            'target':
            self._session.getTitle(),
            'subtext':
            _("Note that if you continue any contribution scheduled within any slot of the current session will be unscheduled"
              )
        }

        url = urlHandlers.UHSessionDataModification.getURL(self._session)
        return wc.getHTML(msg, url, params)
예제 #4
0
 def _getTabContent(self, params):
     wc = wcomponents.WConfirmation()
     msg = """Are you sure you want to pack the database?"""
     url = urlHandlers.UHMaintenancePerformPack.getURL()
     return """
             <table align="center" width="95%%">
                 <tr>
                     <td class="formTitle">Maintenance: Database packing</td>
                 </tr>
                 <tr>
                     <td>
                 <br>
                         %s
                     </td>
                 </tr>
             </table>
             """ % wc.getHTML(msg, url, {})
예제 #5
0
 def _getTabContent(self, params):
     msg = """Are you sure you want to delete the temporary directory
     (note that all the files in that directory will be deleted)?"""
     wc = wcomponents.WConfirmation()
     url = urlHandlers.UHMaintenancePerformTmpCleanup.getURL()
     return """
             <table align="center" width="95%%">
                 <tr>
                     <td class="formTitle">Maintenance: Cleaning-up temporary directory</td>
                 </tr>
                 <tr>
                     <td>
                 <br>
                         %s
                     </td>
                 </tr>
             </table>
             """ % wc.getHTML(msg, url, {})
예제 #6
0
    def _getTabContent(self, params):
        msg = {
            'challenge':
            _("Are you sure that you want to lock this session?"),
            'target':
            self._session.getTitle(),
            'subtext':
            _("Note that if you lock this session, you will not be able to change its details any more. "
              "Only the creator of the event or an administrator of the system / category can unlock a session."
              ),
        }

        wc = wcomponents.WConfirmation()
        return wc.getHTML(msg,
                          urlHandlers.UHSessionClose.getURL(self._session), {},
                          severity="warning",
                          confirmButtonCaption=_("Yes, lock this session"),
                          cancelButtonCaption=_("No"))
예제 #7
0
    def _getTabContent(self, params):

        msg = {
            'challenge':
            _("Are you sure that you want to delete this session?"),
            'target':
            self._session.getTitle(),
            'subtext':
            _("Note that if you delete this session all the items under it will also be deleted"
              )
        }

        wc = wcomponents.WConfirmation()
        return wc.getHTML(msg,
                          urlHandlers.UHSessionDeletion.getURL(self._session),
                          {},
                          severity="danger",
                          confirmButtonCaption=_("Yes"),
                          cancelButtonCaption=_("No"))
예제 #8
0
    def _getTabContent(self, params):
        wc = wcomponents.WConfirmation()

        statuses = ''.join(
            list("<li>{0}</li>".format(self._conf.getRegistrationForm(
            ).getStatusById(s).getCaption() or _('-- unnamed status --'))
                 for s in self._statusesIds))

        msg = {
            'challenge':
            _("Are you sure you want to delete the following registration statuses?"
              ),
            'target':
            "<ul>{0}</ul>".format(statuses),
            'subtext':
            _("Please note that any existing registrants will lose this information"
              )
        }

        url = urlHandlers.UHConfModifRegFormActionStatuses.getURL(self._conf)
        return wc.getHTML(msg, url, {
            "statusesIds": self._statusesIds,
            "removeStatuses": "1"
        })