Ok so to start off simple. I took the form call i used earlier and popped it
in. Here is the complete code
<hjq-dialog-open-button dialog="#new-bill-dialog#{this.id}"
class="ui-button">New Bill</hjq-dialog-open-button>
<hjq-dialog id="new-bill-dialog#{this.id}" position="center" minWidth="400"
buttons='&[["cancel", "hjq.dialog.close"], ["ok",
"hjq.dialog.submit_form"]]'>
<form with="&@bill || new_for_current_user(this.bills)" owner="case"
without-cancel without-submit update="cases" reset-form
success="jQuery('#new-bill-dialog#{this.id}').dialog('close')">
<field-list: skip="case, total">
<rate-view:>
<% dialog_id="hjq-dialog-#{typed_id.gsub(':', '-')}" %>
<% part_id = "select-one-#{typed_id.gsub(':', '-')}" %>
<input part="select-one-or-new-dialog-select"
id="&part_id"/>
<hjq-dialog-open-button dialog="##{dialog_id}"> New <%
this_field.humanize %> </hjq-dialog-open-button>
<hjq-dialog buttons='&[["cancel", "hjq.dialog.close"],
["ok", "hjq.dialog.submit_formlet_and_close"]]' title="New
#{this_field.humanize}" id="&dialog_id" >
<formlet with="&@rate ||
new_for_current_user(@user.rates)" owner="user" update="&part_id"
success="jQuery('##{part_id} select').val(jQuery('##{part_id}
option:last').val())">
<field-list: skip="user, client"/>
</formlet>
</hjq-dialog>
</rate-view:>
</field-list:>
</form>
</hjq-dialog>
When I run this now, I get the following error.
undefined method `view_name' for #<#<Class:0x656ff10>:0x656db58>
Extracted source (around line #34):
31: <input part="select-one-or-new-dialog-select" id="&part_id"/>
32: <hjq-dialog-open-button dialog="##{dialog_id}"> New <%
this_field.humanize %> </hjq-dialog-open-button>
33: <hjq-dialog buttons='&[["cancel", "hjq.dialog.close"], ["ok",
"hjq.dialog.submit_formlet_and_close"]]' title="New #{this_field.humanize}"
id="&dialog_id" >
34: <formlet with="&@rate || new_for_current_user(@user.rates)"
owner="user" update="&part_id" success="jQuery('##{part_id}
select').val(jQuery('##{part_id} option:last').val())">
35: <field-list: skip="user, client"/>
36: </formlet>
37: </hjq-dialog>
On Thu, Apr 14, 2011 at 10:14 AM, Bryan Larsen <[email protected]>wrote:
> Don't try and modify select-or-new-dialog, copy the contents into your page
> and remove the "param" attributes, that's simpler -- you can be specific
> rather than trying to have a single tag that works everywhere. You can
> just replace the formlet call with a form that works elsewhere.
>
> Then copy & paste the resulting code into an email and we'll try and help.
>
> Bryan
>
>
>
>
> On 11-04-14 11:07 AM, Matt Frost wrote:
>
>> I think the problem may be that all of my forms are all auto_actions_for
>> and not the normal actions. In the example earlier there I have select
>> or new dialog on rate. The rate form, and all of the rest of the things
>> that I need this function on are all called like this:
>>
>> <form with="&@rate || new_for_current_user(@user.rates)" owner="user"
>> without-cancel update="rates" reset-form>
>> <field-list: skip="user, client"/>
>> <submit: label="#{ht 'rate.actions.add', :default=>['Add'] }"/>
>> </form>
>>
>>
>> There may be a better or easier way to call the forms, I am just not
>> that familiar enough with it yet. I tried to modify the part in the
>> hoo-jquery dryml that sets up the form, but I can not seem to get the
>> syntax right.
>>
>> On Thu, Apr 14, 2011 at 9:26 AM, Matt Frost <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Awesome! Now it will run, I get a nice little new button next to my
>> select box. The dialog opens when I click new, but it doesnt have a
>> form inside.
>>
>>
>> On Thu, Apr 14, 2011 at 7:21 AM, Bryan Larsen
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> Domizio changed that to Hobo::Rapid::Helper in 1.3
>>
>> Bryan
>>
>>
>> On 11-04-13 10:46 PM, Matt Frost wrote:
>>
>> Making progress. Now I get
>>
>> uninitialized constant Hobo::RapidHelper
>>
>> which would be the next line in the hobo-jquery.dryml
>>
>>
>>
>> On Wed, Apr 13, 2011 at 8:45 PM, Bryan Larsen
>> <[email protected] <mailto:[email protected]>
>> <mailto:[email protected]
>> <mailto:[email protected]>>> wrote:
>>
>> I guess nobody's tried formlet with Hobo 1.3 yet.
>>
>> try replacing this:
>>
>> # be compatible with both Hobo 1.0 and 1.1
>> dryml = Hobo.const_defined?(:Dryml) ? Hobo::Dryml : Dryml
>>
>> with
>>
>> # be compatible with both Hobo 1.0 and 1.1 and 1.3
>> dryml = defined?(Hobo::Dryml) ? Hobo::Dryml : Dryml
>>
>> Bryan
>>
>>
>> On 11-04-13 09:03 PM, Matt Frost wrote:
>>
>> Here is the full trace:
>>
>>
>> vendor/plugins/hobo-jquery/taglibs/hobo-jquery.dryml:286:in
>> `block in
>> formlet__base'
>>
>>
>> --
>> 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] <mailto:[email protected]>
>> <mailto:[email protected]
>>
>> <mailto:[email protected]>>.
>>
>> To unsubscribe from this group, send email to
>> [email protected]
>> <mailto:hobousers%[email protected]>
>> <mailto:hobousers%[email protected]
>> <mailto:hobousers%[email protected]>>.
>>
>>
>> For more options, visit this group at
>> http://groups.google.com/group/hobousers?hl=en.
>>
>>
>> --
>>
>> 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] <mailto:[email protected]
>> >.
>>
>> To unsubscribe from this group, send email to
>> [email protected]
>> <mailto:hobousers%[email protected]>.
>> For more options, visit this group at
>> http://groups.google.com/group/hobousers?hl=en.
>>
>>
>> --
>> 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]
>> <mailto:[email protected]>.
>> To unsubscribe from this group, send email to
>> [email protected]
>> <mailto:hobousers%[email protected]>.
>> For more options, visit this group at
>> http://groups.google.com/group/hobousers?hl=en.
>>
>>
>>
>> --
>> 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.
>>
>
> --
> 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.
>
>
--
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.