I would like do remove the ability to edit the last_login_at from the
user form, as its not something you should edit. (I want to display
it, but just not edit it).
Is there a way to make this not editable in the form? (something at
the model level?)
There is an existing user form in forms.dryml
<def tag="form" for="User">
<form merge param="default">
<error-messages param/>
<field-list fields="first_name, last_name, company_name, title,
last_login_at, company_phone_number, email_address, role, state,
organization" param/>
<div param="actions">
<submit label="#{ht 'user.actions.save', :default=>['Save']}"
param/><or-cancel param="cancel"/>
</div>
</form>
</def>
In general I try not to completely override the defaults, I just merge
in my changes, so that if I add new columns, they will automatically
show up where they should.
I would like to do something like this in my application.dryml
<extend tag="form" for="User">
<old-form merge>
<field-list merge skip="last_login_at" />
</old-form>
</extend>
This kind of works, in that it hides the last_login_at (if I could
display it as non-editable that would be the best), but it also loses
the error-messages and submit buttons section.
How do I replace just parts of a defined tag, but not those elements
around it?
I feel like if I understand how to do this, it will go a long way in
helping me master Hobo. (I have wasted a lot of time screwing around
with dryml stuff so far)
Thanks for your help!
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.