function arrange_fields_render_dialogs in Arrange Fields 7
Same name and namespace in other branches
- 6 arrange_fields.module \arrange_fields_render_dialogs()
Renders the divs which will be used as the jquery dialogs, displayed using jQuery's .dialog() function.
One will let the administrator manage details of a field, like width and height of the wrapper.
The other will let users add or edit bits of arbitrary markup on the form.
3 calls to arrange_fields_render_dialogs()
- arrange_fields_display_form in ./
arrange_fields.module - This function will display a form and let us arrange its fields. It is designed to work with Drupal's content types (not Webform or programmer-designed forms).
- arrange_fields_display_otherform in ./
arrange_fields.module - Similar function as arrange_fields_display_form, but this is specifically for other, more generic forms on the system. For example, user_register, or custom forms which a developer has written.
- arrange_fields_display_webform in ./
arrange_fields.module - Similar function as arrange_fields_display_form, but this is specifically for webforms (with the webform module).
File
- ./
arrange_fields.module, line 795
Code
function arrange_fields_render_dialogs() {
$rtn = "";
$rtn .= "<div id='arrange-fields-config-dialog' title='Configure'> \n <table>\n <tr>\n <td width='45%'>Wrapper width:</td><td><input type='input' name='af-dialog-width' size='6'></td>\n </tr>\n <tr> \n <td>Wrapper height:</td><td><input type='input' name='af-dialog-height' size='6'></td>\n </tr>\n </table>\n <div style='font-size: 0.8em; line-height: 1.0em;'>(remember to specify px, %, etc. Leave blank for default.)</div>\n \n <div id='arrange-fields-config-dialog-labels'>\n Label: \n <label><input type='radio' name='af-dialog-label-display' value='' checked> default (block)</label>\n <label><input type='radio' name='af-dialog-label-display' value='inline-block' > inline</label>\n </div>\n </div>";
$rtn .= "<div id='arrange-fields-markup-dialog' title='Markup'>\n <div><b>Body:</b></div>\n <textarea name='af-markup-body' class='af-markup-body'></textarea>\n <div style='font-size: 0.8em; line-height: 1.0em;'>\n You may enter any valid HTML here.</div>\n \n <div style='padding-top: 10px;'><b>Wrapper style</b>='\n <input name='af-wrapper-style' class='af-wrapper-style'>\n '\n <div style='font-size: 0.8em; line-height: 1.0em;'>\n Enter style definitions. Ex: background-color: black;\n </div>\n </div>\n \n <div style='padding-top: 10px;'><b>Z-index</b>:\n <label><input type='radio' name='af-markup-z-index' value='201' checked> foreground (default)</label>\n <label><input type='radio' name='af-markup-z-index' value='75' > background</label>\n \n </div>\n\n \n <div class='af-delete-button'>\n <button type='button' onClick='arrangeFieldsDialogMarkupDelete();'>Delete</button>\n </div>\n </div>";
return $rtn;
}