Displaying 11 results from an estimated 11 matches for "input_html".
2012 Feb 26
0
how to get the index of the element passed to the render view ?
...less @project.expenses.count > 0
No expenses
- else
#expenses
= f.fields_for :expenses do |f|
= render "backoffice/projects/expense_fields", :f => f
.clearfix
and the expense_fields partial is :
.row
= f.input :label, :wrapper => :nolabel, :input_html => { :class =>
"span3" }
I would like to test when the first expense item is displayed :
.row
- "if first expense.. test
= f.input :label, :input_html => { :class => "span3" }
# use the standard wrapper with labels
- else
=...
2011 Jul 25
1
3 models in a form.
...create a new delivery for customer x:
= simple_form_for @customer do |f|
= f.simple_fields_for :deliveries do |deliveries_f|
.block
.column.span-12
= deliveries_f.association :products, :multiple => true,
:selected => @products_selected_id,
:input_html => { :title => "-
Select product -" }, :label => false
= deliveries_f.input :notes
DeliveryItem has the extra attribute quantity.
In this form I have to set a quantity DeliveryItem attribute so that I
create a Delivery for customer x, associate one or more Product and
fo...
2014 Mar 14
0
AngularJS options with a simple_form checkbox
Hi guys,
How does one assign ng-model to a checkbox in simple_form? I have tried
adding it like this:
=f.input :super_admin , label: false, checked_value: true, unchecked_value:
false, as: :boolean,:input_html=>{"ng-model"=>"superadmincbx"}
but my ng-hide does not work.
%span{"ng-hide"=>"superadmincbx"}
I'm also using the Batarang and checking/unchecking the checkbox does not
trigger the corresponding changes in the scoped item. However, in my...
2012 Jan 06
1
How to pass a field from simple_form as a hidden div value
...ndering if anyone could help me with
this. Here is my view using simple_form
<%= f.label "First name" %>
<%= f.text_field :first_name %>
<%= f.label "Last name" %>
<%= f.text_field :last_name %>
<%= f.input :full_name, :as => :hidden, :input_html => { :value =>
[:first_name, :last_name].join('' '') } %>
<%= f.submit %>
If ive already got the first and last name from the input fields how can
i pass those values to the hidden div? This code above isnt working.
Thanks
--
Posted via http://www.ruby-forum.com...
2012 Jun 01
0
How to set the default value on a simple_form association
Folks
Im using simple_form and im able to see a selection of users from my
drop
down list but im trying to set the default value. Here is what ive tried
<%= f.association :people, :input_html => { :value => ''someval'' } %>
i want someval to be set in the selection by default. Any help would be
appreciated.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr...
2007 Nov 01
0
libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
...gt;format_new));
block->format = swfdec_text_format_copy (text->format_new);
+ if (block->format == NULL) {
+ g_free (block);
+ text->input = g_string_truncate (text->input, 0);
+ return;
+ }
text->formats = g_slist_prepend (text->formats, block);
text->input_html = html;
diff --git a/libswfdec/swfdec_text_field_movie_html.c b/libswfdec/swfdec_text_field_movie_html.c
index ef22415..ba60530 100644
--- a/libswfdec/swfdec_text_field_movie_html.c
+++ b/libswfdec/swfdec_text_field_movie_html.c
@@ -352,19 +352,23 @@ swfdec_text_field_movie_html_parse_tag (ParserDa...
2012 Jan 07
2
set a default value with simple_form
hello
anyone know how i can set a default integer value with simple_form, i
have code like this below in my view but its not working.
<%= f.input :age, :value => ''30'' %>
i would like the input box to have the value of 30 by default
thanks for any help.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...@@ swfdec_text_field_movie_html_text_append_paragraph (SwfdecTextFieldMovie *text,
}
const char *
+swfdec_text_field_movie_get_text (SwfdecTextFieldMovie *text)
+{
+ char *str, *p;
+
+ str = g_strdup (text->input->str);
+
+ // if input was orginally html, remove all \r
+ if (text->input_html) {
+ p = str;
+ while ((p = strchr (p, '\r')) != NULL) {
+ memmove (p, p + 1, strlen (p));
+ }
+ }
+
+ // change all \n to \r
+ p = str;
+ while ((p = strchr (p, '\n')) != NULL) {
+ *p = '\r';
+ }
+
+ return swfdec_as_context_give_string (SWFDEC_AS_OBJ...
2007 Oct 23
0
9 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h
...ext->input,
g_utf8_offset_to_pointer (text->input->str, start_index) -
text->input->str,
@@ -1631,10 +1638,17 @@ swfdec_text_field_movie_set_text (SwfdecTextFieldMovie *text, const char *str,
text->formats = g_slist_prepend (text->formats, block);
text->input_html = html;
- if (html) {
+
+ if (text->style_sheet) {
+ text->style_sheet_input = str;
swfdec_text_field_movie_html_parse (text, str);
} else {
- text->input = g_string_assign (text->input, str);
+ text->style_sheet_input = NULL;
+ if (html) {
+ swfdec_text_fi...
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
.../swfdec_text_field_movie.h
@@ -79,6 +79,8 @@ struct _SwfdecTextFieldMovie {
SwfdecTextField * text; /* the text_field object we render */
GString * input;
+ char * asterisks; /* bunch of asterisks that we display when password mode is enabled */
+ guint asterisks_length;
gboolean input_html; /* whether orginal input was given as HTML */
const char * variable;
diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index a58ceef..c7aa845 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -804,6...
2007 Oct 23
0
11 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h
...fdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index fd55ef5..516e270 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -1647,10 +1647,14 @@ swfdec_text_field_movie_set_text (SwfdecTextFieldMovie *text, const char *str,
text->input_html = html;
- if (text->style_sheet != NULL) {
+ if (SWFDEC_AS_OBJECT (text)->context->version >= 7 &&
+ text->style_sheet != NULL)
+ {
text->style_sheet_input = str;
swfdec_text_field_movie_html_parse (text, str);
- } else {
+ }
+ else
+ {
text-&g...