Difference between revisions of "Contact.rythm"

From BITPlan Wiki
Jump to navigation Jump to search
(Created page with "= Links = = Source = <source lang='html4strict'> @// Rythm template for the WikiCMS approach @import com.bitplan.smw.PropertyMap @args() { String content, String lang,...")
 
 
(98 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Links =
 
= Links =
 +
* https://codepen.io/jaycbrf/pen/iBszr
 +
* {{Link|target=MediaWiki:Bootstrap.rythm}}
 +
* {{Link|target=MediaWiki:BITPlan.rythm}}
 +
* {{Link|target=MediaWiki:Form.rythm}}
  
= Source =
+
= Rythm template =
<source lang='html4strict'>
+
<source lang='html'>
 
@// Rythm template for the WikiCMS approach
 
@// Rythm template for the WikiCMS approach
@import com.bitplan.smw.PropertyMap
+
@include(wiki.MediaWiki.BITPlan.rythm)
@args() {
 
  String content,
 
  String lang,
 
  String title,
 
  PropertyMap smwprops;
 
}
 
<!doctype html>
 
<html lang="@(lang)">
 
<head>
 
  <!-- https://de.wikipedia.org/wiki/Bootstrap_(Framework) -->
 
  <meta charset="utf-8"/>
 
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
  <title>@(title)</title>
 
    <!-- Einbinden des Bootstrap-Stylesheets -->
 
    <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css">
 
 
 
    <!-- optional: Einbinden der jQuery-Bibliothek -->
 
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
 
 
 
    <!-- optional: Einbinden der Bootstrap-JavaScript-Plugins -->
 
    <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"></script>
 
  </head>
 
 
 
<body>
 
    <header>
 
 
@{
 
@{
   Object languageCodeObj=smwprops.get("Language_code");
+
   Field[] fields={
   String languageCode="de";
+
    new TextField("name","Name","Name","John Doe","Erika Mustermann","user",2),
   if (languageCodeObj!=null) {
+
    new TextField("organisation","Organization","Organisation","Doe Inc.","Mustermann GmbH","user",2),
    languageCode=languageCodeObj.toString();
+
    new TextField("email","E-Mail Address","E-Mail Adresse","john@doe.com","erika@mustermann.de","envelope",5),
  }
+
    new TextAreaField("message","Your Message to us","Ihre Nachricht an us","Your Message","Ihre Nachricht","pencil",10)
 +
  };
 +
   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");
 
}
 
}
    </header>
+
@BITPlanHeader(languageCode,title)
    <section class="container">
+
@BITPlanForm(de,form)
      <form>
 
        <div class="form-group">
 
          <label for="email">Email address:</label>
 
          <input type="email" class="form-control" id="email">
 
        </div>
 
        <div class="checkbox">
 
          <label><input type="checkbox">Bitte um Rückruf</label>
 
        </div>
 
        <button type="submit" class="btn btn-default">Senden</button>
 
      </form>
 
    </section>
 
  </body>
 
</html>
 
 
</source>
 
</source>
 +
[[Category:RythmTemplate]]

Latest revision as of 16:56, 9 November 2017

Links

Rythm template

@// Rythm template for the WikiCMS approach
@include(wiki.MediaWiki.BITPlan.rythm)
@{
  Field[] fields={
    new TextField("name","Name","Name","John Doe","Erika Mustermann","user",2),
    new TextField("organisation","Organization","Organisation","Doe Inc.","Mustermann GmbH","user",2),
    new TextField("email","E-Mail Address","E-Mail Adresse","john@doe.com","erika@mustermann.de","envelope",5),
    new TextAreaField("message","Your Message to us","Ihre Nachricht an us","Your Message","Ihre Nachricht","pencil",10)
  };
  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");
}
@BITPlanHeader(languageCode,title)
@BITPlanForm(de,form)