rents_screen.js 914 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { formscreen } from "./formscreen.js";
  2. export class rents_screen extends formscreen {
  3. #target;
  4. #email;
  5. #phone;
  6. get _email() {
  7. return this.#email();
  8. }
  9. get _phone() {
  10. return this.#phone();
  11. }
  12. constructor(target) {
  13. super();
  14. this.#target = target;
  15. }
  16. get _target() {
  17. return this.#target;
  18. }
  19. _build_form() {
  20. this.#email = this._create_input(
  21. "email",
  22. "E-mail:",
  23. "[email protected]",
  24. (input) => {
  25. input.type = "email";
  26. }
  27. );
  28. this.#phone = this._create_input(
  29. "phone",
  30. "Phone number:",
  31. "123-456-789",
  32. (input) => {
  33. input.type = "tel";
  34. input.pattern = "[0-9]{3}-[0-9]{3}-[0-9]{3}";
  35. }
  36. );
  37. }
  38. }