Update contributor profiles
* Adds a new page for updating profiles * Refactors the add-contributor component to allow for updating existing contributors * Adds input labels to the contributor form and improves placeholders * Adds event handlers for all contract contributor changes and uses them for updating the UI refs #122
This commit is contained in:
@@ -1,62 +1,50 @@
|
||||
<form {{action "submit" on="submit"}}>
|
||||
<p>
|
||||
{{input name="account"
|
||||
type="text"
|
||||
<label for="c-account">Ethereum account</label>
|
||||
{{input name="account" id="c-account"
|
||||
type="text" value=account
|
||||
placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4"
|
||||
value=account
|
||||
class=(if isValidAccount "valid" "")}}
|
||||
</p>
|
||||
<p>
|
||||
<select required onchange={{action (mut kind) value="target.value"}}>
|
||||
<label for="c-kind">Kind</label>
|
||||
<select required onchange={{action (mut kind) value="target.value"}} id="c-kind">
|
||||
<option value="person" selected={{eq kind "person"}}>Person</option>
|
||||
<option value="organization" selected={{eq kind "organization"}}>Organization</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
{{input name="name"
|
||||
type="text"
|
||||
placeholder="Name"
|
||||
value=name
|
||||
class=(if isValidName "valid" "")}}
|
||||
<label for="c-name">Name</label>
|
||||
{{input name="name" type="text" value=name placeholder="Zero Cool"
|
||||
class=(if isValidName "valid" "") id="c-name"}}
|
||||
</p>
|
||||
<p>
|
||||
{{input name="url"
|
||||
type="text"
|
||||
placeholder="URL"
|
||||
value=url
|
||||
class=(if isValidURL "valid" "")}}
|
||||
<label for="c-url">URL</label>
|
||||
{{input name="url" type="text" value=url placeholder="http://zerocool.bit"
|
||||
class=(if isValidURL "valid" "") id="c-url"}}
|
||||
</p>
|
||||
<p>
|
||||
{{input name="github_uid"
|
||||
type="text"
|
||||
placeholder="GitHub UID (123)"
|
||||
value=github_uid
|
||||
class=(if isValidGithubUID "valid" "")}}
|
||||
<label for="c-github-uid">GitHub UID</label>
|
||||
{{input name="github_uid" type="text" value=github_uid placeholder="2342"
|
||||
class=(if isValidGithubUID "valid" "") id="c-github-uid"}}
|
||||
</p>
|
||||
<p>
|
||||
{{input name="github_username"
|
||||
type="text"
|
||||
placeholder="GitHub username"
|
||||
value=github_username
|
||||
class=(if isValidGithubUsername "valid" "")}}
|
||||
<label for="c-github-username">GitHub username</label>
|
||||
{{input name="github_username" type="text" value=github_username placeholder="zerocool"
|
||||
class=(if isValidGithubUsername "valid" "") id="c-github-username"}}
|
||||
</p>
|
||||
<p>
|
||||
{{input name="gitea_username"
|
||||
type="text"
|
||||
placeholder="Gitea username"
|
||||
value=gitea_username
|
||||
class=(if isValidGiteaUsername "valid" "")}}
|
||||
<label for="c-gitea-username">Gitea username</label>
|
||||
{{input name="gitea_username" type="text" value=gitea_username placeholder="zerocool"
|
||||
class=(if isValidGiteaUsername "valid" "") id="c-gitea-username"}}
|
||||
</p>
|
||||
<p>
|
||||
{{input name="wiki_username"
|
||||
type="text"
|
||||
placeholder="Wiki Username"
|
||||
value=wiki_username
|
||||
class=(if isValidWikiUsername "valid" "")}}
|
||||
<label for="c-wiki-username">Wiki username</label>
|
||||
{{input name="wiki_username" type="text" value=wiki_username placeholder="ZeroCool"
|
||||
class=(if isValidWikiUsername "valid" "") id="c-wiki-username"}}
|
||||
</p>
|
||||
<p class="actions">
|
||||
{{input type="submit"
|
||||
disabled=inProgress
|
||||
{{input type="submit" disabled=inProgress
|
||||
value=(if inProgress "Processing" "Save")}}
|
||||
</p>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user