Commits

Zhang Huangbin committed 831e19c

Sync.

Comments (0)

Files changed (5)

libs/mysql/domain.py

                 else:
                     updates['active'] = 0
 
-                # Get domain quota size.
-                domainQuota = str(data.get('domainQuota'))
-                domainQuotaUnit = str(data.get('domainQuotaUnit', 'MB'))
-                if domainQuota.isdigit():
-                    domainQuota = int(domainQuota)
-
-                    if domainQuotaUnit == 'GB':
-                        domainQuota = domainQuota * 1024
-                    elif domainQuotaUnit == 'TB':
-                        domainQuota = domainQuota * 1024 * 1024
-
-                    updates['maxquota'] = domainQuota
+                updates['maxquota'] = 0
 
                 # Update SQL db with columns: maxquota, active.
                 try:

templates/default/ldap/domain/list.html

                     {% endif %}
                     <th>{{ _('Domain') }}</th>
                     <th>{{ _('Name') }}</th>
-                    <th>{{ _('Quota') }}</th>
                     <th>{{ _('Users') }}</th>
                     <th>{{ _('Created') }}</th>
                 </tr>
                             </td>
 
                             <td class="vcenter">{% if cn != '' and cn != domain %}{{ cn |cutString }}{% endif %}</td>
-
-                            {# Domain quota#}
-                            <td class="vcenter">
-                                {% if domainQuotaBytes > 0 %}
-                                    {% set percentOfDomainQuotaBytes = domainCurrentQuotaSize |getPercentage(domainQuotaBytes) %}
-                                    <div>
-                                        <span>{{ percentOfDomainQuotaBytes }}%</span>
-
-                                        {# Add link to domain profile page #}
-                                        {% if session.get('domainGlobalAdmin') is sameas true %}
-                                            <span class="grey">(<a href="{{ctx.homepath}}/profile/domain/advanced/{{domain}}#domainQuota" title="{{ _('Edit quota setting') }}" alt="{{ _('Edit quota setting') }}" style="text-decoration: none;">{{ domainCurrentQuotaSize |filesizeformat }}/{{ domainQuotaBytes |filesizeformat }}</a>)</span>
-                                        {% else %}
-                                            <span class="grey">({{ domainCurrentQuotaSize |filesizeformat }}/{{ domainQuotaBytes |filesizeformat }})</span>
-                                        {% endif %}
-                                    </div>
-
-                                    {{ display_progress_bar(percentOfDomainQuotaBytes, show_zero=true, width="60%", style='thin') }}
-                                {% else %}
-                                    {% if session.get('domainGlobalAdmin') is sameas true %}
-                                        <a href="{{ctx.homepath}}/profile/domain/advanced/{{domain}}#domainQuota" title="{{ _('Edit quota setting') }}" alt="{{ _('Edit quota setting') }}" style="text-decoration: none;">{{ _('Unlimited') }}</a>
-                                    {% else %}
-                                        {{ _('Unlimited') }}
-                                    {% endif %}
-                                {% endif %}
-                            </td>
-
                             {# Mail user count #}
                             <td class="vcenter">
                                 {% if numberOfUsers > 0 %}
                                 {% endif %}
                             </td>
 
-                            {# Show number of domain admins #}
-                            {% if session.get('domainGlobalAdmin') is sameas true %}
-                                <td class="vcenter"><a href="{{ctx.homepath}}/profile/domain/general/{{domain}}" style="text-decoration: none;" title="{{ _('List assigned domain admins') }}">{{ entries.get('domainAdmin', []) |length }}</a></td>
-                            {% endif %}
-
                             <td class="vcenter">{{ timestamp |setDatetimeFormat(hour=False) }}</td>
                         </tr>
                     {% endfor %}

templates/default/macros/msgHandlers.html

 
     {% if msg == 'CREATED_SUCCESS' %}
         <div class='notification note-success'><a href='#' class='close'></a>
-            <p>{{ _('Domain created.') }} <a href='{{ctx.homepath}}/create/domain'>{{ _('add one more') }}</a>? {{ _('Or create other mail accounts:') }} <a href='{{ctx.homepath}}/create/user/{{cur_domain}}'>{{ _('User') }}</a>, <a href='{{ctx.homepath}}/create/maillist/{{cur_domain}}'>{{ _('Mail List') }}</a>.</p>
+            <p>{{ _('Domain created.') }} <a href='{{ctx.homepath}}/create/domain'>{{ _('add one more') }}</a>? {{ _('Or create other mail accounts:') }} <a href='{{ctx.homepath}}/create/user/{{cur_domain}}'>{{ _('User') }}</a>.</p>
         </div>
     {% else %}
         {% if msg in handlers %}

templates/default/mysql/domain/list.html

                     {% endif %}
                     <th>{{ _('Domain') }}</th>
                     <th>{{ _('Name') }}</th>
-                    <th>{{ _('Quota') }}</th>
                     <th>{{ _('Users') }}</th>
                     <th>{{ _('Created') }}</th>
                 </tr>
                                 <td class="vcenter">{{ r.description |cutString |e }}</td>
                             {% endif %}
 
-                            {#-- Domain Quota --#}
-                            <td class="vcenter">
-                                {% if r.maxquota > 0 %}
-                                    {% set percentOfDomainQuota = r.quota_count |getPercentage(r.maxquota) %}
-
-                                    {% if session.get('domainGlobalAdmin') is sameas true %}
-                                        {#-- Link to domain profile page. --#}
-                                        <a href="{{ctx.homepath}}/profile/domain/general/{{r.domain}}" style="text-decoration: none;"><span title="{{ _('Edit quota setting') }}">{{ percentOfDomainQuota }}%</span> <span class="grey"><span title="{{ _('Used') }}">({{ r.stored_quota |filesizeformat }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |filesizeformat(baseMB=True) }}</span>) <span title="{{ _('Total') }}">{{ display_number_of_account_limited(r.maxquota |filesizeformat(baseMB=True)) }}</span></span></a>
-                                    {% else %}
-                                        <span>{{ percentOfDomainQuota }}%</span> <span class="grey"><span title="{{ _('Used') }}">({{ r.stored_quota |filesizeformat }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |filesizeformat(baseMB=True) }}</span>) <span title="{{ _('Total') }}">{{ display_number_of_account_limited(r.maxquota |filesizeformat(baseMB=True)) }}</span></span>
-                                    {% endif %}
-
-                                    {{ display_progress_bar(percentOfDomainQuota, style='thin') }}
-                                {% else %}
-                                    {% if session.get('domainGlobalAdmin') is sameas true %}
-                                        <span title="{{ _('Used') }}">{{ r.stored_quota |filesizeformat }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |filesizeformat(baseMB=True) }}</span> / <a href="{{ctx.homepath}}/profile/domain/general/{{r.domain}}" title="{{ _('Edit quota setting') }}" style="text-decoration: none;">{{ _('Unlimited') }}</a>
-                                    {% else %}
-                                        <span title="{{ _('Used') }}">{{ r.stored_quota |filesizeformat }}</span> / <span title="{{ _('Allocated') }}">{{ r.quota_count |filesizeformat(baseMB=True) }}</span> <span title="{{ _('Total') }}">{{ _('Unlimited') }}</span>
-                                    {% endif %}
-                                {% endif %}
-                            </td>
-
                             {#-- Users --#}
                             <td class="vcenter">
                                 {% if r.mailboxes > 0 %}

templates/default/mysql/domain/profile.html

                         </div>{# .col2-3 #}
                     </div>
 
-                    <div class="columns clear">
-                        <div class="col2-3 ">
-                            <div class="bt-space0">&nbsp;</div>
-                            {% if session.get('domainGlobalAdmin') is sameas true %}
-                                {% if profile.maxquota >= (1024 * 1024) %}
-                                    {% set domainQuota = profile.maxquota / (1024*1024) %}
-                                    {% set domainQuotaUnit = 'TB' %}
-                                {% elif 1024*1024 > profile.maxquota >= 1024 %}
-                                    {% set domainQuota = profile.maxquota / 1024 %}
-                                    {% set domainQuotaUnit = 'GB' %}
-                                {% else %}
-                                    {% set domainQuota = profile.maxquota %}
-                                    {% set domainQuotaUnit = 'MB' %}
-                                {% endif %}
-                                <div class="form-field clear">
-                                    <h4 class="size-250 fl-space">{{ _('Domain quota size') }}</h4>
-                                    <input type="text" name="domainQuota" value="{{ domainQuota |int }}" size="10" class="text fl-space" />
-                                    <select name="domainQuotaUnit">
-                                        {% for unit in ['TB', 'GB', 'MB'] %}
-                                            <option value="{{ unit }}" {% if domainQuotaUnit == unit %}selected{% endif %}>{{ unit }}</option>
-                                        {% endfor %}
-                                    </select>
-                                </div>
-                            {% endif %}
-                        </div>{# .col2-3 #}
-
-                        <div class="col1-3 lastcol">
-                            <div class="mark_blue bt-space10">
-                                <ul class="standard clean-padding bt-space10">
-                                    <li class="bt-space5">{{ _('Set value to 0 or leave it empty for unlimited.') }}</li>
-                                </ul>
-                            </div>
-                        </div>{#-- .col1-3 --#}
-                    </div>{# .columns #}
-
                     {{ display_button_submit() }}
                 </form>
             </div>