@@ -1,207 +1,207 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | 2 | |
| 3 | - // Markup |
|
| 4 | - //////////////////////////////////////////////////////////////////// |
|
| 5 | - |
|
| 6 | - // Whether labels should be automatically computed from name |
|
| 7 | - 'automatic_label' => true, |
|
| 8 | - |
|
| 9 | - // The default form type |
|
| 10 | - 'default_form_type' => 'horizontal', |
|
| 11 | - |
|
| 12 | - // Validation |
|
| 13 | - //////////////////////////////////////////////////////////////////// |
|
| 14 | - |
|
| 15 | - // Whether Former should fetch errors from Session |
|
| 16 | - 'fetch_errors' => true, |
|
| 17 | - |
|
| 18 | - // Whether Former should try to apply Validator rules as attributes |
|
| 19 | - 'live_validation' => true, |
|
| 20 | - |
|
| 21 | - // Whether Former should automatically fetch error messages and |
|
| 22 | - // display them next to the matching fields |
|
| 23 | - 'error_messages' => true, |
|
| 24 | - |
|
| 25 | - // Checkables |
|
| 26 | - //////////////////////////////////////////////////////////////////// |
|
| 27 | - |
|
| 28 | - // Whether checkboxes should always be present in the POST data, |
|
| 29 | - // no matter if you checked them or not |
|
| 30 | - 'push_checkboxes' => false, |
|
| 31 | - |
|
| 32 | - // The value a checkbox will have in the POST array if unchecked |
|
| 33 | - 'unchecked_value' => 0, |
|
| 34 | - |
|
| 35 | - // Required fields |
|
| 36 | - //////////////////////////////////////////////////////////////////// |
|
| 37 | - |
|
| 38 | - // The class to be added to required fields |
|
| 39 | - 'required_class' => 'required', |
|
| 40 | - |
|
| 41 | - // A facultative text to append to the labels of required fields |
|
| 42 | - 'required_text' => '<sup>*</sup>', |
|
| 43 | - |
|
| 44 | - // Translations |
|
| 45 | - //////////////////////////////////////////////////////////////////// |
|
| 46 | - |
|
| 47 | - // Where Former should look for translations |
|
| 48 | - 'translate_from' => 'validation.attributes', |
|
| 49 | - |
|
| 50 | - // Whether text that comes out of the translated |
|
| 51 | - // should be capitalized (ex: email => Email) automatically |
|
| 52 | - 'capitalize_translations' => true, |
|
| 53 | - |
|
| 54 | - // An array of attributes to automatically translate |
|
| 55 | - 'translatable' => array( |
|
| 56 | - 'help', |
|
| 57 | - 'inlineHelp', |
|
| 58 | - 'blockHelp', |
|
| 59 | - 'placeholder', |
|
| 60 | - 'data_placeholder', |
|
| 61 | - 'label', |
|
| 62 | - ), |
|
| 63 | - |
|
| 64 | - // Framework |
|
| 65 | - //////////////////////////////////////////////////////////////////// |
|
| 66 | - |
|
| 67 | - // The framework to be used by Former |
|
| 68 | - 'framework' => 'TwitterBootstrap3', |
|
| 69 | - |
|
| 70 | - 'TwitterBootstrap4' => array( |
|
| 71 | - |
|
| 72 | - // Map Former-supported viewports to Bootstrap 4 equivalents |
|
| 73 | - 'viewports' => array( |
|
| 74 | - 'large' => 'lg', |
|
| 75 | - 'medium' => 'md', |
|
| 76 | - 'small' => 'sm', |
|
| 77 | - 'mini' => 'xs', |
|
| 78 | - ), |
|
| 79 | - // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 80 | - 'labelWidths' => array( |
|
| 81 | - 'large' => 2, |
|
| 82 | - 'small' => 4, |
|
| 83 | - ), |
|
| 84 | - // HTML markup and classes used by Bootstrap 5 for icons |
|
| 85 | - 'icon' => array( |
|
| 86 | - 'tag' => 'i', |
|
| 87 | - 'set' => 'fa', |
|
| 88 | - 'prefix' => 'fa', |
|
| 89 | - ), |
|
| 90 | - |
|
| 91 | - ), |
|
| 92 | - |
|
| 93 | - 'TwitterBootstrap3' => array( |
|
| 94 | - |
|
| 95 | - // Map Former-supported viewports to Bootstrap 3 equivalents |
|
| 96 | - 'viewports' => array( |
|
| 97 | - 'large' => 'lg', |
|
| 98 | - 'medium' => 'md', |
|
| 99 | - 'small' => 'sm', |
|
| 100 | - 'mini' => 'xs', |
|
| 101 | - ), |
|
| 102 | - // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 103 | - 'labelWidths' => array( |
|
| 104 | - 'large' => 2, |
|
| 105 | - 'small' => 4, |
|
| 106 | - ), |
|
| 107 | - // HTML markup and classes used by Bootstrap 3 for icons |
|
| 108 | - 'icon' => array( |
|
| 109 | - 'tag' => 'span', |
|
| 110 | - 'set' => 'glyphicon', |
|
| 111 | - 'prefix' => 'glyphicon', |
|
| 112 | - ), |
|
| 113 | - |
|
| 114 | - ), |
|
| 115 | - |
|
| 116 | - 'Nude' => array( // No-framework markup |
|
| 117 | - 'icon' => array( |
|
| 118 | - 'tag' => 'i', |
|
| 119 | - 'set' => null, |
|
| 120 | - 'prefix' => 'icon', |
|
| 121 | - ), |
|
| 122 | - ), |
|
| 123 | - |
|
| 124 | - 'TwitterBootstrap' => array( // Twitter Bootstrap version 2 |
|
| 125 | - 'icon' => array( |
|
| 126 | - 'tag' => 'i', |
|
| 127 | - 'set' => null, |
|
| 128 | - 'prefix' => 'icon', |
|
| 129 | - ), |
|
| 130 | - ), |
|
| 131 | - |
|
| 132 | - 'ZurbFoundation5' => array( |
|
| 133 | - // Map Former-supported viewports to Foundation 5 equivalents |
|
| 134 | - 'viewports' => array( |
|
| 135 | - 'large' => 'large', |
|
| 136 | - 'medium' => null, |
|
| 137 | - 'small' => 'small', |
|
| 138 | - 'mini' => null, |
|
| 139 | - ), |
|
| 140 | - // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 141 | - 'labelWidths' => array( |
|
| 142 | - 'small' => 3, |
|
| 143 | - ), |
|
| 144 | - // Classes to be applied to wrapped labels in horizontal forms |
|
| 145 | - 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 146 | - // HTML markup and classes used by Foundation 5 for icons |
|
| 147 | - 'icon' => array( |
|
| 148 | - 'tag' => 'i', |
|
| 149 | - 'set' => null, |
|
| 150 | - 'prefix' => 'fi', |
|
| 151 | - ), |
|
| 152 | - // CSS for inline validation errors |
|
| 153 | - 'error_classes' => array('class' => 'error'), |
|
| 154 | - ), |
|
| 155 | - |
|
| 156 | - 'ZurbFoundation4' => array( |
|
| 157 | - // Foundation 4 also has an experimental "medium" breakpoint |
|
| 158 | - // explained at http://foundation.zurb.com/docs/components/grid.html |
|
| 159 | - 'viewports' => array( |
|
| 160 | - 'large' => 'large', |
|
| 161 | - 'medium' => null, |
|
| 162 | - 'small' => 'small', |
|
| 163 | - 'mini' => null, |
|
| 164 | - ), |
|
| 165 | - // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 166 | - 'labelWidths' => array( |
|
| 167 | - 'small' => 3, |
|
| 168 | - ), |
|
| 169 | - // Classes to be applied to wrapped labels in horizontal forms |
|
| 170 | - 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 171 | - // HTML markup and classes used by Foundation 4 for icons |
|
| 172 | - 'icon' => array( |
|
| 173 | - 'tag' => 'i', |
|
| 174 | - 'set' => 'general', |
|
| 175 | - 'prefix' => 'foundicon', |
|
| 176 | - ), |
|
| 177 | - // CSS for inline validation errors |
|
| 178 | - 'error_classes' => array('class' => 'alert-box radius warning'), |
|
| 179 | - ), |
|
| 180 | - |
|
| 181 | - 'ZurbFoundation' => array( // Foundation 3 |
|
| 182 | - 'viewports' => array( |
|
| 183 | - 'large' => '', |
|
| 184 | - 'medium' => null, |
|
| 185 | - 'small' => 'mobile-', |
|
| 186 | - 'mini' => null, |
|
| 187 | - ), |
|
| 188 | - // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 189 | - 'labelWidths' => array( |
|
| 190 | - 'large' => 2, |
|
| 191 | - 'small' => 4, |
|
| 192 | - ), |
|
| 193 | - // Classes to be applied to wrapped labels in horizontal forms |
|
| 194 | - 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 195 | - // HTML markup and classes used by Foundation 3 for icons |
|
| 196 | - 'icon' => array( |
|
| 197 | - 'tag' => 'i', |
|
| 198 | - 'set' => null, |
|
| 199 | - 'prefix' => 'fi', |
|
| 200 | - ), |
|
| 201 | - // CSS for inline validation errors |
|
| 202 | - // should work for Zurb 2 and 3 |
|
| 203 | - 'error_classes' => array('class' => 'alert-box alert error'), |
|
| 204 | - ), |
|
| 3 | + // Markup |
|
| 4 | + //////////////////////////////////////////////////////////////////// |
|
| 5 | + |
|
| 6 | + // Whether labels should be automatically computed from name |
|
| 7 | + 'automatic_label' => true, |
|
| 8 | + |
|
| 9 | + // The default form type |
|
| 10 | + 'default_form_type' => 'horizontal', |
|
| 11 | + |
|
| 12 | + // Validation |
|
| 13 | + //////////////////////////////////////////////////////////////////// |
|
| 14 | + |
|
| 15 | + // Whether Former should fetch errors from Session |
|
| 16 | + 'fetch_errors' => true, |
|
| 17 | + |
|
| 18 | + // Whether Former should try to apply Validator rules as attributes |
|
| 19 | + 'live_validation' => true, |
|
| 20 | + |
|
| 21 | + // Whether Former should automatically fetch error messages and |
|
| 22 | + // display them next to the matching fields |
|
| 23 | + 'error_messages' => true, |
|
| 24 | + |
|
| 25 | + // Checkables |
|
| 26 | + //////////////////////////////////////////////////////////////////// |
|
| 27 | + |
|
| 28 | + // Whether checkboxes should always be present in the POST data, |
|
| 29 | + // no matter if you checked them or not |
|
| 30 | + 'push_checkboxes' => false, |
|
| 31 | + |
|
| 32 | + // The value a checkbox will have in the POST array if unchecked |
|
| 33 | + 'unchecked_value' => 0, |
|
| 34 | + |
|
| 35 | + // Required fields |
|
| 36 | + //////////////////////////////////////////////////////////////////// |
|
| 37 | + |
|
| 38 | + // The class to be added to required fields |
|
| 39 | + 'required_class' => 'required', |
|
| 40 | + |
|
| 41 | + // A facultative text to append to the labels of required fields |
|
| 42 | + 'required_text' => '<sup>*</sup>', |
|
| 43 | + |
|
| 44 | + // Translations |
|
| 45 | + //////////////////////////////////////////////////////////////////// |
|
| 46 | + |
|
| 47 | + // Where Former should look for translations |
|
| 48 | + 'translate_from' => 'validation.attributes', |
|
| 49 | + |
|
| 50 | + // Whether text that comes out of the translated |
|
| 51 | + // should be capitalized (ex: email => Email) automatically |
|
| 52 | + 'capitalize_translations' => true, |
|
| 53 | + |
|
| 54 | + // An array of attributes to automatically translate |
|
| 55 | + 'translatable' => array( |
|
| 56 | + 'help', |
|
| 57 | + 'inlineHelp', |
|
| 58 | + 'blockHelp', |
|
| 59 | + 'placeholder', |
|
| 60 | + 'data_placeholder', |
|
| 61 | + 'label', |
|
| 62 | + ), |
|
| 63 | + |
|
| 64 | + // Framework |
|
| 65 | + //////////////////////////////////////////////////////////////////// |
|
| 66 | + |
|
| 67 | + // The framework to be used by Former |
|
| 68 | + 'framework' => 'TwitterBootstrap3', |
|
| 69 | + |
|
| 70 | + 'TwitterBootstrap4' => array( |
|
| 71 | + |
|
| 72 | + // Map Former-supported viewports to Bootstrap 4 equivalents |
|
| 73 | + 'viewports' => array( |
|
| 74 | + 'large' => 'lg', |
|
| 75 | + 'medium' => 'md', |
|
| 76 | + 'small' => 'sm', |
|
| 77 | + 'mini' => 'xs', |
|
| 78 | + ), |
|
| 79 | + // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 80 | + 'labelWidths' => array( |
|
| 81 | + 'large' => 2, |
|
| 82 | + 'small' => 4, |
|
| 83 | + ), |
|
| 84 | + // HTML markup and classes used by Bootstrap 5 for icons |
|
| 85 | + 'icon' => array( |
|
| 86 | + 'tag' => 'i', |
|
| 87 | + 'set' => 'fa', |
|
| 88 | + 'prefix' => 'fa', |
|
| 89 | + ), |
|
| 90 | + |
|
| 91 | + ), |
|
| 92 | + |
|
| 93 | + 'TwitterBootstrap3' => array( |
|
| 94 | + |
|
| 95 | + // Map Former-supported viewports to Bootstrap 3 equivalents |
|
| 96 | + 'viewports' => array( |
|
| 97 | + 'large' => 'lg', |
|
| 98 | + 'medium' => 'md', |
|
| 99 | + 'small' => 'sm', |
|
| 100 | + 'mini' => 'xs', |
|
| 101 | + ), |
|
| 102 | + // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 103 | + 'labelWidths' => array( |
|
| 104 | + 'large' => 2, |
|
| 105 | + 'small' => 4, |
|
| 106 | + ), |
|
| 107 | + // HTML markup and classes used by Bootstrap 3 for icons |
|
| 108 | + 'icon' => array( |
|
| 109 | + 'tag' => 'span', |
|
| 110 | + 'set' => 'glyphicon', |
|
| 111 | + 'prefix' => 'glyphicon', |
|
| 112 | + ), |
|
| 113 | + |
|
| 114 | + ), |
|
| 115 | + |
|
| 116 | + 'Nude' => array( // No-framework markup |
|
| 117 | + 'icon' => array( |
|
| 118 | + 'tag' => 'i', |
|
| 119 | + 'set' => null, |
|
| 120 | + 'prefix' => 'icon', |
|
| 121 | + ), |
|
| 122 | + ), |
|
| 123 | + |
|
| 124 | + 'TwitterBootstrap' => array( // Twitter Bootstrap version 2 |
|
| 125 | + 'icon' => array( |
|
| 126 | + 'tag' => 'i', |
|
| 127 | + 'set' => null, |
|
| 128 | + 'prefix' => 'icon', |
|
| 129 | + ), |
|
| 130 | + ), |
|
| 131 | + |
|
| 132 | + 'ZurbFoundation5' => array( |
|
| 133 | + // Map Former-supported viewports to Foundation 5 equivalents |
|
| 134 | + 'viewports' => array( |
|
| 135 | + 'large' => 'large', |
|
| 136 | + 'medium' => null, |
|
| 137 | + 'small' => 'small', |
|
| 138 | + 'mini' => null, |
|
| 139 | + ), |
|
| 140 | + // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 141 | + 'labelWidths' => array( |
|
| 142 | + 'small' => 3, |
|
| 143 | + ), |
|
| 144 | + // Classes to be applied to wrapped labels in horizontal forms |
|
| 145 | + 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 146 | + // HTML markup and classes used by Foundation 5 for icons |
|
| 147 | + 'icon' => array( |
|
| 148 | + 'tag' => 'i', |
|
| 149 | + 'set' => null, |
|
| 150 | + 'prefix' => 'fi', |
|
| 151 | + ), |
|
| 152 | + // CSS for inline validation errors |
|
| 153 | + 'error_classes' => array('class' => 'error'), |
|
| 154 | + ), |
|
| 155 | + |
|
| 156 | + 'ZurbFoundation4' => array( |
|
| 157 | + // Foundation 4 also has an experimental "medium" breakpoint |
|
| 158 | + // explained at http://foundation.zurb.com/docs/components/grid.html |
|
| 159 | + 'viewports' => array( |
|
| 160 | + 'large' => 'large', |
|
| 161 | + 'medium' => null, |
|
| 162 | + 'small' => 'small', |
|
| 163 | + 'mini' => null, |
|
| 164 | + ), |
|
| 165 | + // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 166 | + 'labelWidths' => array( |
|
| 167 | + 'small' => 3, |
|
| 168 | + ), |
|
| 169 | + // Classes to be applied to wrapped labels in horizontal forms |
|
| 170 | + 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 171 | + // HTML markup and classes used by Foundation 4 for icons |
|
| 172 | + 'icon' => array( |
|
| 173 | + 'tag' => 'i', |
|
| 174 | + 'set' => 'general', |
|
| 175 | + 'prefix' => 'foundicon', |
|
| 176 | + ), |
|
| 177 | + // CSS for inline validation errors |
|
| 178 | + 'error_classes' => array('class' => 'alert-box radius warning'), |
|
| 179 | + ), |
|
| 180 | + |
|
| 181 | + 'ZurbFoundation' => array( // Foundation 3 |
|
| 182 | + 'viewports' => array( |
|
| 183 | + 'large' => '', |
|
| 184 | + 'medium' => null, |
|
| 185 | + 'small' => 'mobile-', |
|
| 186 | + 'mini' => null, |
|
| 187 | + ), |
|
| 188 | + // Width of labels for horizontal forms expressed as viewport => grid columns |
|
| 189 | + 'labelWidths' => array( |
|
| 190 | + 'large' => 2, |
|
| 191 | + 'small' => 4, |
|
| 192 | + ), |
|
| 193 | + // Classes to be applied to wrapped labels in horizontal forms |
|
| 194 | + 'wrappedLabelClasses' => array('right', 'inline'), |
|
| 195 | + // HTML markup and classes used by Foundation 3 for icons |
|
| 196 | + 'icon' => array( |
|
| 197 | + 'tag' => 'i', |
|
| 198 | + 'set' => null, |
|
| 199 | + 'prefix' => 'fi', |
|
| 200 | + ), |
|
| 201 | + // CSS for inline validation errors |
|
| 202 | + // should work for Zurb 2 and 3 |
|
| 203 | + 'error_classes' => array('class' => 'alert-box alert error'), |
|
| 204 | + ), |
|
| 205 | 205 | |
| 206 | 206 | |
| 207 | 207 | ); |