Difference between revisions of "Contact.rythm"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
= Links = | = Links = | ||
+ | * https://codepen.io/jaycbrf/pen/iBszr | ||
* {{Link|target=MediaWiki:Bootstrap.rythm}} | * {{Link|target=MediaWiki:Bootstrap.rythm}} | ||
* {{Link|target=MediaWiki:BITPlan.rythm}} | * {{Link|target=MediaWiki:BITPlan.rythm}} | ||
+ | * {{Link|target=MediaWiki:Form.rythm}} | ||
− | = | + | = Rythm template = |
− | <source lang=' | + | <source lang='html'> |
@// Rythm template for the WikiCMS approach | @// Rythm template for the WikiCMS approach | ||
@include(wiki.MediaWiki.Bootstrap.rythm) | @include(wiki.MediaWiki.Bootstrap.rythm) | ||
@include(wiki.MediaWiki.BITPlan.rythm) | @include(wiki.MediaWiki.BITPlan.rythm) | ||
− | @ | + | @include(wiki.MediaWiki.Form.rythm) |
− | |||
− | |||
− | |||
− | |||
@{ | @{ | ||
− | + | SelectField selectField=new SelectField("training","Seminar","Training","CPSA-F","CPSA-F","book",0); | |
− | + | String [] trainings={"Certified Professional for Software Architecture Foundation-Level CPSA-F","Certified Professional for Requirements Engineering Foundation-Level CPRE-FL"}; | |
− | + | selectField.addSelections(trainings); | |
− | + | Field[] fields={ | |
− | + | //selectField, | |
− | + | new TextField("name","Name","Name","John Doe","Erika Mustermann","user",2), | |
− | + | new TextField("organisation","Organization","Organiation","Doe Inc.","Mustermann GmbH","user",2), | |
− | + | new TextField("email","E-Mail Address","E-Mail Adresse","john@doe.com","erika@mustermann.de","envelope",5), | |
− | + | //new TextField("phone","Phone number","Telefon","+1 845 555-1212","+49 30 675797","earphone",8), | |
− | + | new TextAreaField("message","Your Message to us","Ihre Nachricht an us","Your Message","Ihre Nachricht","pencil",10) | |
− | + | //new TextField("address","Address","Adresse","12 Westend Ave","Mauerstr. 12","home",8), | |
− | + | //new TextField("zip","ZIP Code","PLZ","10023","10117","home",3), | |
− | + | //new TextField("city","City","Ort","New York","Berlin","home",2) | |
− | + | }; | |
− | + | Form form=new Form(de,postService,postToken,fields); | |
− | + | form.setTitle("Your contact with us","Ihre Nachricht an uns"); | |
− | + | form.setSuccess("Thanks for contacting us, we will get back to you shortly","Vielen Dank für Ihre Kontaktaufnahme, wir melden uns unverzüglich"); | |
− | + | for (Field field:form.getFields()) { | |
− | + | field.labelClass="bitplanorange"; | |
− | |||
− | // | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | @header(languageCode,"ContactTest") | |
− | |||
− | |||
− | @header(languageCode, | ||
@bootstrap() | @bootstrap() | ||
@style() | @style() | ||
+ | @formvalidate(form) | ||
</head> | </head> | ||
− | <body | + | <body> |
− | |||
− | |||
− | |||
− | |||
− | |||
<div class="container"> | <div class="container"> | ||
− | @ | + | @showform(form) |
− | + | @formDebug(form) | |
− | + | </div><!-- /.container --> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
@footer(de) | @footer(de) | ||
</source> | </source> | ||
[[Category:RythmTemplate]] | [[Category:RythmTemplate]] |
Revision as of 10:26, 9 November 2017
Links
- https://codepen.io/jaycbrf/pen/iBszr
- MediaWiki:Bootstrap.rythm
- MediaWiki:BITPlan.rythm
- MediaWiki:Form.rythm
Rythm template
@// Rythm template for the WikiCMS approach
@include(wiki.MediaWiki.Bootstrap.rythm)
@include(wiki.MediaWiki.BITPlan.rythm)
@include(wiki.MediaWiki.Form.rythm)
@{
SelectField selectField=new SelectField("training","Seminar","Training","CPSA-F","CPSA-F","book",0);
String [] trainings={"Certified Professional for Software Architecture Foundation-Level CPSA-F","Certified Professional for Requirements Engineering Foundation-Level CPRE-FL"};
selectField.addSelections(trainings);
Field[] fields={
//selectField,
new TextField("name","Name","Name","John Doe","Erika Mustermann","user",2),
new TextField("organisation","Organization","Organiation","Doe Inc.","Mustermann GmbH","user",2),
new TextField("email","E-Mail Address","E-Mail Adresse","john@doe.com","erika@mustermann.de","envelope",5),
//new TextField("phone","Phone number","Telefon","+1 845 555-1212","+49 30 675797","earphone",8),
new TextAreaField("message","Your Message to us","Ihre Nachricht an us","Your Message","Ihre Nachricht","pencil",10)
//new TextField("address","Address","Adresse","12 Westend Ave","Mauerstr. 12","home",8),
//new TextField("zip","ZIP Code","PLZ","10023","10117","home",3),
//new TextField("city","City","Ort","New York","Berlin","home",2)
};
Form form=new Form(de,postService,postToken,fields);
form.setTitle("Your contact with us","Ihre Nachricht an uns");
form.setSuccess("Thanks for contacting us, we will get back to you shortly","Vielen Dank für Ihre Kontaktaufnahme, wir melden uns unverzüglich");
for (Field field:form.getFields()) {
field.labelClass="bitplanorange";
}
}
@header(languageCode,"ContactTest")
@bootstrap()
@style()
@formvalidate(form)
</head>
<body>
<div class="container">
@showform(form)
@formDebug(form)
</div><!-- /.container -->
@footer(de)