Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

fixes

...

on

...

formbuilder_required_marker

...

to

...

change

...

to

...

be

...

more

...

tidy

...

on

...

form

...

i

...

guess...

.

Code Block
titleformbuilder.core.js


.


on formbuilder.core.js
function formbuilder_widgets_switch_required(row_id){
    $.each($(row_id + ' input\[@type\!="hidden"\] , ' + row_id + ' textarea, ' + row_id + ' select'), function(k, v){
        $(v).toggleClass('{required:true}');
    });
    if($(row_id + ' .formbuilder_required_marker').length){
        $(row_id + ' .formbuilder_required_marker').remove();
        //flash_message(gettext('msg_not_required'), 1);
    } else {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(row_id + ' .label').after('<span>*</span><br>');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<< *change*
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //flash_message(gettext('msg_is_required'), 1);
&nbsp;&nbsp;&nbsp; }
};

function formbuilder_draw_widget_area(div){
&nbsp;&nbsp;&nbsp;    $(div).append('<div id="formbuilder_widgets_area" style="display:none"><h2>><h2 class="formbuilder_editable formbuilder_title">' + gettext('formtitle') + ' ' + gettext('clic_to_edit') + '</h2><div id="formbuilder_rows"></div>');
&nbsp;&nbsp;&nbsp;    $('#formbuilder_widgets_area').fadeIn('slow');
&nbsp;&nbsp;&nbsp;    $('#formbuilder_widgets_area').append('<p><span><p class="formbuilder_required"><span class="formbuilder_required_marker">*</span> <br> ' + gettext('required_lab') + '<input type="hidden" id="counter_rows" value="0" />' + '<input type="hidden" id="counter_fieldset" value="0" /></p>');&nbsp;&nbsp;&nbsp; <<< *change*
&nbsp;&nbsp;&nbsp;
    formbuilder_widget_fieldset();
&nbsp;&nbsp;&nbsp;    set_editable();
};


on formbuilder.css

div#_ex_formbuilder_rows .formbuilder_label p {
&nbsp;&nbsp;&nbsp; margin: 0;
&nbsp;&nbsp;&nbsp; margin-bottom: 0px;
&nbsp;&nbsp; &nbsp;display:inline; <<< *change*
}

function formbuilder_widgets_switch_required(row_id){
    $.each($(row_id + ' input[@type!="hidden"] , ' + row_id + ' textarea, ' + row_id + ' select'), function(k, v){
        $(v).toggleClass('{required:true}');
    });
    if($(row_id + ' .formbuilder_required_marker').length){
        $(row_id + ' .formbuilder_required_marker').remove();
        //flash_message(gettext('msg_not_required'), 1);
    } else {
        $(row_id + ' .label').after('<span class="formbuilder_required_marker">*</span><br>');
        //flash_message(gettext('msg_is_required'), 1);
    }
};
Code Block
titleformbuilder.css
.formbuilder_required_marker {
  <<< *change*
&nbsp;&nbsp;&nbsp; color: red;
&nbsp;&nbsp;&nbsp;    font-weight: bold;
&nbsp;&nbsp;&nbsp;    font-size: 100%;
&nbsp;&nbsp;&nbsp;    position: inherit;
}

.formbuilder_required .formbuilder_required_marker {
  <<< *change*
&nbsp;&nbsp;&nbsp; position: inherit;
&nbsp;&nbsp;&nbsp;    left: 0px;
&nbsp;&nbsp;&nbsp; top: 0px    top: 0px;
}

div#_ex_formbuilder_rows .formbuilder_label p {
    margin: 0;
    margin-bottom: 0px;
	display:inline;
}