Changeset - 9416269860c9
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-08-06 02:49:53
marcin@python-works.com
little css update, and flash messages
2 files changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/admin/settings.py
Show inline comments
 
@@ -166,25 +166,25 @@ class SettingsController(BaseController)
 
                    .filter(HgAppUi.ui_key == 'changegroup.repo_size').one()
 
                    hgsettings4.ui_active = bool(form_result['hooks_changegroup_repo_size'])                                          
 
                    
 
                    
 
                    
 
                    
 
                    self.sa.add(hgsettings1)
 
                    self.sa.add(hgsettings2)
 
                    self.sa.add(hgsettings3)
 
                    self.sa.add(hgsettings4)
 
                    self.sa.commit()
 
                    
 
                    h.flash(_('Updated application settings'),
 
                    h.flash(_('Updated mercurial settings'),
 
                            category='success')
 
                                    
 
                except:
 
                    log.error(traceback.format_exc())
 
                    h.flash(_('error occured during updating application settings'),
 
                            category='error')
 
                                
 
                    self.sa.rollback()
 
                    
 

	
 
            except formencode.Invalid as errors:
 
                return htmlfill.render(
 
@@ -244,25 +244,26 @@ class SettingsController(BaseController)
 
        #    <input type="hidden" name="_method" value="PUT" />
 
        # Or using helpers:
 
        #    h.form(url('admin_settings_my_account_update'),
 
        #           method='put')
 
        # url('admin_settings_my_account_update', id=ID)
 
        user_model = UserModel()
 
        uid = c.hg_app_user.user_id
 
        _form = UserForm(edit=True, old_data={'user_id':uid})()
 
        form_result = {}
 
        try:
 
            form_result = _form.to_python(dict(request.POST))
 
            user_model.update_my_account(uid, form_result)
 
            h.flash(_('Your account was updated succesfully'), category='success')
 
            h.flash(_('Your account was updated succesfully'),
 
                    category='success')
 
                           
 
        except formencode.Invalid as errors:
 
            #c.user = self.sa.query(User).get(c.hg_app_user.user_id)
 
            return htmlfill.render(
 
                render('admin/users/user_edit_my_account.html'),
 
                defaults=errors.value,
 
                errors=errors.error_dict or {},
 
                prefix_error=False,
 
                encoding="UTF-8")
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('error occured during update of user %s') \
pylons_app/public/css/style.css
Show inline comments
 
@@ -1243,49 +1243,49 @@ div.options a:hover
 
#content div.box-left div.form div.fields div.field div.label-select,
 
#content div.box-right div.form div.fields div.field div.label-select
 
{
 
	padding: 0 0 8px 0;
 
}
 
 
/* -----------------------------------------------------------
 
	content -> right -> forms -> label (checkbox)
 
----------------------------------------------------------- */
 
 
#content div.box div.form div.fields div.field div.label-checkbox
 
{
 
	padding: 0 0 0 5px;
 
	padding:0 0 0 5px !important;
 
}
 
 
/* -----------------------------------------------------------
 
	content -> right -> forms -> label (radio)
 
----------------------------------------------------------- */
 
 
#content div.box div.form div.fields div.field div.label-radio
 
{
 
	padding: 0 0 0 5px;
 
	padding:0 0 0 5px !important;
 
}
 
 
/* -----------------------------------------------------------
 
	content -> right -> forms -> label (textarea)
 
----------------------------------------------------------- */
 
 
#content div.box div.form div.fields div.field div.label-textarea
 
{
 
	padding: 0 0 0 5px;
 
	padding:0 0 0 5px !important;
 
}
 
 
#content div.box-left div.form div.fields div.field div.label-textarea,
 
#content div.box-right div.form div.fields div.field div.label-textarea
 
{
 
	padding: 0 0 8px 0;
 
	padding: 0 0 8px 0 !important;
 
}
 
 
/* -----------------------------------------------------------
 
	content -> right -> forms -> labels (label)
 
----------------------------------------------------------- */
 
 
#content div.box div.form div.fields div.field div.label label
 
{
 
    color: #393939;
 
    font-weight: bold;
 
}
 
0 comments (0 inline, 0 general)