@@ -10,10 +10,10 @@
 | 
			
		||||
  function focus(el) {
 | 
			
		||||
    el.focus();
 | 
			
		||||
  }
 | 
			
		||||
  $: firstname_input_value = "";
 | 
			
		||||
  $: name = "";
 | 
			
		||||
  $: processed_last_submit = true;
 | 
			
		||||
  $: isFirstnameValid = firstname_input_value.trim().length !== 0;
 | 
			
		||||
  $: createbtnenabled = isFirstnameValid;
 | 
			
		||||
  $: isOrgnameValid = name.trim().length !== 0;
 | 
			
		||||
  $: createbtnenabled = isOrgnameValid;
 | 
			
		||||
  (function () {
 | 
			
		||||
    document.onkeydown = function (e) {
 | 
			
		||||
      e = e || window.event;
 | 
			
		||||
@@ -42,11 +42,7 @@
 | 
			
		||||
      })
 | 
			
		||||
        .then((result) => {
 | 
			
		||||
          console.log(result);
 | 
			
		||||
          firstname_input_value = "";
 | 
			
		||||
          lastname_input_value = "";
 | 
			
		||||
          middlename_input_value = "";
 | 
			
		||||
          email_input_value = "";
 | 
			
		||||
          username_input_value = "";
 | 
			
		||||
          name = "";
 | 
			
		||||
          modal_open = false;
 | 
			
		||||
          //
 | 
			
		||||
          Toastify({
 | 
			
		||||
@@ -123,15 +119,15 @@
 | 
			
		||||
                    use:focus
 | 
			
		||||
                    autocomplete="off"
 | 
			
		||||
                    placeholder="Name"
 | 
			
		||||
                    class:border-red-500={!isFirstnameValid}
 | 
			
		||||
                    class:focus:border-red-500={!isFirstnameValid}
 | 
			
		||||
                    class:focus:ring-red-500={!isFirstnameValid}
 | 
			
		||||
                    bind:value={firstname_input_value}
 | 
			
		||||
                    class:border-red-500={!isOrgnameValid}
 | 
			
		||||
                    class:focus:border-red-500={!isOrgnameValid}
 | 
			
		||||
                    class:focus:ring-red-500={!isOrgnameValid}
 | 
			
		||||
                    bind:value={name}
 | 
			
		||||
                    bind:this={firstname_input}
 | 
			
		||||
                    type="text"
 | 
			
		||||
                    name="firstname"
 | 
			
		||||
                    class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2" />
 | 
			
		||||
                  {#if !isFirstnameValid}
 | 
			
		||||
                  {#if !isOrgnameValid}
 | 
			
		||||
                    <span
 | 
			
		||||
                      class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
 | 
			
		||||
                      Organization name is required
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user