Commit 58dc1c7a4d69bc0fc43b201c69e99473b304c2ea
1 parent
839bdc0c
Exists in
master
and in
4 other branches
Remove widget for profile tabs
Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
1 changed file
with
72 additions
and
106 deletions
Show diff stats
colab/accounts/templates/accounts/user_update_form.html
| 1 | 1 | {% extends "base.html" %} |
| 2 | 2 | {% load i18n gravatar plugins widgets_tag %} |
| 3 | 3 | |
| 4 | -{% block html %} | |
| 5 | - {% import_widgets 'profile' %} | |
| 6 | - {{ block.super }} | |
| 7 | -{% endblock %} | |
| 8 | - | |
| 9 | 4 | {% block head_js %} |
| 10 | 5 | <script> |
| 11 | 6 | $(function() { |
| ... | ... | @@ -107,15 +102,6 @@ $(function() { |
| 107 | 102 | </script> |
| 108 | 103 | {% endblock %} |
| 109 | 104 | |
| 110 | -{% block head %} | |
| 111 | - {{ block.super }} | |
| 112 | - | |
| 113 | - {% for widget in widgets_profile %} | |
| 114 | - {{ widget.get_header }} | |
| 115 | - {% endfor %} | |
| 116 | - | |
| 117 | -{% endblock %} | |
| 118 | - | |
| 119 | 105 | {% block main-content %} |
| 120 | 106 | |
| 121 | 107 | <div class="col-lg-12"> |
| ... | ... | @@ -131,16 +117,6 @@ $(function() { |
| 131 | 117 | <br> |
| 132 | 118 | <br> |
| 133 | 119 | |
| 134 | - <!-- Start of navs --> | |
| 135 | - <ul class="nav nav-tabs"> | |
| 136 | - <li class="active"><a data-toggle="pill" href="#profile">Profile</a></li> | |
| 137 | - {% for widget in widgets_profile %} | |
| 138 | - <li> | |
| 139 | - <a data-toggle="pill" href="#{{ widget.identifier }}">{{ widget.name }}</a> | |
| 140 | - </li> | |
| 141 | - {% endfor %} | |
| 142 | - </ul> | |
| 143 | - <!-- End of navs --> | |
| 144 | 120 | <style type="text/css"> |
| 145 | 121 | .tab-pane{ |
| 146 | 122 | border: 1px solid #DDD; |
| ... | ... | @@ -152,97 +128,87 @@ $(function() { |
| 152 | 128 | outline: none; |
| 153 | 129 | } |
| 154 | 130 | </style> |
| 155 | - <div class="tab-content"> | |
| 156 | - <div id="profile" class="tab-pane fade in active"> | |
| 157 | - <form method="post"> | |
| 158 | - {% csrf_token %} | |
| 159 | - | |
| 160 | - <div class="row"> | |
| 161 | - <div class="col-lg-8 col-md-7 col-sm-12 col-xm-12"> | |
| 162 | - {% for field in form %} | |
| 163 | - <div class="col-lg-6 col-md-6 col-sm-12 col-xm-12"> | |
| 164 | - <div class="form-group{% if field.field.required %} required{% endif %}{% if field.errors %} alert alert-danger has-error{% endif %}"> | |
| 165 | - <label for="{{ field.name }}" class="control-label"> | |
| 166 | - {{ field.label }} | |
| 167 | - </label> | |
| 168 | - {{ field }} | |
| 169 | - {{ field.errors }} | |
| 170 | - </div> | |
| 171 | - </div> | |
| 172 | - {% endfor %} | |
| 131 | + <form method="post"> | |
| 132 | + {% csrf_token %} | |
| 133 | + | |
| 134 | + <div class="row"> | |
| 135 | + <div class="col-lg-8 col-md-7 col-sm-12 col-xm-12"> | |
| 136 | + {% for field in form %} | |
| 137 | + <div class="col-lg-6 col-md-6 col-sm-12 col-xm-12"> | |
| 138 | + <div class="form-group{% if field.field.required %} required{% endif %}{% if field.errors %} alert alert-danger has-error{% endif %}"> | |
| 139 | + <label for="{{ field.name }}" class="control-label"> | |
| 140 | + {{ field.label }} | |
| 141 | + </label> | |
| 142 | + {{ field }} | |
| 143 | + {{ field.errors }} | |
| 173 | 144 | </div> |
| 145 | + </div> | |
| 146 | + {% endfor %} | |
| 147 | + </div> | |
| 174 | 148 | |
| 175 | - <div class="col-lg-4 col-md-5 col-sm-12 col-xm-12"> | |
| 176 | - <div class="panel panel-default"> | |
| 177 | - <div class="panel-heading"> | |
| 178 | - <h3 class="panel-title">{% trans "Emails" %}</h3> | |
| 179 | - </div> | |
| 180 | - <div class="panel-body"> | |
| 181 | - <ul class="unstyled-list emails"> | |
| 182 | - {% for email in user_.emails.iterator %} | |
| 183 | - <li> | |
| 184 | - {% gravatar user_.email 30 %} | |
| 185 | - <span class="email-address">{{ email.address }}</span> | |
| 186 | - {% if email.address == user_.email %} | |
| 187 | - <span class="label label-success">{% trans "Primary" %}</span> | |
| 188 | - {% else %} | |
| 189 | - <div class="text-right"> | |
| 190 | - <button class="btn btn-default set-primary" data-loading-text="{% trans 'Setting...' %}">{% trans "Set as Primary" %}</button> | |
| 191 | - <button class="btn btn-danger delete-email" data-loading-text="{% trans 'Deleting...' %}">{% trans "Delete" %}</button> | |
| 192 | - </div> | |
| 193 | - {% endif %} | |
| 194 | - <hr /> | |
| 195 | - </li> | |
| 196 | - {% endfor %} | |
| 197 | - {% for email in user_.emails_not_validated.iterator %} | |
| 198 | - <li> | |
| 199 | - {% gravatar user_.email 30 %} | |
| 200 | - <span class="email-address">{{ email.address }}</span> | |
| 201 | - <div class="text-right"> | |
| 202 | - <button class="btn btn-default verify-email" data-loading-text="{% trans 'Sending verification...' %}"><span class="icon-warning-sign"></span> {% trans "Verify" %}</button> | |
| 203 | - <button class="btn btn-danger delete-email">{% trans "Delete" %}</button> | |
| 204 | - </div> | |
| 205 | - <hr /> | |
| 206 | - </li> | |
| 207 | - {% endfor %} | |
| 208 | - </ul> | |
| 209 | - <div class="form-group"> | |
| 210 | - <label for="new_email">{% trans "Add another email address:" %}</label> | |
| 211 | - <input id="new_email" name="new_email" class="form-control" autocomplete="off" /> | |
| 212 | - </div> | |
| 213 | - <button class="btn btn-primary pull-right" id="add-email">{% trans "Add" %}</button> | |
| 214 | - </div> | |
| 215 | - </div> | |
| 149 | + <div class="col-lg-4 col-md-5 col-sm-12 col-xm-12"> | |
| 150 | + <div class="panel panel-default"> | |
| 151 | + <div class="panel-heading"> | |
| 152 | + <h3 class="panel-title">{% trans "Emails" %}</h3> | |
| 216 | 153 | </div> |
| 217 | - <div class="col-lg-4 col-md-5 col-sm-12 col-xm-12"> | |
| 218 | - <div class="panel panel-default"> | |
| 219 | - <div class="panel-heading"> | |
| 220 | - <h3 class="panel-title"> | |
| 221 | - {% trans 'Change Password' %} | |
| 222 | - </h3> | |
| 223 | - </div> | |
| 224 | - <div class="panel-body"> | |
| 225 | - <a href="{% url 'password_change' %}" class="btn btn-default btn-primary pull-right btn-block">{% trans "Change Password" %}</a> | |
| 226 | - </div> | |
| 154 | + <div class="panel-body"> | |
| 155 | + <ul class="unstyled-list emails"> | |
| 156 | + {% for email in user_.emails.iterator %} | |
| 157 | + <li> | |
| 158 | + {% gravatar user_.email 30 %} | |
| 159 | + <span class="email-address">{{ email.address }}</span> | |
| 160 | + {% if email.address == user_.email %} | |
| 161 | + <span class="label label-success">{% trans "Primary" %}</span> | |
| 162 | + {% else %} | |
| 163 | + <div class="text-right"> | |
| 164 | + <button class="btn btn-default set-primary" data-loading-text="{% trans 'Setting...' %}">{% trans "Set as Primary" %}</button> | |
| 165 | + <button class="btn btn-danger delete-email" data-loading-text="{% trans 'Deleting...' %}">{% trans "Delete" %}</button> | |
| 166 | + </div> | |
| 167 | + {% endif %} | |
| 168 | + <hr /> | |
| 169 | + </li> | |
| 170 | + {% endfor %} | |
| 171 | + {% for email in user_.emails_not_validated.iterator %} | |
| 172 | + <li> | |
| 173 | + {% gravatar user_.email 30 %} | |
| 174 | + <span class="email-address">{{ email.address }}</span> | |
| 175 | + <div class="text-right"> | |
| 176 | + <button class="btn btn-default verify-email" data-loading-text="{% trans 'Sending verification...' %}"><span class="icon-warning-sign"></span> {% trans "Verify" %}</button> | |
| 177 | + <button class="btn btn-danger delete-email">{% trans "Delete" %}</button> | |
| 178 | + </div> | |
| 179 | + <hr /> | |
| 180 | + </li> | |
| 181 | + {% endfor %} | |
| 182 | + </ul> | |
| 183 | + <div class="form-group"> | |
| 184 | + <label for="new_email">{% trans "Add another email address:" %}</label> | |
| 185 | + <input id="new_email" name="new_email" class="form-control" autocomplete="off" /> | |
| 227 | 186 | </div> |
| 187 | + <button class="btn btn-primary pull-right" id="add-email">{% trans "Add" %}</button> | |
| 228 | 188 | </div> |
| 229 | 189 | </div> |
| 230 | - <div class="row"> | |
| 231 | - <div class="col-md-12"> | |
| 232 | - <div class="links-group"> | |
| 233 | - <button type="submit" class="btn btn-primary btn-lg" expanded="false">{% trans "Update" %}</button> | |
| 234 | - <a href="{% url 'user_profile' user %}" class="btn btn-default btn-lg" role="button">{% trans "Go to profile panel" %}</a> | |
| 235 | - </div> | |
| 190 | + </div> | |
| 191 | + <div class="col-lg-4 col-md-5 col-sm-12 col-xm-12"> | |
| 192 | + <div class="panel panel-default"> | |
| 193 | + <div class="panel-heading"> | |
| 194 | + <h3 class="panel-title"> | |
| 195 | + {% trans 'Change Password' %} | |
| 196 | + </h3> | |
| 197 | + </div> | |
| 198 | + <div class="panel-body"> | |
| 199 | + <a href="{% url 'password_change' %}" class="btn btn-default btn-primary pull-right btn-block">{% trans "Change Password" %}</a> | |
| 236 | 200 | </div> |
| 237 | 201 | </div> |
| 238 | - </form> | |
| 202 | + </div> | |
| 239 | 203 | </div> |
| 240 | - {% for widget in widgets_profile %} | |
| 241 | - <div id="{{ widget.identifier }}" class="tab-pane fade"> | |
| 242 | - <h2>{{ widget.name }}</h2> | |
| 243 | - {{ widget.get_body }} | |
| 204 | + <div class="row"> | |
| 205 | + <div class="col-md-12"> | |
| 206 | + <div class="links-group"> | |
| 207 | + <button type="submit" class="btn btn-primary btn-lg" expanded="false">{% trans "Update" %}</button> | |
| 208 | + <a href="{% url 'user_profile' user %}" class="btn btn-default btn-lg" role="button">{% trans "Go to profile panel" %}</a> | |
| 209 | + </div> | |
| 244 | 210 | </div> |
| 245 | - {% endfor %} | |
| 246 | - </div> | |
| 211 | + </div> | |
| 212 | + </form> | |
| 247 | 213 | |
| 248 | 214 | {% endblock %} | ... | ... |