_macro.html 1.3 KB

123456789101112131415161718192021222324252627282930
  1. {% import 'base/link.html' as link %}
  2. {% macro title(type) -%}
  3. <div class="list-group">
  4. <a href="{{ url_for('setting.setting')}}" class="list-group-item {% if type =='setting' %}active{% endif %}"> {{ _('Profile ') }}</a>
  5. <a href="{{ url_for('setting.password')}}" class="list-group-item {% if type =='password' %}active{% endif %}">{{_('Password ')}}</a>
  6. <a href="{{ url_for('setting.privacy')}}" class="list-group-item {% if type =='privacy' %}active{% endif %}">{{_('Privacy ')}}</a>
  7. <a href="{{ url_for('setting.babel')}}" class="list-group-item {% if type =='babel' %}active{% endif %}">{{_('Timezone and Locale')}}</a>
  8. </div>
  9. {%- endmacro %}
  10. {% macro avatar(form) -%}
  11. {{ form.hidden_tag() }}
  12. <div class="form-horizontal">
  13. <div class="form-group">
  14. <label class="col-sm-2 control-label">{{ form.avatar.label }}</label>
  15. <div class="col-sm-10">
  16. <span>
  17. {{ link.user_avatar(g.user,100) }}
  18. </span>
  19. <span id="show-avatar"></span>
  20. {{ form.avatar(class="form-control",onchange="loadFile(event)")}}
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <div class="col-sm-offset-2 col-sm-10">
  25. <button type="submit" class="btn btn-default btn-sm">{{_('confirm upload')}}</button>
  26. </div>
  27. </div>
  28. </div>
  29. {%- endmacro %}