Skip to content

Commit

Permalink
Correct display of tx_form - hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Aug 19, 2014
1 parent dc73203 commit 60f71fc
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 67 deletions.
236 changes: 178 additions & 58 deletions Configuration/ContentElements/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,74 +718,194 @@ tt_content.textpic.20 {
plugin.tx_form._CSS_DEFAULT_STYLE >

tt_content.mailform.20 {
layout {
form (
<form class="form-horizontal">
<containerWrap />
</form>
)
containerWrap (
<div>
<elements />
</div>
)
elementWrap (
<div>
<element />
</div>
)
fieldset (
<fieldset><legend /><containerWrap /></fieldset>
)
label (
<label>
<labelvalue />
<mandatory />
</label>
)
error (
<span class="help-block text-danger"><errorvalue /></span>
)
textline (
<div class="form-group">
<div class="col-sm-3 control-label">
<label />
form {
layout {
form (
<form class="form-horizontal">
<containerWrap />
</form>
)
containerWrap (
<div>
<elements />
</div>
<div class="col-sm-5">
<input class="form-control" />
<error />
)
elementWrap (
<div>
<element />
</div>
</div>
)
textarea (
<div class="form-group">
<div class="col-sm-3 control-label">
)
fieldset (
<fieldset>
<legend />
<containerWrap />
</fieldset>
)
checkbox (
<div class="checkbox">
<input />
<label />
</div>
<div class="col-sm-5">
<textarea class="form-control" />
)
radio (
<div class="radio">
<input />
<label />
</div>
)
radiogroup (
<div class="form-group">
<div class="col-sm-3 control-label">
<legend />
</div>
<div class="col-sm-5">
<elements />
</div>
</div>
)
checkboxgroup < .radiogroup
label (
<label>
<labelvalue />
<mandatory />
<error />
</label>
)
legend (
<legend>
<legendvalue />
<mandatory />
<error />
</legend>
)
error (
<span class="help-block text-danger"><errorvalue /></span>
)
textline (
<div class="form-group">
<div class="col-sm-3 control-label">
<label />
</div>
<div class="col-sm-5">
<input class="form-control" />
</div>
</div>
</div>
)
submit (
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<input class="btn btn-primary" />
)
fileupload < .textline
textarea (
<div class="form-group">
<div class="col-sm-3 control-label">
<label />
</div>
<div class="col-sm-5">
<textarea class="form-control" />
</div>
</div>
)
submit (
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<input class="btn btn-primary" />
</div>
</div>
</div>
)
checkbox (
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<input />
)
select (
<div class="form-group">
<div class="col-sm-3 control-label">
<label />
</div>
<error />
<div class="col-sm-5">
<select class="form-control">
<elements />
</select>
</div>
</div>
</div>
)
)
}
}
confirmation {
layout {
confirmation (
<div class="form-horizontal">
<containerWrap />
</div>
)
containerWrap (
<div>
<elements />
</div>
)
elementWrap (
<div>
<element />
</div>
)
fieldset (
<containerWrap />
)
checkbox (
<label />
<inputvalue />
)
radio (
<label />
<inputvalue />
)
radiogroup (
<div class="form-group">
<div class="col-sm-3">
<strong><legend /></strong>
</div>
<div class="col-sm-5">
<elements />
</div>
</div>
)
checkboxgroup < .radiogroup
label (
<labelvalue />
)
legend (
<legendvalue />
)
textline (
<div class="form-group">
<div class="col-sm-3">
<strong>
<label />
</strong>
</div>
<div class="col-sm-5">
<inputvalue />
</div>
</div>
)
fileupload < .textline
textarea (
<div class="form-group">
<div class="col-sm-3">
<strong>
<label />
</strong>
</div>
<div class="col-sm-5">
<inputvalue />
</div>
</div>
)
select (
<div class="form-group">
<div class="col-sm-3">
<strong>
<label />
</strong>
</div>
<div class="col-sm-5">
<elements />
</div>
</div>
)
}
}
stdWrap.wrap = |
}
Expand Down
29 changes: 29 additions & 0 deletions Configuration/PageTS/mod_wizards.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
####################################
#### BOOTSTRAP CONTENT ELEMENTS ####
####################################
mod.wizards {
newContentElement {
wizardItems {
Expand Down Expand Up @@ -41,4 +44,30 @@ mod.wizards {
}
}
}
}


##############
#### FORM ####
##############
mod.wizards {
form {
defaults {
tabs {
elements {
accordions {
basic {
showButtons = textarea, textline, select, fileupload, submit,
}
predefined {
showButtons = email, radiogroup, checkboxgroup
}
content {
showButtons = header, textblock
}
}
}
}
}
}
}
63 changes: 54 additions & 9 deletions Resources/Private/Less/Theme/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// --------------------------------------------------
@import "../Bootstrap/variables.less";
@import "../Bootstrap/mixins.less";
@import "../Bootstrap/buttons.less";


//
Expand Down Expand Up @@ -949,14 +950,58 @@ body .typo3-feedit-element-hidden {
}



//
// Helper
// --------------------------------------------------
.help-block.text-danger:extend(.text-danger all) {}


//
// RTE SPECIFICS
// TYPO3 FORM
// --------------------------------------------------
.htmlarea-content-body table:extend(.table all) {}
.csc-form-element {
.form-group {
.clearfix();
}
.control-label {
text-align: left;
legend {
font-family: @font-family-base;
font-size: @font-size-base;
line-height: @line-height-base;
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
border: none;
}
}
.help-block.text-danger {
.text-emphasis-variant(@state-danger-text);
font-weight: normal;
}
}
.csc-form-element-radio .radio input[type="radio"],
.csc-form-element-checkbox .checkbox input[type="checkbox"] {
margin-left: 0;
}
.csc-form-confirmation {
ol {
list-style: none;
padding-left: 0;
margin: 0;
li {
display: inline-block;
}
}
}
.csc-form-confirmation-false,
.csc-form-confirmation-true {
input {
.btn();
}
}
.csc-form-confirmation-true {
input {
.btn-primary();
}
}
.csc-form-confirmation-false {
input {
.btn-default();
}
}

0 comments on commit 60f71fc

Please sign in to comment.