1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

initial commit from appmail

هذا الالتزام موجود في:
Adam Cooke
2017-04-19 13:07:25 +01:00
الأصل a3eff53792
التزام 2fdba0ceb5
474 ملفات معدلة مع 51228 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,39 @@
= form_for [organization, @server, @credential], :remote => true do |f|
= f.error_messages
%fieldset.fieldSet
.fieldSet__field
= f.label :type, :class => 'fieldSet__label'
.fieldSet__input
= f.select :type, Credential::TYPES, {}, :disabled => @credential.persisted?, :class => 'input input--select', :autofocus => @credential.new_record?
%p.fieldSet__text
This is the service that is associated with this credential. You'll be able to use this key to
authenticate to this type of service only.
.fieldSet__field
= f.label :name, :class => 'fieldSet__label'
.fieldSet__input
= f.text_field :name, :autofocus => @credential.persisted?, :class => 'input input--text'
%p.fieldSet__text
This is a friendly name so you can identify this credential later. You can enter anything
you want here, the more descriptive the better.
.fieldSet__field
= f.label :key, :class => 'fieldSet__label'
.fieldSet__input
= f.text_field :key, :readonly => true, :class => 'input input--text input--code', :placeholder => "Automatically generated", :tabindex => 1000, :value => (@credential.new_record? ? '' : @credential.key)
%p.fieldSet__text
This is the unique key which will be used to authenticate any requests to the API or our SMTP servers.
It will be generated randomly and cannot be changed. If you need a new token, you can create a new one and then
delete the old one when you're ready.
.fieldSet__field
= f.label :hold, :class => 'fieldSet__label'
.fieldSet__input
= f.select :hold, [["Process all messages", false], ["Hold messages from this credential", true]], {}, :class => 'input input--select'
%p.fieldSet__text
You may wish to automatically hold all messages that are sent by this credential. This allows you to preview them
for they are delivered to their recipients. This is useful for credentials for development environments.
.fieldSetSubmit.buttonSet
= f.submit @credential.new_record? ? "Create credential" : "Save credential", :class => 'button button--positive js-form-submit'
.fieldSetSubmit__delete
- if f.object.persisted?
= link_to "Delete credential", [organization, @server, @credential], :remote => true, :class => 'button button--danger', :method => :delete, :data => {:confirm => "Are you sure you wish to delete this credential?"}

عرض الملف

@@ -0,0 +1,8 @@
- page_title << @server.name
- page_title << "Credentials"
- page_title << "Edit"
= render 'servers/sidebar', :active_server => @server
= render 'servers/header', :active_nav => :credentials
.pageContent.pageContent--compact
= render 'form'

عرض الملف

@@ -0,0 +1,41 @@
- page_title << @server.name
- page_title << "Credentials"
= render 'servers/sidebar', :active_server => @server
= render 'servers/header', :active_nav => :credentials
.pageContent.pageContent--compact
- if @credentials.empty?
.noData.noData--goat.noData--clean
%h2.noData__title This is goating out of hand. You have no credentials!
%p.noData__text
In order to authenticate to your mail server, you use credentials. Once
you've added a credential, you'll have a unique token which you can use to
authenticate against our SMTP service or our HTTP API.
.noData__button= link_to "Add your first credential", [:new, organization, @server, :credential], :class => 'button button--positive'
- else
%p.pageContent__intro.u-margin
In order to authenticate to your mail server, you use credentials. Once
you've added a credential, you'll have a unique token which you can use to
authenticate against our SMTP service or our HTTP API.
%p.u-margin.pageContent__helpLink= link_to "Read more about sending outgoing e-mails", [organization, @server, :help_outgoing]
%ul.credentialList.u-margin
- for credential in @credentials
%li.credentialList__item
= link_to [:edit, organization, @server, credential], :class => 'credentialList__link' do
.credentialList__type
%span.label{:class => "label--credentialType-#{credential.type.underscore}"}= credential.type
.credentialList__properties
%p.credentialList__name
= credential.name
- if credential.hold?
%span.label.label--red Holding
%p.credentialList__key= credential.key
.credentialList__usedAt{:class => "credentialList__usedAt--#{credential.usage_type.underscore}"}
- if credential.last_used_at
%p.credentialList__usedAtTitle= credential.usage_type
%p Used #{distance_of_time_in_words_to_now credential.last_used_at} ago
- else
%p Not been used yet
%p.u-center.buttonSet.buttonSet--center
= link_to "Add another credential", [:new, organization, @server, :credential], :class => 'button button--positive'

عرض الملف

@@ -0,0 +1,8 @@
- page_title << @server.name
- page_title << "Credentials"
- page_title << "Add Credential"
= render 'servers/sidebar', :active_server => @server
= render 'servers/header', :active_nav => :credentials
.pageContent.pageContent--compact
= render 'form'