You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daxter edited this page May 23, 2012
·
2 revisions
Submit & Cancel Buttons
In order to have Active Admin-style submit & cancel buttons, a hacky approach is unfortunately necessary because the usual f.actions is a special function defined in Active Admin, and is not accessible from your partial.
However there is hope! If you want to have a consistent look on your forms, you can easily trick the browser into using Active Admin's styling rules:
<%= a.actions do %><%= a.action :submit %><liclass="cancel"><%=link_to"Cancel",post%></li><%end%>
Note - you can change the 'cancel' link to go anywhere you want. In the above, it redirects to the Post index page. Be sure to change post to the name of your model!
##Datepicker
If, for some reason or another, you had to use a form partial, and you want to add a datepicker, you have to go about it a little differently, as :as => :datepicker won't work. Instead, do this (HAML style):