Changeset 28df4d in indico


Ignore:
Timestamp:
11/30/10 11:42:42 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
afa6cd
Parents:
bad973
git-author:
Leszek Syroka <leszek.marek.syroka@…> (11/25/10 16:33:14)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (11/30/10 11:42:42)
Message:

[FIX] i18n affecting protection settings

  • buttons responsible for checking conference, cateofry, session and contribution protection now has different 'name' attribute. Server action depends on the 'name' not on the 'value'.
  • fix#578
Location:
indico/MaKaC/webinterface
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/rh/categoryMod.py

    ra89f94 r28df4d  
    599599    def _process( self ): 
    600600        params = self._getRequestParams() 
    601         if params["visibility"] == "PRIVATE": 
     601        if params.has_key("changeToPrivate"): 
    602602            self._target.setProtection( 1 ) 
    603         elif params["visibility"] == "INHERITING": 
     603        elif params.has_key("changeToInheriting"): 
    604604            self._target.setProtection( 0 ) 
    605         elif params["visibility"] == "PUBLIC": 
     605        elif params.has_key("changeToPublic"): 
    606606            # The 'Home' category is handled as a special case. 
    607607            # We maintain the illusion for the user of it being either 
  • indico/MaKaC/webinterface/rh/conferenceModif.py

    r138bf2 r28df4d  
    16931693    def _checkParams( self, params ): 
    16941694        RHConferenceModifBase._checkParams( self, params ) 
    1695         if params["visibility"] == "PRIVATE": 
     1695        if params.has_key("changeToPrivate"): 
    16961696            self._protectConference = 1 
    1697         elif params["visibility"] == "INHERITING": 
     1697        elif params.has_key("changeToInheriting"): 
    16981698            self._protectConference = 0 
    1699         elif params["visibility"] == "PUBLIC": 
     1699        elif params.has_key("changeToPublic"): 
    17001700            self._protectConference = -1 
    17011701 
  • indico/MaKaC/webinterface/rh/contribMod.py

    ra89f94 r28df4d  
    14301430    def _process(self): 
    14311431        params = self._getRequestParams() 
    1432         privacy = params.get("visibility","INHERITING") 
    1433         self._protect = 0 
    1434         if privacy == "PRIVATE": 
     1432        if params.has_key("changeToPrivate"): 
    14351433            self._protect = 1 
    1436         elif privacy == "INHERITING": 
     1434        elif params.has_key("changeToInheriting"): 
    14371435            self._protect = 0 
    1438         elif privacy == "PUBLIC": 
     1436        elif params.has_key("changeToPublic"): 
    14391437            self._protect = -1 
    14401438        self._target.setProtection(self._protect) 
  • indico/MaKaC/webinterface/rh/sessionModif.py

    ra89f94 r28df4d  
    11761176    def _checkParams( self, params ): 
    11771177        RHSessionModifBase._checkParams( self, params ) 
    1178         privacy = params.get("visibility","INHERITING") 
    1179         self._protect = 0 
    1180         if privacy == "PRIVATE": 
     1178        if params.has_key("changeToPrivate"): 
    11811179            self._protect = 1 
    1182         elif privacy == "INHERITING": 
     1180        elif params.has_key("changeToInheriting"): 
    11831181            self._protect = 0 
    1184         elif privacy == "PUBLIC": 
     1182        elif params.has_key("changeToPublic"): 
    11851183            self._protect = -1 
    11861184 
  • indico/MaKaC/webinterface/tpls/AccessControlStatusFrame.tpl

    rd25c08 r28df4d  
    136136                <% if privacy == 'PRIVATE' or privacy == 'INHERITING': %> 
    137137                <div class="ACModifButtonEntry"> 
    138                     <%= _("Make it")%> <input type="submit" class="btn" name="visibility" value="<%= _("PUBLIC")%>"> <%= _("(viewable by all the users, regardless of the access protection of the parent " + termsDict[type]['parentName'])%> '<%= parentName %>'). 
     138                    <%= _("Make it")%> <input type="submit" class="btn" name="changeToPublic" value="<%= _("PUBLIC")%>"> <%= _("(viewable by all the users, regardless of the access protection of the parent " + termsDict[type]['parentName'])%> '<%= parentName %>'). 
    139139                </div> 
    140140                <% end %> 
    141141                <% if privacy == 'PUBLIC' or privacy == 'INHERITING': %> 
    142142                <div class="ACModifButtonEntry"> 
    143                     <%= _("Make it")%> <input type="submit" class="btn" name="visibility" value="<%= _("PRIVATE")%>"> <%= _("(viewable only by the users you choose, regardless of the access protection of the parent " + termsDict[type]['parentName'])%> '<%= parentName %>'). 
     143                    <%= _("Make it")%> <input type="submit" class="btn" name="changeToPrivate" value="<%= _("PRIVATE")%>"> <%= _("(viewable only by the users you choose, regardless of the access protection of the parent " + termsDict[type]['parentName'])%> '<%= parentName %>'). 
    144144                </div> 
    145145                <% end %> 
    146146                <% if privacy == 'PUBLIC' or privacy == 'PRIVATE': %> 
    147147                <div class="ACModifButtonEntry"> 
    148                     <%= _("Make it")%> <input type="submit" class="btn" name="visibility" value="<%= _("INHERITING")%>"> <%= _("the access protection from its parent " + termsDict[type]['parentName'])%> '<%= parentName %>' (<span class=ACStatus style="color: <%=parentStatusColor%>;"><%= _(parentPrivacy)%></span> <%= _("for the moment).")%> 
     148                    <%= _("Make it")%> <input type="submit" class="btn" name="changeToInheriting" value="<%= _("INHERITING")%>"> <%= _("the access protection from its parent " + termsDict[type]['parentName'])%> '<%= parentName %>' (<span class=ACStatus style="color: <%=parentStatusColor%>;"><%= _(parentPrivacy)%></span> <%= _("for the moment).")%> 
    149149                </div> 
    150150                <% end %> 
Note: See TracChangeset for help on using the changeset viewer.